Page 1 of 1

zmc dies with OV519 camera

Posted: Wed Jan 18, 2006 9:24 pm
by kdegraaf
Greetings,

I'm running Slackware 10.2. I built Linux 2.6.15.1, LAME 3.96.1, FFmpeg (latest CVS), and ZM 1.21.4 from source.

I have two D-Link DSB-C310 OV519-based cameras, and I'm using version 0.5 of the JPEG-hacked driver from http://www.rastageeks.org/ (it does JPEG decompression in kernelspace). Xawtv and other V4L apps confirm that the hardware and drivers are working.

I set up ZM and then added one of the cameras (/dev/video0) using a capture geometry of 640x480 and a number of different permutations of channel, format, and pallette settings, all to no avail. Whether I use MPEG or JPEG output, there is no video displayed. Selecting "view image" (in JPEG mode) reveals that there was an internal server error (malformed headers). This makes sense given that "zmc" returns with no output.

zmaudit.log, zmfilter.log and zmpkg.log look reasonable. zmwatch.log has a bunch of "Can't get shared memory id '2053971969': No such file or directory" errors. zmdc.log contains many sections similar to the following:

Starting pending process, zmc -d /dev/video0
'zmc -d /dev/video0' started at 06/01/18 16:13:32
'zmc -d /dev/video0' starting at 06/01/18 16:13:32, pid = 2250
'zmc -d /dev/video0' crashed at 06/01/18 16:13:33, exit status 255
'zmaudit.pl -d 900 -y' running at 06/01/18 15:56:16, pid = 2094, valid
'zmfilter.pl' running at 06/01/18 15:56:14, pid = 2089, valid
'zmwatch.pl' running at 06/01/18 15:56:17, pid = 2099, valid
'zmc -d /dev/video0' pending at 06/01/18 16:23:33

I followed the troubleshooting instructions and ran "zmc --device /dev/video0" manually. It returns almost immediately with an exit code of 255.

What else can I try? What further information do you need?

Thanks.

Posted: Thu Jan 19, 2006 10:16 am
by zoneminder
The /var/log/messages file is most likely to have the useful debug in it.

That didn't help

Posted: Thu Jan 19, 2006 7:21 pm
by kdegraaf
Not so much:

zmc_dvideo0[3285]: INF [Debug Level = 0, Debug Log = <none>]
zmc_dvideo0[3288]: INF [Debug Level = 0, Debug Log = <none>]

Under Options -> Tools, I have the following:

ZM_EXTRA_DEBUG: (checked)
ZM_EXTRA_DEBUG_TARGET: _zmc
ZM_EXTRA_DEBUG_LEVEL: 2
ZM_EXTRA_DEBUG_LOG: /tmp/zm_debug.log+

I restarted ZM (with zmpkg.pl), but this logfile doesn't show up.

Any other ideas?

Further info

Posted: Thu Jan 19, 2006 7:33 pm
by kdegraaf
Ignore the preceding post. I set up debugging again (for all components) and I have interesting information now:

zmc_dvideo0[3659].INF-zm_debug.c/305 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.03659]
zmc_dvideo0[3659].DB1-zm_monitor.cpp/941 [Got 1 monitors]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/77 [Old P:4]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/78 [Old D:24]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/79 [Old B:33280]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/80 [Old h:32768]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/81 [Old Cl:32768]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/82 [Old Cn:31744]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/126 [Old X:0]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/127 [Old Y:0]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/128 [Old W:640]
zmc_dvideo0[3659].DB1-zm_local_camera.cpp/129 [Old H:480]
zmc_dvideo0[3659].ERR-zm_local_camera.cpp/141 [Failed to set window attributes: Invalid argument]

How do I know which arguments are bad, and how do I fix this?

Also, this concerns me:

zms[3704].DB1-zm_monitor.cpp/1211 [Got 1 monitors]
zms[3704].DB1-zm_monitor.cpp/138 [monitor purpose=0]
zms[3704].DB1-zm_monitor.cpp/141 [shm.size=12288548]
zms[3704].ERR-zm_monitor.cpp/183 [Shared memory not initialised by capture daemon]

Any ideas?

Posted: Thu Jan 19, 2006 8:36 pm
by kdegraaf
I switched back to the non-JPEG driver from alpha.dyndns.org. Now, I can get zmc to not crash and actually produce video.

Except that the video is just a black box with garbage at the top. And none of the pallettes make this any better. And, setting the pallette to "Grey" brings back the shmem error, even though I followed your directions and upped the kernel's shmmax and shmall proc variables.

I jacked up the log verbosity to 9, and all it tells me is that shmget failed, for no particular reason. I run "ipcs" and see that the segment is well within limits and there should be plenty more room.

Oh well. I was looking forward to running ZM (it looks cool), but my patience is simply exhausted at this point.

Re: Further info

Posted: Thu Jan 19, 2006 9:59 pm
by zoneminder
kdegraaf wrote: zmc_dvideo0[3659].ERR-zm_local_camera.cpp/141 [Failed to set window attributes: Invalid argument]

How do I know which arguments are bad, and how do I fix this?
This is normally something like you have chosen a width, height or palette that is not supported by the driver. If you have an rgb24 palette, try using yuv420p or one of the others as some drivers are a bit touchy. There is also a STRICT_VIDEO_CONFIG option which you can turn off if you find it's objecting for no apparent reason. This will allow it to continue past these kind of errors.
kdegraaf wrote:Also, this concerns me:

zms[3704].DB1-zm_monitor.cpp/1211 [Got 1 monitors]
zms[3704].DB1-zm_monitor.cpp/138 [monitor purpose=0]
zms[3704].DB1-zm_monitor.cpp/141 [shm.size=12288548]
zms[3704].ERR-zm_monitor.cpp/183 [Shared memory not initialised by capture daemon]
This is just zms (the streaming daemon) saying that when it came to look for images in the shared memory, there weren't any, and the shared memory segment didn't look like it had been set up by zmc (the capture daemon). This is true as your first error shows, the zmc process never got started.

Keep the faith! :D