Page 1 of 1

ZM 1.24.2 with 0ac8:301b Z-Star ZC0301 ->picture is noisy

Posted: Sun Dec 20, 2009 8:06 pm
by nicholas
I have this camera, but zone minder only makes noise images:

Code: Select all

Bus 003 Device 008: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 Webcam
I'm using Debian, zoneminder package 1.24.2-2

I'm using gscpa from Linux kernel 2.6.31-1-686.

I have modules gspca_zc3xx, gspca_main, videodev, etc. loaded.

When I plug in the camera, syslog says:
Dec 20 17:38:36 mythone kernel: [2176962.685859] gspca: probing 0ac8:301b
Dec 20 17:38:36 mythone kernel: [2176962.781675] zc3xx: probe sensor -> 0000
Dec 20 17:38:36 mythone kernel: [2176962.781682] zc3xx: Find Sensor HV7131B
Dec 20 17:38:36 mythone kernel: [2176962.793812] gspca: probe ok
While 'cheese' works (it says it is using 'v4l2src name=video_source device=/dev/video1 ! capsfilter name=capsfilter caps=video/x-raw-rgb,width=640,height=480,framerate=30/1;video/x-raw-yuv,width=640,height=480,framerate=30/1 ! identity'), zone minder only makes noisy images:

Image

the settings used are:

Image

I believe my camera can do higher than 320x240, but when I enter (for example) 640x480, the 'source' appears red in the Console and when I try to watch the monitor, there is no video display.

If I try using v4l-1, I get:
Dec 20 19:36:00 mythone zmc_dvideo1[25501]: INF [Debug Level = 0, Debug Log = <none>]
Dec 20 19:36:00 mythone zmc_dvideo1[25501]: INF [Starting Capture]
Dec 20 19:36:00 mythone zmc_dvideo1[25501]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
for v4l-2, I've tried all the available Capture Palette options. I have not tried every combination of Device Format and Capture Palette.

The full v4l-info output is:
$ v4l-info /dev/video1

### v4l2 device info [/dev/video1] ###
general info
VIDIOC_QUERYCAP
driver : "zc3xx"
card : "PC Camera"
bus_info : "usb-0000:00:0b.0-6"
version : 2.6.0
capabilities : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]

standards

inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "zc3xx"
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 : "JPEG"
pixelformat : 0x4745504a [JPEG]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 320
fmt.pix.height : 240
fmt.pix.pixelformat : 0x4745504a [JPEG]
fmt.pix.field : NONE
fmt.pix.bytesperline : 320
fmt.pix.sizeimage : 29390
fmt.pix.colorspace : JPEG
fmt.pix.priv : 1

controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 255
step : 1
default_value : 128
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 256
step : 1
default_value : 128
flags : 0

### video4linux device info [/dev/video1] ###
general info
VIDIOCGCAP
name : "PC Camera"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 640
maxheight : 480
minwidth : 48
minheight : 32

channels
ioctl VIDIOCGCHAN: Invalid argument

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
VIDIOCGAUDIO
audio : 0
volume : 0
bass : 0
treble : 0

picture
VIDIOCGPICT
brightness : 257
hue : 0
colour : 0
contrast : 256
whiteness : 39321
depth : 8
palette : unknown

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
VIDIOCGWIN
x : 0
y : 0
width : 320
height : 240
chromakey : 0
flags : 0
For comparison, motion startup is:
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.11 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.11 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] cap.driver: "zc3xx"
[1] cap.card: "PC Camera"
[1] cap.bus_info: "usb-0000:00:0b.0-6"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: JPEG (JPEG)
[1] Selected palette JPEG
[1] index_format 3 Test palette JPEG (640x480)
[1] Using palette JPEG (640x480) bytesperlines 640 sizeimage 115790 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1] "Brightness", default 128, current 128
[1] found control 0x00980901, "Contrast", range 0,256
[1] "Contrast", default 128, current 128
[1] found control 0x00980910, "Gamma", range 1,6
[1] "Gamma", default 4, current 4
[1] found control 0x00980912, "Auto Gain", range 0,1
[1] "Auto Gain", default 1, current 1
[1] mmap information:
[1] frames=4
[1] 0 length=118784
[1] 1 length=118784
[1] 2 length=118784
[1] 3 length=118784
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] File of type 8 saved to: /tmp/motion/01-20091220195409.swf
[1] File of type 1 saved to: /tmp/motion/01-20091220195409-01.jpg
An example image from motion is:

Image

How can I find what zoneminder is doing differently to 'motion' and 'cheese'?

Posted: Tue Dec 29, 2009 7:24 pm
by trschober
that, my friend, is exactly what happens to me.
cheese works perfect, but zoneminder gives a garbled green image.
even more, the bttv card works perfectly, but no webcam works at all.
I'm even using the same distro and webcam modules

Posted: Tue Dec 29, 2009 10:24 pm
by nicholas
I think I'm going to try using http://www.barkered.com/2008/04/07/icam ... -icamview/ to avoid having to use the Linux drivers for that camera.

I'm also thinking of buying a TP-Link TL-SC3130G http://www.eclipsecomputers.com/product ... -TLSC3130G . I am hoping it'll provide some clear ways to integrate with ZoneMinder - it seems fairly flexible and standards based.