having trouble with zoneminder 1.24.2 on ubuntu 10.04 server

Forum for questions and support relating to the 1.24.x releases only.
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

having trouble with zoneminder 1.24.2 on ubuntu 10.04 server

Post by dmb2002man »

I have installed zoneminder running apt-get install zoneminder and it installs correctly. I am able to connect from a wepage to it and setup video0 and video1 but nothing happens. The video screen opens but nothing plays. I am running a wintv-pvr 150 and wintv-pvr-250 card. I know both cards are working fine as i go under dmesg and see them installed with no errors. I also run: dmesg | grep Initialized

[ 10.442558] ivtv0: Initialized card: Hauppauge WinTV PVR-150
[ 11.513321] ivtv1: Initialized card: Hauppauge WinTV PVR-250


under cd /dev i see this.

video0
video1
video24
video25
video32
video33

i then test the video by typing.

cat /dev/video0 > /home/joe/test_captureTEST5000.mpg (this plays back in vlc player fine)

i then test video1.

cat /dev/video1 > /home/joe/test_captureTEST6000.mpg (this one plays back in vlc player fine too.

When i run v412-ctl -T, i get 99% signal on the video0, then i run v4l2-ctl --device=/dev/video1 -T and i get 99% on video1 signal too.

Now i just need help on getting zoneminder to play the video as i setup video0 and video1 in zoneminder and it installed properly.

i installed zoneminder by running. sudo apt-get install zoneminder

also shared memory is setup.

root@ubuntu-test:~# sudo sysctl -p
kernel.shmall = 134217728
kernel.shmmax = 134217728
root@ubuntu-test:~# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 536870912
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 713
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

root@ubuntu-test:~#


SOMEONE PLEASE HELP ME WITH THIS.

thanks
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

nobody can answer my question?

i tried this and still no luck. http://www.zoneminder.com/wiki/index.ph ... 29_Desktop

Image

Image
keyboardgnome
Posts: 63
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome »

Check your AppArmor settings, if there are any; this is a new feature that stumped me before.
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

keyboardgnome wrote:Check your AppArmor settings, if there are any; this is a new feature that stumped me before.
here is my apparmor setting status. It shows its loaded.

apparmor module is loaded.
5 profiles are loaded.
5 profiles are in enforce mode.
/sbin/dhclient3
/usr/lib/NetworkManager/nm-dhcp-client.action
/usr/lib/connman/scripts/dhclient-script
/usr/sbin/mysqld
/usr/sbin/tcpdump
0 profiles are in complain mode.
2 processes have profiles defined.
1 processes are in enforce mode :
/usr/sbin/mysqld (654)
0 processes are in complain mode.
1 processes are unconfined but have a profile defined.
/sbin/dhclient3 (572)



Here is also my signal for video0 and video1.

Tuner:
Name : ivtv TV Tuner
Capabilities : 62.5 kHz multi-standard stereo lang1 lang2
Frequency range : 44.0 MHz - 958.0 MHz
Signal strength/AFC : 99%/0
Current audio mode : stereo
Available subchannels: stereo
root@ubuntu-test:~# v4l2-ctl --device=/dev/video0 -T
Tuner:
Name : ivtv TV Tuner
Capabilities : 62.5 kHz multi-standard stereo lang1 lang2
Frequency range : 44.0 MHz - 958.0 MHz
Signal strength/AFC : 99%/0
Current audio mode : lang1
Available subchannels: mono lang2
root@ubuntu-test:~#


anyone please help me out with getting zoneminder to work.
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

i figured someone on this forum could help me with my problem but still no answers. 252 views and only 1 reply. I gave alot of information and everything seems well with the setup of zoneminder and ubuntu 10.04 with wintv-pvr 150 and 250 cards. So not sure why zoneminder wont show the videos.

-----i found this on a forum

Once you have configured your first device, you can test that there are no permission problems by starting zmc using the www-data user:
sudo su www-data -c 'zmc --device /dev/video1'

If this is capturing, it should not return until you hit Ctrl-C. If it returns immediately, you have a problem.



***I run this command on video0 and video1 and it returns immediately to a prompt and they suggested if it does, then there is a problem.
Yamanipanuchi

Post by Yamanipanuchi »

These forums seem to be pretty dead actually. I haven't got many answers myself.

I've some into similar problem with my camera's. I would first check /var/log/messages and see what type of error's you are getting.

Type
tail /var/log/messages

Most likely your getting a shared memory error. Most of the problems I had I was able to resolve by looking in /var/log/messages. Some of them I just took the error and pasted it into Google and found and answer somewhere.

It ended up being the rights for apache. I gave apache the necessary rights and it started to work.

I ran into lots of different problems but that's a common one I've worked with.
Last edited by Yamanipanuchi on Tue Nov 09, 2010 7:53 pm, edited 1 time in total.
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

Yamanipanuchi wrote:These forums seem to be pretty dead actually. I haven't got many answers myself.

I've some into similar problem with my camera's. I would first check /var/log/messages and see what type of error's you are getting.

Type
tail /var/log/messages

Most likely you getting a shared memory error. Most of the problems I had I was able to resolve by looking in /var/log/messages. Some of them I just took the error and pasted it into Google and found and answer somewhere.

It ended up being the right for apache. I gave apache the necessary rights and it started to work.

I ran into lots of different problems but that's a common one I've worked with.
here is my log messages and i dont really see any errors.

root@ubuntu-test:~# tail /var/log/messages
Nov 9 06:28:35 ubuntu-test zmdc[12921]: INF ['zmc -d /dev/video1' started at 10 /11/09 06:28:35]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Debug Level = 0, Debug Log = <none>]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Starting Capture]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Got signal 6 (Aborted), exi ting and forcing backtrace]
Nov 9 06:33:42 ubuntu-test zmdc[12409]: INF [Starting pending process, zmc -d / dev/video0]
Nov 9 06:33:42 ubuntu-test zmdc[12409]: INF ['zmc -d /dev/video0' starting at 1 0/11/09 06:33:42, pid = 12933]
Nov 9 06:33:42 ubuntu-test zmdc[12933]: INF ['zmc -d /dev/video0' started at 10 /11/09 06:33:42]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Debug Level = 0, Debug Log = <none>]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Starting Capture]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Got signal 6 (Aborted), exi ting and forcing backtrace]
root@ubuntu-test:~#
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

dmb2002man wrote:
Yamanipanuchi wrote:These forums seem to be pretty dead actually. I haven't got many answers myself.

I've some into similar problem with my camera's. I would first check /var/log/messages and see what type of error's you are getting.

Type
tail /var/log/messages

Most likely you getting a shared memory error. Most of the problems I had I was able to resolve by looking in /var/log/messages. Some of them I just took the error and pasted it into Google and found and answer somewhere.

It ended up being the right for apache. I gave apache the necessary rights and it started to work.

I ran into lots of different problems but that's a common one I've worked with.
here is my log messages and i dont really see any errors.

root@ubuntu-test:~# tail /var/log/messages
Nov 9 06:28:35 ubuntu-test zmdc[12921]: INF ['zmc -d /dev/video1' started at 10 /11/09 06:28:35]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Debug Level = 0, Debug Log = <none>]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Starting Capture]
Nov 9 06:28:35 ubuntu-test zmc_dvideo1[12921]: INF [Got signal 6 (Aborted), exi ting and forcing backtrace]
Nov 9 06:33:42 ubuntu-test zmdc[12409]: INF [Starting pending process, zmc -d / dev/video0]
Nov 9 06:33:42 ubuntu-test zmdc[12409]: INF ['zmc -d /dev/video0' starting at 1 0/11/09 06:33:42, pid = 12933]
Nov 9 06:33:42 ubuntu-test zmdc[12933]: INF ['zmc -d /dev/video0' started at 10 /11/09 06:33:42]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Debug Level = 0, Debug Log = <none>]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Starting Capture]
Nov 9 06:33:42 ubuntu-test zmc_dvideo0[12933]: INF [Got signal 6 (Aborted), exi ting and forcing backtrace]
root@ubuntu-test:~#



root@ubuntu-test:~# zmu -d /dev/video0 -q -v
Error, failed to query crop capabilities /dev/video0: Invalid argument




root@ubuntu-test:~# v4lctl -c /dev/video0 list
attribute | type | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm | choice | NTSC-M | NTSC | NTSC NTSC-M NTSC-M-JP NTSC-M-KR NTSC-443 PAL PAL-BG PAL-H PAL-I PAL-DK PAL-M PAL-N PAL-Nc PAL-60 SECAM SECAM-B
input | choice | Composi | Tuner 1 | Tuner 1 S-Video 1 Composite 1 S-Video 2 Composite 2
audio mode | choice | lang1 | mono | mono stereo lang1 lang2
bright | int | 128 | 128 | range is 0 => 255
contrast | int | 64 | 64 | range is 0 => 127
color | int | 64 | 64 | range is 0 => 127
hue | int | 0 | 0 | range is -128 => 127
volume | int | 60928 | 60928 | range is 0 => 65535
Balance | int | 32768 | 32768 | range is 0 => 65535
Bass | int | 32768 | 32768 | range is 0 => 65535
Treble | int | 32768 | 32768 | range is 0 => 65535
mute | bool | off | off |
root@ubuntu-test:~# cd /tmp
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

First thing you should try to get working is one camera at the lowest resolution 320x240 and also b/w once you get that working you can move up to the higher resolution.

This way you can determine if it the capture card, shared mem, or other errors.
johnb
Posts: 2
Joined: Tue Nov 09, 2010 11:56 pm

Post by johnb »

I am getting the same problem, same symptoms as the OP. After turning on debug output, I found the following error in zm_debug.log:

11/09/10 15:51:53.160832 zmc_dvideo1[13803].DB3-zm_zone.cpp/796 [Got coordinate 0,239 from polygon string]
11/09/10 15:51:53.160880 zmc_dvideo1[13803].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
11/09/10 15:51:53.160925 zmc_dvideo1[13803].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]
11/09/10 15:51:53.171572 zmc_dvideo1[13803].DB1-zm_monitor.cpp/1814 [Loaded monitor 1(Monitor-1), 1 zones]
11/09/10 15:51:53.171640 zmc_dvideo1[13803].INF-zmc.cpp/188 [Starting Capture]
11/09/10 15:51:53.171842 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video1]
11/09/10 15:51:53.172220 zmc_dvideo1[13803].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L1 api]
11/09/10 15:51:53.172282 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/502 [Configuring picture attributes]
11/09/10 15:51:53.172357 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/509 [Old P:0]
11/09/10 15:51:53.172410 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/510 [Old D:8]
11/09/10 15:51:53.172468 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/511 [Old B:0]
11/09/10 15:51:53.172517 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/512 [Old h:0]
11/09/10 15:51:53.172563 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/513 [Old Cl:0]
11/09/10 15:51:53.172609 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/514 [Old Cn:32896]
11/09/10 15:51:53.172667 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/551 [Configuring window attributes]
11/09/10 15:51:53.172723 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/560 [Old X:0]
11/09/10 15:51:53.172770 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/561 [Old Y:0]
11/09/10 15:51:53.172816 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/562 [Old W:640]
11/09/10 15:51:53.172862 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/563 [Old H:480]
11/09/10 15:51:53.172915 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/578 [Setting up request buffers]
11/09/10 15:51:53.173125 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/584 [vmb.frames = 4]
11/09/10 15:51:53.173177 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/585 [vmb.size = 475136]
11/09/10 15:51:53.173224 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/587 [Setting up 4 frame buffers]
11/09/10 15:51:53.173456 zmc_dvideo1[13803].DB3-zm_local_camera.cpp/612 [Configuring video source]
11/09/10 15:51:53.173590 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/620 [Old C:0]
11/09/10 15:51:53.173634 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/621 [Old F:0]
11/09/10 15:51:53.173672 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/622 [Old Fl:0]
11/09/10 15:51:53.173711 zmc_dvideo1[13803].DB4-zm_local_camera.cpp/623 [Old T:2]
11/09/10 15:51:53.173788 zmc_dvideo1[13803].ERR-zm_local_camera.cpp/630 [Failed to set camera source 0: Invalid argument]

Any ideas?
johnb
Posts: 2
Joined: Tue Nov 09, 2010 11:56 pm

Post by johnb »

Switched the monitor Source settings to Video for Linux 2 (previously 1) and got a nice segfault trace:

11/09/10 16:19:16.176978 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video1]
11/09/10 16:19:16.177073 zmc_dvideo1[14057].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L2 api]
11/09/10 16:19:16.177126 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/360 [Checking video device capabilities]
11/09/10 16:19:16.177207 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/370 [Setting up video format]
11/09/10 16:19:16.177280 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/399 [Setting up request buffers]
11/09/10 16:19:16.177505 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/427 [Setting up 8 data buffers]
11/09/10 16:19:16.177678 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/465 [Configuring video source]
11/09/10 16:19:16.177747 zmc_dvideo1[14057].WAR-zm_local_camera.cpp/1219 [Brightness control is not supported]
11/09/10 16:19:16.177831 zmc_dvideo1[14057].INF-zm_local_camera.cpp/1220 [Brightness 1 0]
11/09/10 16:19:16.177912 zmc_dvideo1[14057].WAR-zm_local_camera.cpp/1279 [Hue control is not supported]
11/09/10 16:19:16.178066 zmc_dvideo1[14057].WAR-zm_local_camera.cpp/1336 [Saturation control is not supported]
11/09/10 16:19:16.178232 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/654 [Setting up static colour tables]
11/09/10 16:19:16.178338 zmc_dvideo1[14057].DB2-zm_local_camera.cpp/1439 [Priming capture]
11/09/10 16:19:16.178395 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1443 [Queueing buffers]
11/09/10 16:19:16.178478 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1459 [Starting video stream]
11/09/10 16:19:18.089299 zmc_dvideo1[14057].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
11/09/10 16:19:18.089515 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1491 [Capturing]
11/09/10 16:19:18.089608 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1514 [Capturing 1 frames]
11/09/10 16:19:18.163293 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1538 [Captured frame 0/1 from channel 0]
11/09/10 16:19:18.163418 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1572 [Doing format conversion]
11/09/10 16:19:18.163500 zmc_dvideo1[14057].DB3-zm_local_camera.cpp/1878 [Assigning image]
11/09/10 16:19:18.163748 zmc_dvideo1[14057].INF-zm_signal.cpp/72 [Got signal 11 (Segmentation fault), crashing]

Any workarounds or should I check out the source?
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

kingofkya wrote:First thing you should try to get working is one camera at the lowest resolution 320x240 and also b/w once you get that working you can move up to the higher resolution.

This way you can determine if it the capture card, shared mem, or other errors.
i have tried getting 1 to work and no luck. I tried the 320x240 in black and white. Its funny i can do this though. The cards are working just fine. Just not working in zoneminder.

cat /dev/video0 > /home/joe/test_captureTEST5000.mpg (this plays back in vlc player fine)

cat /dev/video1 > /home/joe/test_captureTEST6000.mpg (this one plays back in vlc player fine too.

Here is my zoneminder with only 1 monitor configured. It shows the video is done loading but doesnt play nothing.

Image

Also enabled debugging and ran this command.


root@ubuntu-test:~# tail -f /var/log/syslog
Nov 12 04:22:50 ubuntu-test zmdc[21427]: ERR ['zmc -d /dev/video' exited abnormally, exit status 6]
Nov 12 04:25:30 ubuntu-test zmdc[21427]: INF [Starting pending process, zmc -d /dev/video]
Nov 12 04:25:30 ubuntu-test zmdc[21427]: INF ['zmc -d /dev/video' starting at 10/11/12 04:25:30, pid = 21483]
Nov 12 04:25:30 ubuntu-test zmdc[21483]: INF ['zmc -d /dev/video' started at 10/11/12 04:25:30]
Nov 12 04:25:30 ubuntu-test zmc_dvideo[21483]: INF [Debug Level = 0, Debug Log = <none>]
Nov 12 04:25:30 ubuntu-test zmc_dvideo[21483]: INF [New Debug Level = 9, New Debug Log = /tmp/zm_debug .log.21483]
Nov 12 04:25:30 ubuntu-test zmc_dvideo[21483]: INF [Starting Capture]
Nov 12 04:25:30 ubuntu-test zmc_dvideo[21483]: FAT [Failed to stat video device /dev/video: No such fi le or directory]
Nov 12 04:25:30 ubuntu-test zmc_dvideo[21483]: INF [Got signal 6 (Aborted), exiting and forcing backtr ace]
Nov 12 04:25:30 ubuntu-test zmdc[21427]: ERR ['zmc -d /dev/video' exited abnormally, exit status 6]


root@ubuntu-test:/tmp# ls
zmaudit.log zm_debug.log.21417 zm_debug.log.21451 zm_debug.log.21471 zm_debug.log.21483 zmswap-m1 zmswap-m4
zmdc.log zm_debug.log.21425 zm_debug.log.21458 zm_debug.log.21474 zmfilter.log zmswap-m2 zmwatch.log
zmdc.sock zm_debug.log.21449 zm_debug.log.21459 zm_debug.log.21476 zmpkg.log zmswap-m3



root@ubuntu-test:/tmp# tail /tmp/zm_debug.log.21476
11/12/10 04:22:50.271736 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:6, y:239.00]
11/12/10 04:22:50.271777 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:5, y:239.00]
11/12/10 04:22:50.271817 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:4, y:239.00]
11/12/10 04:22:50.271856 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:3, y:239.00]
11/12/10 04:22:50.271896 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:2, y:239.00]
11/12/10 04:22:50.271936 zmc_dvideo[21476].DB9-zm_image.cpp/1316 [x:1, y:239.00]
11/12/10 04:22:50.276565 zmc_dvideo[21476].DB1-zm_monitor.cpp/1814 [Loaded monitor 4(ServerRoom), 1 zones]
11/12/10 04:22:50.276624 zmc_dvideo[21476].INF-zmc.cpp/188 [Starting Capture]
11/12/10 04:22:50.277329 zmc_dvideo[21476].FAT-zm_local_camera.cpp/344 [Failed to stat video device /dev/video: No such file or directory]
11/12/10 04:22:50.277840 zmc_dvideo[21476].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]

root@ubuntu-test:/tmp# ls -l /dev/video0
crw-rw-rw- 1 root video 81, 0 2010-11-04 06:43 /dev/video0
root@ubuntu-test:/tmp# ls -l /dev/video1
crw-rw-rw- 1 root video 81, 4 2010-11-04 06:43 /dev/video1


PLEASE HELP!
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

Is there other recording programs out there that would work with my setup???????????????????????? I cant get zoneminder to work as it might be incompatible with the cameras.
dmb2002man
Posts: 28
Joined: Thu Nov 04, 2010 2:39 pm

Post by dmb2002man »

WHAT ABOUT TRYING MY CARDS IN A WINDOWS XP BOX.
Alan87i
Posts: 116
Joined: Sun Jul 27, 2008 9:58 am

Post by Alan87i »

$ sudo adduser www-data video (did you do this ?)
Check if www-data is in the video group. cat /etc/group | more
Locked