2008年11月26日 星期三

mjpg_streamer or uvc_streamer always Unable to set format: Invalid argument

When running webcam AP like mjpg_streamer or uvc_streamer on your PC
(need to "depmod -a" , and "modprove uvcvideo" , this will install uvc driver on your PC)

many people will see this:
[arthur@localhost mjpg-streamer-r63]$ ./mjpg_streamer
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Unable to set format: Invalid argument
Init v4L2 failed !! exit fatal
i: init_VideoIn failed

this can be easily bypass by using follow cammond:
/usr/local/bin/./mjpg_streamer -i "input_uvc.so -d /dev/video -y" -o "output_http.so"


This is because your PC is USB2.0 support, so the streamer can only use yuv mode to output your images,
it's 80 frames/sec, much more then MJPEG mode. if you really want test MJPEG mode,
then you can try

sudo rmmod echi_hcd,

this will force take off usb2.0 driver, and only usb1.1 driver running. and after this you can run your AP happily.

My system is fedora6 , /usr/src/kernels/2.6.22.14-72.fc6-i586/

2 則留言:

Unknown 提到...

Thanks - I spent whole day trying to crack this

Gato 提到...

thank you !!!

this problem has been around the forums since 2006 and you are the first that gave a working solution and explanation.