Page 1 of 1

I Cant get working any camera Debian with Lenny

Posted: Sun Oct 17, 2010 12:01 pm
by subnic
Hi guys,

I've been playing around with ZoneMinder for a while but i can't get working my IP camera, i've been looking and reading the wiki, i've tryed the shared memory trick and every think i found or figured out, but without luck.

This is my system:

Code: Select all

ZoneMinder 1.24.2
Linux Debian Lenny
Vivotek PT32x7 IP Camera
ZoneMinder is working in the system and it looks just well. When i configure the camera using the JPG file mode i can't get any image, the viewer is black.

if i put this address in my browser i can get the camera image just fine:

Code: Select all

http://user:password@<ip>:<port>/cgi-bin/video.jpg
When i start looking for a fix i found about the shared memory and i calculate the value for my system and increase the memory but it is still not working.

this is the te output with the command tail -f /tmp/zm*

Code: Select all

==> /tmp/zmfilter.log <08> /tmp/zmpkg.log <10> /tmp/zmupdate.log <08> /tmp/zmwatch.log <==
10/17/10 13:40:08.240819 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:40:18.243212 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:40:28.245504 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:40:38.247862 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:40:48.250408 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:40:58.252860 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:08.255369 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:18.257846 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:28.260364 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:38.262889 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:48.265341 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:41:58.267860 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
10/17/10 13:42:08.270332 zmwatch[28712].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
And the messages from /var/log/

INFO:

Code: Select all

Oct 17 13:13:11 jfp-dual zmc_m3[28922]: INF [Debug Level = 0, Debug Log = <none>]
Oct 17 13:13:11 jfp-dual zmdc[28682]: INF ['zmc -m 3' crashed, signal 6]
Oct 17 13:14:30 jfp-dual zmdc[28682]: INF [Starting pending process, zmc -m 1]
Oct 17 13:14:30 jfp-dual zmdc[28682]: INF ['zmc -m 1' starting at 10/10/17 13:14:30, pid = 28924]
Oct 17 13:14:30 jfp-dual zmdc[28924]: INF ['zmc -m 1' started at 10/10/17 13:14:30]
Oct 17 13:14:30 jfp-dual zmc_m1[28924]: INF [Debug Level = 0, Debug Log = <none>]
Oct 17 13:14:30 jfp-dual zmc_m1[28924]: INF [Starting Capture]
Oct 17 13:15:51 jfp-dual zmdc[28682]: INF [Starting pending process, zmc -m 3]
Oct 17 13:15:51 jfp-dual zmdc[28682]: INF ['zmc -m 3' starting at 10/10/17 13:15:51, pid = 28931]
Oct 17 13:15:51 jfp-dual zmdc[28931]: INF ['zmc -m 3' started at 10/10/17 13:15:51]
Oct 17 13:15:51 jfp-dual zmc_m3[28931]: INF [Debug Level = 0, Debug Log = <none>]
Oct 17 13:15:51 jfp-dual zmdc[28682]: INF ['zmc -m 3' crashed, signal 6]
Oct 17 13:21:11 jfp-dual zmdc[28682]: INF [Starting pending process, zmc -m 3]
Oct 17 13:21:11 jfp-dual zmdc[28682]: INF ['zmc -m 3' starting at 10/10/17 13:21:11, pid = 28958]
Oct 17 13:21:11 jfp-dual zmdc[28958]: INF ['zmc -m 3' started at 10/10/17 13:21:11]
WARNING:

Code: Select all

Oct 17 12:45:21 jfp-dual zms[28735]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 12:45:31 jfp-dual zmu[28737]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 12:45:31 jfp-dual zmu[28739]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 12:45:36 jfp-dual zms[28740]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 12:48:51 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zmc -m 3']
Oct 17 12:48:52 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 12:49:11 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 12:49:38 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 12:49:54 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 13:10:05 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 13:10:10 jfp-dual zms[28894]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 13:10:10 jfp-dual zms[28894]: WAR [Unable to store frame as shared memory invalid]
Oct 17 13:10:37 jfp-dual zmdc[28682]: WAR [Can't find process with command of 'zma -m 3']
Oct 17 13:10:59 jfp-dual zms[28917]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 17 13:10:59 jfp-dual zms[28917]: WAR [Unable to store frame as shared memory invalid]
I can't figure out why is not working, i'll apreciate any ideas or info that could be usefull!

Thanks you very much.

Posted: Mon Oct 18, 2010 6:05 am
by Flash_
You may need to recheck the shared memory settings.

What resolution are we looking at here? The wiki figures work for 640x480 but if you're a megapixel camera then you'll need to at least double them.

Posted: Mon Oct 18, 2010 7:42 am
by subnic
Hello and thanks for reply :)

I've been playing with the shared memory, i calculated with the FAQ tutorial the amount of memory i need as follow:

Code: Select all

352*288px * 24bit color * 80 frames buffer * 1.1 (+ 10%) = 29196288 bytes
and then i set it for my session:

Code: Select all

echo 29196288>/proc/sys/kernel/shmall
but the result is same, same logs and it is still not working.

I've tried as well leaving the shared memory as i explained and change the camera configuration to

Code: Select all

100*75px * 8bit color * 40 frames
but ti is still not working, just a black square...

any ideas? do you think it could be usefull to recompile ZM with MMAP or something?

thanks in advanced.

Posted: Mon Oct 18, 2010 5:55 pm
by bumann
Recompile it with mmap!
What cam settings you exactly do ?

Posted: Tue Oct 19, 2010 7:45 am
by subnic
Hi, first of all thanks for the reply :)

My system is a Dual PIII 933Mhz wirh 512Mb RAM running Debian Lenny, i want to use just one IP camera for now (the vivotek) what is 352x288px but i culdn't get it working.

I'm gonna try to recompile it and i'll tell you.

by the way, compiling with nmap is encesary to tweak the shared memory as well?

Thanks!

Posted: Tue Oct 19, 2010 11:18 am
by subnic
I've been owrking around the problem, i followed the next steps:

- Uninstall ZoneMinder (everything even the DB)
- Recompile/reinstall Zoneminder with mmap

but i'm still having the same problem, i can't watch my camera. Now the logs are diferent, as:

Code: Select all

/var/log/messages 

Oct 19 12:56:11 jfp-dual zms[4285]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 19 12:56:11 jfp-dual zms[4285]: WAR [Unable to store frame as shared memory invalid]
Oct 19 12:56:18 jfp-dual zms[4285]: WAR [Unable to store frame as timestamp invalid]
Oct 19 12:56:18 jfp-dual zms[4285]: WAR [Unable to store frame as shared memory invalid]
Oct 19 12:56:26 jfp-dual zms[4285]: WAR [Rewound over write index, resuming live play]
Oct 19 12:56:39 jfp-dual zms[4289]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 19 12:56:39 jfp-dual zms[4289]: WAR [Unable to store frame as shared memory invalid]
Oct 19 12:56:49 jfp-dual zmdc[4245]: WAR [Can't find process with command of 'zma -m 1']
Oct 19 12:56:54 jfp-dual zms[4308]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
Oct 19 12:56:54 jfp-dual zms[4308]: WAR [Unable to store frame as shared memory invalid]
Oct 19 12:59:00 jfp-dual zmdc[4245]: WAR [Can't find process with command of 'zma -m 1']

Code: Select all

/tmp/zmdc.log

10/19/10 12:59:15.376980 zmdc[4245].ERR ['zmc -m 1' exited abnormally, exit status 255]
10/19/10 12:59:35.074373 zmdc[4245].INF [Starting pending process, zmc -m 1]
10/19/10 12:59:35.077027 zmdc[4245].INF ['zmc -m 1' starting at 10/10/19 12:59:35, pid = 4339]
10/19/10 12:59:35.457722 zmdc[4245].ERR ['zmc -m 1' exited abnormally, exit status 255]
10/19/10 13:00:15.058371 zmdc[4245].INF [Starting pending process, zmc -m 1]
10/19/10 13:00:15.060909 zmdc[4245].INF ['zmc -m 1' starting at 10/10/19 13:00:15, pid = 4344]
10/19/10 13:00:15.387069 zmdc[4245].ERR ['zmc -m 1' exited abnormally, exit status 255]
10/19/10 13:01:35.086380 zmdc[4245].INF [Starting pending process, zmc -m 1]
10/19/10 13:01:35.088995 zmdc[4245].INF ['zmc -m 1' starting at 10/10/19 13:01:35, pid = 4369]
10/19/10 13:01:35.422802 zmdc[4245].ERR ['zmc -m 1' exited abnormally, exit status 255]

/tmp/zmfilter.log

10/19/10 12:56:03.861905 zmfilter[4271].INF [Scanning for events]

/tmp/zmpkg.log

10/19/10 12:55:57.909510 zmpkg[4238].INF [Command: start]

/tmp/zmupdate.log

10/19/10 12:56:05.242636 zmupdate[4278].INF [Checking for updates]
10/19/10 12:56:05.937521 zmupdate[4278].INF [Got version: '1.24.2']

/tmp/zmwatch.log

10/19/10 12:56:04.558413 zmwatch[4276].INF [Watchdog starting]
10/19/10 12:56:04.559757 zmwatch[4276].INF [Watchdog pausing for 30 seconds]
The configuration i'm using for the camera is:

Code: Select all

GENERAL:

Source Type -> Remote
Function -> Monitor
Enabled -> True

SOURCE:

Remote Protocol	-> HTTP
Remote Method	-> regexp
Remote Host Name -> user:pass@local-ip	 
Remote Host Port -> 55444	
Remote Host Path -> /cgi-bin/video.jpg	
Remote Image Colours -> 24 bit	
Capture Width (pixels) -> 352px
Capture Height (pixels)	-> 288px
Preserve Aspect Ratio -> NO	
Orientation -> Normal	
what is for the Remote Method option? what is the diference between simple and regexp?

I don't know what else to try, i will apreciate any help!!

thanks everyone

Posted: Tue Oct 19, 2010 4:22 pm
by KeithB
shmall is the total size of RAM linux is permitted it to use. The value you calculated should go in shmmax. The value you should put in shmall should be something a bit less than the total RAM on the machine.

Posted: Wed Oct 20, 2010 6:14 am
by Flash_
As KeithB says, you're only doing half the steps for the current session

From the wiki

Code: Select all

echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax
That should be ample for a up to 640x480 .

Posted: Wed Oct 20, 2010 9:45 am
by subnic
Hi Flash_ I have changed the values as follow:

Code: Select all

kernel.shmall = 536870912
kernel.shmmax = 524288000
But it is still not working...

Why i have to change the shared memory settings if i'm ussing mmap now?

I've tried as well, installing ZoneMinder in antoher computer with Ubuntu 10.4 Descktop (AMD 64 4200+, 2GB RAM) but i'm having the same problem, i'm not able to get any frame from the camera...

Is my config settings (se above) right for a camera giving to me a JPG file?

I can do MPEG streaming too but i think this use a propietary protocol from Vivotek...

I keep trying... Thanks for your help.