Record screen with FFMPEG

*Taken from: * https://trac.ffmpeg.org/wiki/Capture/Desktop

macOS

Use the avfoundation device:

ffmpeg -f avfoundation -list_devices true -i ""

This will enumerate all the available input devices including screens ready to be captured.

Once you’ve figured out the device index corresponding to the screen to be captured, use:

ffmpeg -f avfoundation -r 1 -probesize 20M -threads 1 -i "1:none" -vcodec libx264 -b:v 128k -s hd720 /Users/kwannoel/Sync/CS2104/0406988-cs2104-finals.mp4

To view the video:

ffplay <video>

See also: Convert video with ffmpeg