[FFmpeg-user] Cannot receive in MJPEG format from Logitech USB camera with Windows UVC drivers and dshow
m.antonucci at ezness.it
Sun Jun 10 18:34:45 CEST 2012
I am using a Logitech C525 camera. Accoding to this website,
"On Windows, the available streaming formats are I420 and RGB24 when the
camera is used with the Logitech UVC driver. With the Microsoft UVC driver
built into Windows, the native YUY2 and MJPG formats are exported instead".
In fact if I do not install Logitech's drivers but keep the default UVC
drivers that Windows installs when I plug the camera, then I run Microsoft's
GraphEdt, I see the description for the camera (see Annex1.png), where the
pin0 offers 100 types, of which types 00..49 are YUY2 and types 50..99 are
type MJPEG (see Annex2.png).
ffmpeg confirms this wealth of options (see Annex3.txt), even if it does not
specify which ones are YUY2 and which ones are MJPEG.
Now, if I run:
ffmpeg -f dshow -i video="HD Webcam C525" -r 1 -f image2 photo%3d.jpeg
then I see ffmpeg receive raw_frames from the camera and successfully
convert them to a sequence of jpeg images. Instead, my attempts at receiving
MJPEG frames from the camera have been unsuccessful.
In particular, I have run:
ffmpeg -f dshow -c:v mjpeg -i video="HD Webcam C525" -r 1 -s 640x480 -f
and ffmpeg behaved like in Annex4.txt, which seems (to me) to indicate that
some data have been received indeed (hence the buffer full warning), then
but have faded into nowhere without being processed.
I have tried with different rates (-r parameter) and sizes (-s parameter)
but with no change. While ffmpeg rejects some resoultions, others are
accepted but still no data are pumped to the exit.
So my question is: am I doing some mistake, was this the right way to
extract MJPEG frames from a webcam under Windows? Otherwise, what's wrong?
Thank you for any support that you will provide.
More information about the ffmpeg-user