camerav4l
[Drivers]
Collaboration diagram for camerav4l:
- Compile-time dependencies
- <linux/videodev.h>
- Provides
- Requires
- none
- Configuration requests
- none
- Configuration file options
- port (string)
- Default: "/dev/video0"
- Device to read video data from.
- source (integer)
- Default: 3
- Some capture cards have multiple input sources; use this field to select which one is used.
- norm (string)
- Default: "ntsc"
- Capture format; "ntsc" or "pal"
- size (integer tuple)
- Default: varies with norm
- Desired image size. This may not be honoured if the driver does not support the requested size).
- mode (string)
- Default: "RGB888"
- Desired capture mode. Can be one of:
- GREY (8-bit monochrome)
- RGB565 (16-bit RGB)
- RGB888 (24-bit RGB)
- RGB32 (32-bit RGB; will produce 24-bit color images)
- YUV420P (planar YUV data converted to 24-bit color images)
- YUV420P_GREY (planar YUV data; will produce 8-bit monochrome images)
- JPEG (for some webcams)
- Note that not all capture modes are supported by Player's internal image format; in these modes, images will be translated to the closest matching internal format (e.g., RGB32 -> RGB888).
- save (integer)
- Default: 0
- Debugging option: set this to write each frame as an image file on disk.
- have_ov519 (integer)
- Default: 0
- Needed for ovc519 based cameras that send data jpeg compressed on the usb bus.
- max_buffer (integer)
- Default: -1 (do not set)
- Limit the maximum number of buffers to use for grabbing. This reduces latency, but also potentially reduces throughput. Use this if you are reading slowly from the player driver and dont want to get stale frames
- brightness (integer)
- Default: -1 (do not set)
- hue (integer)
- Default: -1 (do not set)
- colour (integer)
- Default: -1 (do not set)
- contrast (integer)
- Default: -1 (do not set)
- read_mode (integer)
- Default: 0
- Set to 1 if read should be used instead of grab (in most cases it isn't a good idea!)
- publish_interval (integer)
- Default: 0
- how many second between publishing real images (may break your client app!)
- sleep_nsec (integer)
- Default: 10000000 (=10ms which gives max 100 fps)
- timespec value for nanosleep()
Note that some of these options may not be honoured by the underlying V4L kernel driver (it may not support a given image size, for example).
- Example
driver ( name "camerav4l" provides ["camera:0"] )
- Logitech QuickCam Pro 4000
driver ( name "camerav4l" provides ["camera:0"] port "/dev/video0" source 0 size [160 120] mode "YUV420P" )
Kernel notes: with a little bit of tweaking, this camera will work with the pwc (Phillips Web-Cam) driver in the Linux 2.4.20 kernel. The stock driver recognizes the QC Pro 3000, but not the QC Pro 4000; to support the latter, you must modify the kernel source (add a product id in a couple of places in pwc-if.c). Milage may vary for other kernel versions. Also, the binary-only pwcx.o module is needed to access frame sizes larger than 160x120; good luck finding this and/or getting it to work (the developer spat the dummy and took down his website).
Update for pwc: The original source has been taken up by another developer and is now available from http://www.saillard.org/linux/pwc/. This new version also doesnt need the binary driver which is a bonus