[FFmpeg-user] Capturing one frame of MacBook iSight output with a delay (...no longer works)
joe pocari
joe_pocari at yahoo.com
Mon Sep 5 06:20:37 CEST 2011
For about five years I've used ffmpeg in a shell script to grab one frame from my linux'd-up Macbook's iSight:
ffmpeg -f video4linux2 -s 640x480 -r 15 -i /dev/video0 -an -vframes 1 -vcodec mjpeg -y -sameq -ss 1.5 snapshot.jpg
I upgraded my Ubuntu distro from Lucid to Natty (now using ffmpeg ver. 0.6.2-4:0.6.2-1ubuntu1) and that syntax no longer works. The cam turns on and ffmpeg spits out an infinitely-repeated [er, unverified] stream of the following line at the rate of ~2/sec:
frame= 0 fps= 0 q=0.0 size= -0kB time=10000000000.00 bitrate= -0.0kbit
Without the '-ss 1.5' flag it will grab the first frame and exit immediately. That's no good, however, because the cam needs that 1.5 seconds to settle at a reasonable exposure.
Any permutation of '-ss', '-itsoffset', and '-t' I've haphazardly tried result one of those two behaviors. (Also unexpected, albeit not important atm, is that when vframes > 3, three files are written as expected within ~0.6s and then it merely seems to iterate the 'drop=' total indefinitely.)
Suggestions?
JP
More information about the ffmpeg-user
mailing list