FAQ
From Ov51x JPEG hacked Wiki
Using a usb Hub, my camera fails to initialize
If your dmesg log shows lines like:
Can't determine sensor slave IDs
and you plugged the camera through a usb hub, you better try to plug it directly to a usb port on your computer
My webcam image is green under kopete for KDE 3.5...??
Well, kopete for KDE 3.5 only support v4l now and the palette loaded by default seems to be yuv something... To work around, it you can try to load ov51x with the parameter force_palette=13 which corresponds to VIDEO_PALETTE_YUV422P.
Alternatively, you can try any other palette. If you find one other or a better work around, please let me know!
EDIT: A user tested sucesfully the palette number 4, but this result in a high load since the module the converts YUV to RGB...
The list of palettes is taken from /usr/include/linux/videodev.h:
#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ #define VIDEO_PALETTE_YUYV 8 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ #define VIDEO_PALETTE_YUV420 10 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
The camera doesn't work with camorama
Yes, camorama and ov51x-jpeg (as well as ov511 where ov51x-jpeg comes from) do not think to agree on the image format, which result in an incompatibility between the application and the driver. See: http://bugs.debian.org/390218
However, it may be possible to work around this by forcing a frame format, as for kopete.
The camera doesn't work with xawtv
To work around it, you can try to load ov51x with the parameter force_palette=4
Then, run xawtv with : xawtv -nodga
unfortunatly with "force_palette=4" the colors become wrong (bluely) in some apps, that do not RGB -> BGR conversion (or reverse?) (e.g. openwengo)
The camera doesn't work with Skype
To work around it, you can try to load ov51x with the parameter forceblock=1 (version >= 1.5.6 required). Reference
How can I grab 640x480 picture from commandline ??
xawtv provides a nice command line application that can be used for this: v4lctl. For instance, webcamd in debian uses the following code to take a snapshot:
/usr/bin/v4lctl -c /dev/$device snap jpeg $cam_res $home/.webcamd/pre-webcam.jpg
You can use it and see man v4lctl to make your!
For Suse 10.0 OSS (after installing v4l tools) I use..
v4lctl snap jpeg 320x240 test.jpg
Higher resolution may work, but I get some weird effect if I try it.
For 1.5.0, and later, users, you can also directly dump a compressed jpeg frame from the camera. You have to:
- Load the module with dumpjpeg=1 as a parameter
- Compile getjpeg in test/
- Use getjpeg:
getjpeg -d /dev/videoX -o file-name -n #number
- with X being your camera number, and #number the number of frame you want
How can I set webcam parameters from commandline ??
Well, it depends on what you want to do.. Two main tools can be usefull, but may not fit your needs: v4l-info and v4l-conf. The first one is part of xawtv, and the second one is part of xawtv too. You can get them in debian/Ubuntu/whatever debian derived via:
# apt-get install xawtv v4l-conf
I let you read the man pages to see if you have what you need, but some parameters as the video size are up to the application you use your cam with, and cannot be set via command line.
How can I record a video from commandline ?
you could use "streamer" (part of xawtv http://linux.bytesex.org/xawtv/)
to record a 30 sec avi:
streamer -s 640x480 -r 16 -C /dev/dsp1 -F mono16 -R 48000 -f mjpeg -o ~/video.avi -t 0:30
I've also had some success with vlc media player 0.8.6b (http://www.videolan.org/vlc/) but you have to find the appropriate settings

