2

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 just upgraded my Ubuntu distro from Lucid to Natty (ffmpeg ver. 0.6.2-4:0.6.2-1ubuntu1). Now that syntax turns the iSight on but hangs indefinitely.

[output snipped, ending with:]
frame=    0 fps=  0 q=0.0 Lsize=      -0kB time=10000000000.00 bitrate=  -0.0kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead -inf%

Without the '-ss' flag it seems to successfully grab the first frame and exit immediately - the only difference in output being:

frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=0.07 bitrate=  -2.6kbits/s    
video:16kB audio:0kB global headers:0kB muxing overhead -100.132730%

However, the '-ss 1.5' was necessary to delay the frame capture by 1.5 seconds to allow the cam sufficient time to adjust the exposure.

The -itsoffset flag seemed promising, but doesn't seem to change ffmpeg's behavior (ie doesn't hang, but no delay).

Any ideas?

Kara
  • 6,115
  • 16
  • 50
  • 57
Andy
  • 21
  • 2
  • I'm having a very similar problem. Did you ever figure it out? – Morgan Oct 06 '11 at 16:11
  • Sorry, no luck. I'd also asked on the ffmpeg-user list. Alternately, it seems plausible that there'd been a tweak farther down that changed how the iSight behaved when accessed from /dev/video0. I never looked into that specifically, however. – Andy Feb 27 '12 at 23:14

0 Answers0