Skip to content

Instantly share code, notes, and snippets.

@DaniruKun
Last active February 17, 2021 17:14
Show Gist options
  • Save DaniruKun/2358d4883b5a823750d2c4c6c584f2a5 to your computer and use it in GitHub Desktop.
Save DaniruKun/2358d4883b5a823750d2c4c6c584f2a5 to your computer and use it in GitHub Desktop.
Capture USB video device with FFmpeg on macOS from Rule capture card
#!/bin/sh
# Call the script with single argument like this
# ./capture-usb-video.sh out.avi
ffmpeg -f avfoundation \
-rtbufsize 100M \
-video_size 1920x1080 \
-pixel_format nv12 \
-framerate 30 \
-probesize 42M \
-video_device_index 0 \
-i "0:none" \
-vcodec libx264rgb -b:v 7000k \
$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment