copied from: https://gist.github.com/docPhil99/d8667de1e8c5e96e2203f2bc0f28f89d
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 ""
This will list the aviable video and audio devices.
The below will capture at 30fps and the set video size to a file.