Skip to content

Instantly share code, notes, and snippets.

@GoMino
Forked from docPhil99/macFFmpeg.md
Created July 22, 2019 11:47
Show Gist options
  • Save GoMino/1a17e8fe3e0a2516f36b395b5da13966 to your computer and use it in GitHub Desktop.
Save GoMino/1a17e8fe3e0a2516f36b395b5da13966 to your computer and use it in GitHub Desktop.

Revisions

  1. @docPhil99 docPhil99 revised this gist Mar 13, 2018. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion macFFmpeg.md
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,10 @@ This will list the aviable video and audio devices.
    The below will capture at 30fps and the set video size to a file.
    ```fmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" out.avi```

    The ```-i 0:none``` will select the 0 indexed video source and no audio.
    The ```-i 0:none``` will select the 0 indexed video source and no audio.

    We can stream this to the network with

    ```ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" -vcodec libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv422p -f mpegts udp://localhost:12345```

    This can be viewed using VLC or OpenCV, although there maybe a significant lactancy in the stream
  2. @docPhil99 docPhil99 revised this gist Mar 13, 2018. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion macFFmpeg.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,12 @@
    #Capture and stream a webcam
    To capture using the iSight camera on a Mac, or infact any other webcam connected to the Mac, we can use FFmpeg. First get a list of the devices installed.
    ```ffmpeg -f avfoundation -list_devices true -i "" ```

    ```
    ffmpeg -f avfoundation -list_devices true -i ""
    ```
    This will list the aviable video and audio devices.

    The below will capture at 30fps and the set video size to a file.
    ```fmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" out.avi```

    The ```-i 0:none``` will select the 0 indexed video source and no audio.
  3. @docPhil99 docPhil99 revised this gist Mar 13, 2018. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion macFFmpeg.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    temp
    #Capture and stream a webcam
    To capture using the iSight camera on a Mac, or infact any other webcam connected to the Mac, we can use FFmpeg. First get a list of the devices installed.
    ```ffmpeg -f avfoundation -list_devices true -i "" ```
  4. @docPhil99 docPhil99 created this gist Mar 13, 2018.
    1 change: 1 addition & 0 deletions macFFmpeg.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    temp