This is the example command that will take pictures periodically:
$ ffmpeg -f v4l2 -i {{device, e.g. /dev/video1}} -ss 0:0:2 -s 120x90 -vsync 2 -r 4 -updatefirst 1 stream.png
-
-f v4l2
uses the standard linux /dev/video decoder thing. -
-i {{device}}
uses the given{{device}}
as the input device. -
-ss 0:0:2
streams the webcam for 2 seconds prior to starting the stream. This will enable the webcam to warm up; in the case of the RZ406AA, there is a 2-second warmup period in which the R and B channels must be slowly brought up for some stpid reason. -
-s 120x90
sets the output size. This can be changed according to the whims of the programmers. -
-vsync 2
synchronizes the output buffer (removes some bulky watchdogs) and drastically decreases CPU utilization. -
-r 4
specifies the rate at which the output is updated. -
-updatefirst 1
andstream.png
are used for a singular-file streaming setup. FFMpeg will update the file as it reads new image data from the webcam. Alternatively, one can usestream%5d.png
to write out to enumerated files, and then can programmatically determine the latest file, but this consumes more space and is silly.