Ask Your Question
4

usb_cam: VIDIOC_S_FMT error 22

asked 2011-02-16 12:09:41 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

When using usb_cam package, I get the following error message:

VIDIOC_S_FMT error 22, Invalid argument

edit retag flag offensive close merge delete

Comments

when you see an answer you like, mark it as an accepted answer
mmwise gravatar image mmwise  ( 2011-02-17 09:34:36 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
6

answered 2011-02-16 13:15:04 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I've seen this error on a lot of my student's computers -- try setting the "pixel_format" parameter to "yuyv"-- this fixed it on all computers I've seen.

edit flag offensive delete link more

Comments

reposting so you can accept the answer. Working around bug http://askbot.org/en/question/293/how-can-an-admin-answer-own-question-and-accept-it
tfoote gravatar image tfoote  ( 2011-02-16 13:15:55 -0500 )edit
1

Did not work for me, but that it is because my QuickCam outputs in the YUV420 format, which usb_cam does not support. So if anyone else is trying to use a Logitech QuickCam with ROS, you can get usb_cam working by implementing a YUV420 to RGB conversion (not trival) and adding a YUV420 parameter.

autonomy gravatar image autonomy  ( 2013-01-16 07:17:44 -0500 )edit

For my Microsoft LifeCam VX-3000 I actually had to set the pixel format BACK to "mjpeg". After that the node starts to spam "[swscaler @ 0x15a5e00] deprecated pixel format used, make sure you did set range correctly" but the output works as expected ..

blubbi321 gravatar image blubbi321  ( 2018-08-06 05:23:38 -0500 )edit
2

answered 2016-09-01 05:49:18 -0500

Wessiye gravatar image

in my Ubuntu desktop, I have face the same problem and fixed by the following steps... 1. plug in your usb camera to your computer 2. check whether you have installed any other camera apps like droidcam, etc on your system with the command " ls /dev/video* " without the double quotes.. if you see more than one video devices listed on the terminal then remove any unnecessary camera apps from your system with the command " sudo apt-get autoremove droidcam " assuming that you installed droidcam.. it may be any other camera app in your case... 3. check again your camera device by using the command " ls /dev/video* " without the double quotes.. if you steal see more than one video camera listed on the terminal repeat the procedure in step 2... until you see only one camera which you connected to your computer via usb port remains... this fixed my problem and i am happy to share it to those in the same boat with me.,, Remember: first of all plug in your usb web camera to your system...

edit flag offensive delete link more

Comments

Or you can simply go to the launch file and change device name () to one of the available video devices if you are not willing to remove other apps.

worked for me.

savanadeshra gravatar image savanadeshra  ( 2018-12-03 01:03:35 -0500 )edit
2

answered 2011-02-16 12:10:04 -0500

fergs gravatar image

updated 2011-02-16 12:11:13 -0500

I've seen this error on a lot of my student's computers -- try setting the "pixel_format" parameter to "yuyv"-- this fixed it on all computers I've seen.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-02-16 12:09:41 -0500

Seen: 8,349 times

Last updated: Feb 16 '11