At least it helped me. When taking consecutive shots at 1 frame/sec the first 2 pictures turn out too dark. I noticed that ffmpeg takes 3 pictures rapidly before adjusting to the 1 per second rate, which may explain the dark (under exposed) shots.Aunt Google wrote:ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:2 -frames 1 /tmp/out.jpg
The -ss parameter is used to allow the device to start up correctly. Here in my tests, there is a fade-in effect while the camera is being turned on, so, if I just omit -ss 2, the captured frame will be very dark.
I also discovered that I can take less than 1 picture per second.
This will take 30 consecutive pictures, one every 2 seconds. Names start with shot-0001.jpg:
Code: Select all
ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 -ss 2 -vf fps=0.5 -vframes 30 /tmp/shot-%04d.jpg