Page 1 of 1

zmc crashes with "ibmcam"

Posted: Wed Sep 08, 2004 5:03 am
by rogerdahl
Hello everyone,

I'm having trouble using ZoneMinder with a IBM PC Camera which is supported by the ibmcam driver.

I'm able to use the camera with other software (the "webcam" package) on the same machine. It's only ZoneMinder that is having trouble with the camera.

When I run zmc -d0, the output is:
09/07/04 22:11:56.842262 zmc-d0[1452].INF-zm_debug.c/189 [Debug Level = 0, Debug Log = ]
09/07/04 22:11:57.516668 zmc-d0[1452].ERR-zm_local_camera.cpp/91 [Failed to set window attributes: Invalid argument]
zmu -d 0 -q gives:
N:IBM USB Camera,T:1,nC:1,nA:0,mxW:640,mxH:480,mnW:8,mnH:4,X:0,Y:0,W:640,H:480,P:4,D:24,B:32768,h:32768,Cl:32768,Cn:49152,w:26880,n0:Camera,C0:0,Fl0:0,T0:2F0:0,
The settings that are working for the webcam package are:
device = /dev/video0
text = "webcam %Y-%m-%d %H:%M:%S"
infofile = infofile
width = 640
height = 480
delay = 0
input = Camera
norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 75
trigger = 0
once = 0
When webcam starts, it displays the following:
size 640x480 [24 bit TrueColor (LE: bgr)]
input Camera, norm pal, jpeg quality 75
rotate=0, top=0, left=0, bottom=480, right=640
I have tried all the different Capture Palette settings and also different combinations of Device Chanel and Device Format.

Any help would be much appreciated...

Roger

Posted: Thu Sep 09, 2004 6:22 am
by rogerdahl
I think this is a driver bug. Basically, the Video4Linux ioctl call VIDIOCGWIN is returning data that is not acceptable input to the corresponding VIDIOCSWIN call.

ZoneMinder defines the capture area by first grabing the capture window information with VIDIOCGWIN, updating the capture size and writing the whole thing back with VIDIOCSWIN. The VIDIOCSWIN call fails even if no changes were made to the data retrieved from VIDIOCGWIN

Roger

Posted: Thu Sep 09, 2004 1:05 pm
by fernando
have you trie setting 320*240 rsolution?

Posted: Thu Sep 09, 2004 4:20 pm
by rogerdahl
Hi Fernando,

I simply removed the call to VIDIOCSWIN. The camera defaults to 640x480, so it works now. I didn't want to run at a lower resolution.

Roger

Posted: Thu Sep 09, 2004 8:11 pm
by oskin
Try the solution described in http://www.zoneminder.com/forums/viewto ... highlight= (patch in the end). If will fail inform the version of a kernel.