Wrong palette with V4L2
Posted: Thu Nov 20, 2008 8:26 am
Hi all,
Yesterday I downloaded/compiled the last ZoneMinder version (ZoneMinder-1.24.0-rc1-2678.tar.gz) since I wanted to try the support for the V4L(2) webcams.
After I compiled/installed everything, the webcam was recognized, but its colors were always pink/bluish. I tried all the possible palettes, but none of them displayed the colors correctly.
With the YUYV palette configured in Zoneminder I get the following picture:

Using ffmpeg streaming through v4l2 I get the same picture but with right colors:

This is the output of v4l-info on my PC:
Do you think it's a problem with the 1.24.0-rc1 or something related to my configuration?
Thanks a lot for your help
Andrea
Yesterday I downloaded/compiled the last ZoneMinder version (ZoneMinder-1.24.0-rc1-2678.tar.gz) since I wanted to try the support for the V4L(2) webcams.
After I compiled/installed everything, the webcam was recognized, but its colors were always pink/bluish. I tried all the possible palettes, but none of them displayed the colors correctly.
With the YUYV palette configured in Zoneminder I get the following picture:

Using ffmpeg streaming through v4l2 I get the same picture but with right colors:

This is the output of v4l-info on my PC:
Code: Select all
### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "uvcvideo"
card : "UVC Camera (046d:08ca)"
bus_info : "0000:02:00.2"
version : 0.1.0
capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]
standards
inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Camera 1"
type : CAMERA
audioset : 0
tuner : 0
std : 0x0 []
status : 0x0 []
video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 1
description : "MJPEG"
pixelformat : 0x47504a4d [MJPG]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 0
description : "YUV 4:2:2 (YUYV)"
pixelformat : 0x56595559 [YUYV]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 640
fmt.pix.height : 480
fmt.pix.pixelformat : 0x56595559 [YUYV]
fmt.pix.field : NONE
fmt.pix.bytesperline : 1280
fmt.pix.sizeimage : 614400
fmt.pix.colorspace : SRGB
fmt.pix.priv : 0
controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 255
step : 1
default_value : 127
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 255
step : 1
default_value : 32
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 255
step : 1
default_value : 28
flags : 0
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "UVC Camera (046d:08ca)"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 0
maxheight : 0
minwidth : 48
minheight : 32
channels
ioctl VIDIOCGCHAN: Invalid argument
tuner
ioctl VIDIOCGTUNER: Invalid argument
audio
ioctl VIDIOCGAUDIO: Invalid argument
picture
VIDIOCGPICT
brightness : 32639
hue : 0
colour : 8224
contrast : 8224
whiteness : 0
depth : 16
palette : YUYV
buffer
ioctl VIDIOCGFBUF: Invalid argument
window
VIDIOCGWIN
x : 0
y : 0
width : 640
height : 480
chromakey : 0
flags : 0
Thanks a lot for your help
Andrea