Zoneminder failed after upgrade to 1.24

Forum for questions and support relating to the 1.24.x releases only.
Locked
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

Zoneminder failed after upgrade to 1.24

Post by yochaigal »

Zoneminder functioned fine under 1.23.3-10, but didn't work with ACTi RTSP cameras. I heard that 1.24 does, so I downloaded the source and compiled relatively smoothly. I compiled like this:

./configure --with-webdir=/usr/share/zoneminder --with-cgidir=/usr/lib/cgi-bin/ --with-webuser=www-data --with-webgroup=www-data

Now zoneminder runs, and my old database is up thanks to zmupdate.pl.

However none of my cameras show up on the screen (they are all analog cameras connected to a bt878 card).

Starting zmc from the command line gives this error:

#sudo zmc -d /dev/video0
#sudo less /var/log/syslog

Jun 10 13:07:28 camserver zmc_dvideo0[6354]: INF [Debug Level = 0, Debug Log = <none>]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: INF [Starting Capture]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: ERR [Capture failure for frame 0: Invalid argument]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: ERR [Failed to prime capture of initial monitor]
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: Zoneminder failed after upgrade to 1.24

Post by cordel »

yochaigal wrote: I compiled like this:

./configure --with-webdir=/usr/share/zoneminder --with-cgidir=/usr/lib/cgi-bin/ --with-webuser=www-data --with-webgroup=www-data

Starting zmc from the command line gives this error:

#sudo zmc -d /dev/video0
#sudo less /var/log/syslog

Jun 10 13:07:28 camserver zmc_dvideo0[6354]: INF [Debug Level = 0, Debug Log = <none>]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: INF [Starting Capture]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: ERR [Capture failure for frame 0: Invalid argument]
Jun 10 13:07:28 camserver zmc_dvideo0[6354]: ERR [Failed to prime capture of initial monitor]
This means that something in your configuration in ZM for the capture card is omitted or incorrect. Check and make sure that the image size, palette, type, etc are supported buy the card. Try turning debug up for zmc and see if you get a more descriptive error.
You can use zmu to see what V4L reports the card as capable of.
zmu <d> [-v] [function] [-U<username> -P<password>]
ie. zmu -d /dev/video0 -v -q

Also be sure that when you ran configure, that the configure script picked up ffmpeg as I see you omitted it from the configure line.
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

How do I enable debug mode?

Post by yochaigal »

I noticed /var/log/syslog kept spitting out "debug level: 0" or something like that. How do I turn on more verbose messaging? The compiler script had some debug options turned on by default, I think.
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

I totally forgot to mention

Post by yochaigal »

I am using ubuntu 8.04 on this machine.
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

Post by yochaigal »

zmu gives me this output:

Video Capabilities
Name: BT878 video (GrandTec Multi Cap
Type: 171
Can capture
Can tune
Overlay onto frame buffer
Can clip
Scalable
Video Channels: 4
Audio Channels: 0
Maximum Width: 768
Maximum Height: 480
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 352
Height: 240
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 32768
Colour :32768
Contrast: 32768
Whiteness: 0
Channel 0 Attributes
Name: Composite0
Channel: 0
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 1 - NTSC
Channel 1 Attributes
Name: Composite1
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 1 - NTSC
Channel 2 Attributes
Name: Composite2
Channel: 2
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 1 - NTSC
Channel 3 Attributes
Name: Composite3
Channel: 3
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 1 - NTSC
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Debug can be turned on in options under the debug tab. It's also in the documentation.

I only have half of the picture and have no idea what your settings are so lets start with settings.

Lets set all your monitors on /dev/video0 to the following:
Source Type: local
Function: monitor

Source settings:
Type: v4l2
Device Path: /dev/video0
Device channel: 0 for the fist, 1 for the second, etc..
Format: NTSC
Width: 320
Height: 240
v4l_multi_buffer: disabled

Give those a shot to start
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

Post by yochaigal »

Well, these are pretty much my settings (they were v4l version 1 for the old zoneminder, which worked). The only exception is that there is no plain NTSC option; I've tried all four that are there.

Also, where is the multi_buffer option?

[/img]
yochaigal
Posts: 41
Joined: Wed Jun 25, 2008 1:55 am
Location: San Francisco

Post by yochaigal »

I dropped my old database and started fresh with all the options you specified, including multi_buffer off. I tried NTSC M and NTSC 443 for the format. The debug level is 5. This is the output in syslog:

Jun 10 23:20:13 camserver zmfix[7982]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.07982]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [Debug Level = 0, Debug Log = <none>]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.08000]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [Starting Capture]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: FAT [Failed to set video format: Invalid argument]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Signal address is (nil), from 0xb7faa410]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: [0xb7faa410]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: [0xb7faa410]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: /lib/tls/i686/cmov/libc.so.6(gsignal+0x55) [0xb7add085]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: /lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7adea01]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: zmc [0x80552d3]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: zmc [0x80659bf]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: zmc [0x8065fe4]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: zmc [0x804c262]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7ac8450]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: ERR [Backtrace: zmc(__gxx_personality_v0+0x311) [0x804bd11]]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [Backtrace complete, please execute the following command for more information]
Jun 10 23:20:19 camserver zmc_dvideo0[8000]: INF [addr2line -e zmc(__gxx_personality_v0+0x311) 0xb7faa410 0xb7faa410 0xb7add085 0xb7adea01 0x80552d3 0x80659bf 0x8065fe4 0x804c262 0xb7ac8450 0x804bd11]

and the /tmp/zm_debug* file says:
06/10/09 23:22:11.817560 zmfix[8044].INF-zm_debug.c/292 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.08044]
06/10/09 23:22:11.818003 zmfix[8044].DB1-zmfix.cpp/67 [Permissions on /dev/video0 are ok at 20666]


I also tried V4L 1 because that's what had worked in the past. Result:

syslog:

Jun 10 23:22:11 camserver zmfix[8044]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.08044]
Jun 10 23:22:18 camserver zmc_dvideo0[8062]: INF [Debug Level = 0, Debug Log = <none>]
Jun 10 23:22:18 camserver zmc_dvideo0[8062]: INF [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.08062]
Jun 10 23:22:18 camserver zmc_dvideo0[8062]: INF [Starting Capture]
Jun 10 23:22:18 camserver zmc_dvideo0[8062]: ERR [Capture failure for frame 0: Invalid argument]
Jun 10 23:22:18 camserver zmc_dvideo0[8062]: ERR [Failed to prime capture of initial monitor]

/tmp/zm_debug*:

06/10/09 23:22:18.392723 zmc_dvideo0[8062].INF-zm_debug.c/292 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.08062]
06/10/09 23:22:18.393333 zmc_dvideo0[8062].DB1-zm_monitor.cpp/1708 [Got 1 monitors]
06/10/09 23:22:18.393399 zmc_dvideo0[8062].DB2-zm_local_camera.cpp/287 [V4L2 support enabled, using V4L1 api]
06/10/09 23:22:18.393990 zmc_dvideo0[8062].DB1-zm_monitor.cpp/338 [monitor purpose=1]
06/10/09 23:22:18.394010 zmc_dvideo0[8062].DB1-zm_monitor.cpp/345 [mem.size=9217192]
06/10/09 23:22:18.405539 zmc_dvideo0[8062].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 320x240 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, Mx
FP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
06/10/09 23:22:18.408429 zmc_dvideo0[8062].DB1-zm_monitor.cpp/458 [Monitor New has function 2]
06/10/09 23:22:18.408458 zmc_dvideo0[8062].DB1-zm_monitor.cpp/459 [Monitor New LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
06/10/09 23:22:18.408480 zmc_dvideo0[8062].DB1-zm_monitor.cpp/460 [Monitor New IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
06/10/09 23:22:18.408673 zmc_dvideo0[8062].DB1-zm_zone.cpp/889 [Got 1 zones for monitor New]
06/10/09 23:22:18.408697 zmc_dvideo0[8062].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 319,0 319,239 0,239]
06/10/09 23:22:18.408720 zmc_dvideo0[8062].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 319,0 319,239 0,239']
06/10/09 23:22:18.408740 zmc_dvideo0[8062].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
06/10/09 23:22:18.408759 zmc_dvideo0[8062].DB3-zm_zone.cpp/796 [Got coordinate 319,0 from polygon string]
06/10/09 23:22:18.408774 zmc_dvideo0[8062].DB3-zm_zone.cpp/796 [Got coordinate 319,239 from polygon string]
06/10/09 23:22:18.408790 zmc_dvideo0[8062].DB3-zm_zone.cpp/796 [Got coordinate 0,239 from polygon string]
06/10/09 23:22:18.408810 zmc_dvideo0[8062].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
06/10/09 23:22:18.408832 zmc_dvideo0[8062].DB1-zm_zone.cpp/50 [Initialised zone 1/All - 1 - 320x240 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:2304, MxAP:57600, FB:3x3, MnFP:2304
, MxFP:57600, MnBS:1536, MxBS:0, MnB:1, MxB:0, OF: 0]
06/10/09 23:22:18.411200 zmc_dvideo0[8062].DB1-zm_monitor.cpp/1810 [Loaded monitor 1(New), 1 zones]
06/10/09 23:22:18.411222 zmc_dvideo0[8062].INF-zmc.cpp/186 [Starting Capture]
06/10/09 23:22:18.411317 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/350 [Opening video device /dev/video0]
06/10/09 23:22:18.411390 zmc_dvideo0[8062].DB2-zm_local_camera.cpp/356 [V4L2 support enabled, using V4L1 api]
06/10/09 23:22:18.411414 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/498 [Configuring picture attributes]
06/10/09 23:22:18.411441 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/505 [Old P:4]
06/10/09 23:22:18.411460 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/506 [Old D:24]
06/10/09 23:22:18.411474 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/507 [Old B:32768]
06/10/09 23:22:18.411495 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/508 [Old h:32768]
06/10/09 23:22:18.411511 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/509 [Old Cl:32768]
06/10/09 23:22:18.411526 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/510 [Old Cn:32768]
06/10/09 23:22:18.411552 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/547 [Configuring window attributes]
06/10/09 23:22:18.411571 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/556 [Old X:0]
06/10/09 23:22:18.411588 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/557 [Old Y:0]
06/10/09 23:22:18.411602 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/558 [Old W:352]
06/10/09 23:22:18.411617 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/559 [Old H:240]
06/10/09 23:22:18.411636 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/574 [Setting up request buffers]
06/10/09 23:22:18.411663 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/580 [vmb.frames = 8]
06/10/09 23:22:18.411687 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/581 [vmb.size = 17039360]
06/10/09 23:22:18.411703 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/583 [Setting up 8 frame buffers]
06/10/09 23:22:18.411729 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/608 [Configuring video source]
06/10/09 23:22:18.411751 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/616 [Old C:0]
06/10/09 23:22:18.411811 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/617 [Old F:1]
06/10/09 23:22:18.411829 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/618 [Old Fl:2]
06/10/09 23:22:18.411843 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/619 [Old T:2]
06/10/09 23:22:18.411861 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/634 [New X:0]
06/10/09 23:22:18.411880 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/635 [New Y:0]
06/10/09 23:22:18.411896 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/636 [New W:320]
6/10/09 23:22:18.411910 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/637 [New H:240]
06/10/09 23:22:18.411926 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/642 [New P:4]
06/10/09 23:22:18.411944 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/643 [New D:24]
06/10/09 23:22:18.411960 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/644 [New B:32768]
06/10/09 23:22:18.411974 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/645 [New h:32768]
06/10/09 23:22:18.411988 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/646 [New Cl:32768]
06/10/09 23:22:18.412002 zmc_dvideo0[8062].DB4-zm_local_camera.cpp/647 [New Cn:32768]
06/10/09 23:22:18.412017 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/650 [Setting up static colour tables]
06/10/09 23:22:18.412040 zmc_dvideo0[8062].DB2-zm_local_camera.cpp/1140 [Priming capture]
06/10/09 23:22:18.412057 zmc_dvideo0[8062].DB3-zm_local_camera.cpp/1172 [Queueing frame 0]
06/10/09 23:22:18.412095 zmc_dvideo0[8062].ERR-zm_local_camera.cpp/1175 [Capture failure for frame 0: Invalid argument]
06/10/09 23:22:18.412131 zmc_dvideo0[8062].ERR-zmc.cpp/199 [Failed to prime capture of initial monitor]
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Assuming that you still had v4l2 selected with the above output:
zmc_dvideo0[8062].DB2-zm_local_camera.cpp/356 [V4L2 support enabled, using V4L1 api]
Seems for some reason that it wants to use the v4l1 ap anyway or do you have v4l1 set at this point?

zmc_dvideo0[8062].ERR-zm_local_camera.cpp/1175 [Capture failure for frame 0: Invalid argument]
Still have something set in ZM that v4l thinks is not appropriate and it is that setting that needs to be tracked down by a bit of trial and error.

Do you have the palette set to rgb24?
Did you leave any setting blank?
Locked