Increasing Resolution

Support and queries relating to all previous versions of ZoneMinder
Locked
Ruler
Posts: 235
Joined: Mon Nov 08, 2004 9:02 pm
Location: Bay City, MI

Increasing Resolution

Post by Ruler »

I have two systems running ZoneMinder - one using Slackware 10.0 and ZoneMinder 1.19.5 and another running Slackware 10.1 and ZoneMinder 1.21.0. (I'm using 2.4.x kernels for both with the appropriate patches applied.) Everything works perfectly with one exception - I cannot increase the resolution from 320x240.

I used xawtv to capture a frame off of the /dev/video0 device and it captured at 640x480, which is what I want. However, when I change the resolution under the Source tab of the monitor properties in ZoneMinder, both the camera I'm changing and the monitor on the second channel of the same device turn red. I also tried tried setting the resolution on the monitors on both channels to the same resolution with no success; both monitors remain red. I've tried PAL (instead of NTSC) 768x576 with the same results. I don't believe it's a hardware or driver problem because xawtv captures at 640x480.

I'm using the Spectra-8 video capture card - it's a 4-chip bt878 based board. It's supposed to be able to do 768x576 at 30fps for each input, a total of 120fps. Adding 4 more inputs to it (using the second channel of each device), the resolution stays the same and the frames per second get cut in half. (FPS really doesn't matter as I want to capture at 2.) I've added the following line to /etc/modules.conf as instructed by the manual for this board.

Code: Select all

 /etc/modules.conf
options bttv card=42,42,42,42 radio=0 tuner=4 sloppy=1 chroma_agc=1 mmap=1 vbibufs=4 v4l2=1 gbuffers=16

Are there any tricks to increase the resolution in ZoneMinder that I'm missing?
User avatar
thelight
Posts: 54
Joined: Sat Jun 26, 2004 9:25 pm
Contact:

Post by thelight »

Have you checked your /var/log/messages and zoneminder logs? You may find this is a shared memory issue due to the increased amount of memory using a large resolution requires.
Ruler
Posts: 235
Joined: Mon Nov 08, 2004 9:02 pm
Location: Bay City, MI

Logfile Contents

Post by Ruler »

Thanks for the idea thelight - I can't believe I didn't think of checking the log files myself. I set all monitors but one to "None" as the function, increased the resolution on the one that was still set to record, stopped zoneminder, removed the logs that were there, started zoneminder, let it run for a minute, then stopped it and copied the logs out that were created.

Anyways, /var/log/messages has nothing of interest in it that I could see. Likewise with zmaudit and zmfilter. However, the rest of the zoneminder logs have contents of varying degrees of interest. Here they are in increasing order of interest.

Code: Select all

 zmpkg.log
Command: start
Executing: /usr/local/bin/zmdc.pl check
Removing shared memory
Executing: /usr/local/bin/zmfix
Executing: /usr/local/bin/zmdc.pl status
Executing: /usr/local/bin/zmdc.pl start zmc -d 0
Executing: /usr/local/bin/zmdc.pl start zma -m 1
Executing: /usr/local/bin/zmdc.pl start zmfilter.pl
Executing: /usr/local/bin/zmdc.pl start zmaudit.pl -d 900 -y
Executing: /usr/local/bin/zmdc.pl start zmwatch.pl
Command: stop
Executing: /usr/local/bin/zmdc.pl check
Executing: /usr/local/bin/zmdc.pl shutdown
Removing shared memory

Code: Select all

 zmdc.log
Server starting at 05/04/20 12:36:38
'zmc -d 0' starting at 05/04/20 12:36:41, pid = 12632
'zmc -d 0' started at 05/04/20 12:36:41
'zmc -d 0' crashed at 05/04/20 12:36:41, exit status 255
'zmc -d 0' starting at 05/04/20 12:36:41, pid = 12633
'zmc -d 0' started at 05/04/20 12:36:41
'zmc -d 0' crashed at 05/04/20 12:36:41, exit status 255
Can't select: No child processes at /usr/local/bin/zmdc.pl line 593.
Server starting at 05/04/20 12:36:41
'zma -m 1' starting at 05/04/20 12:36:44, pid = 12656
'zma -m 1' started at 05/04/20 12:36:44
'zma -m 1' crashed at 05/04/20 12:36:44, exit status 255
'zma -m 1' starting at 05/04/20 12:36:44, pid = 12658
'zma -m 1' started at 05/04/20 12:36:44
'zma -m 1' crashed at 05/04/20 12:36:44, exit status 255
Can't select: No child processes at /usr/local/bin/zmdc.pl line 593.
Server starting at 05/04/20 12:36:44
'zmfilter.pl' starting at 05/04/20 12:36:47, pid = 12680
'zmfilter.pl' started at 05/04/20 12:36:47
'zmaudit.pl -d 900 -y' starting at 05/04/20 12:36:47, pid = 12682
'zmaudit.pl -d 900 -y' started at 05/04/20 12:36:47
'zmwatch.pl' starting at 05/04/20 12:36:47, pid = 12684
'zmwatch.pl' started at 05/04/20 12:36:47
'zmfilter.pl ' stopping at 05/04/20 12:37:46
'zmfilter.pl ' died at 05/04/20 12:37:46, signal 14
'zmaudit.pl -d 900 -y' stopping at 05/04/20 12:37:46
'zmaudit.pl -d 900 -y' died at 05/04/20 12:37:46, signal 14
'zmwatch.pl ' stopping at 05/04/20 12:37:46
'zmwatch.pl ' died at 05/04/20 12:37:46, signal 14
Can't find child with pid of '12723'
Can't find child with pid of '12733'
Server shutdown at 05/04/20 12:37:56

Code: Select all

 zmwatch.log
Watchdog starting at 05/04/20 12:36:48
Watchdog pausing for 30 seconds
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory
Can't get shared memory id '2053971969': No such file or directory

I'm guessing that the shared memory errors in zmwatch.log are an indication of the cause of the problem, but really have no idea as to how to proceed.
User avatar
thelight
Posts: 54
Joined: Sat Jun 26, 2004 9:25 pm
Contact:

Post by thelight »

Im not sure about slackware, but my system runs fedora core 2 and I can adjust my shared memory resources by editing the /etc/sysctl.conf file with the following values:

# zm shared memory settings
kernel.shmmax = 645756000
kernel.shmall = 645756000

The numbers (size of shared memory) used obvious depend on how much your video needs, and how much ram you actually have. You'll probably need to experiment with this. Im now running 3 camera's with a spectra8 card, at full 768x576 resolution and they pretty much take up all of my ram (640mb).
Ruler
Posts: 235
Joined: Mon Nov 08, 2004 9:02 pm
Location: Bay City, MI

Post by Ruler »

You got it dude - that fixed it right away. I created /etc/sysctl.conf and added those two lines except I used 536870912 instead though (512 meg or 1/2 the RAM in the machine). I then ran sysctl -p to update the state with what is in that file and voila! 640x480 now works. :)

You might want to check out other possible memory hogging programs though. I've got 8 cameras running at 640x480 and the system monitor says that 532 meg out of 1009 is being used currently.
User avatar
thelight
Posts: 54
Joined: Sat Jun 26, 2004 9:25 pm
Contact:

Post by thelight »

I think my large memory usage is because I have tried to push the frame-rate up as far as the system will take, which has also meant increasing the pre-event buffer which adds that extra ram usage on.
Ruler
Posts: 235
Joined: Mon Nov 08, 2004 9:02 pm
Location: Bay City, MI

Post by Ruler »

Frame rate may well be the cause. I've got the capture limited to 1 frame per second and still am going to need to add more drive space to the RAID in order to achieve the length of time we need to keep video for. I've yet to enable the motion detection though - I'm not certain if the machine will be able to handle it given the increased resolution images.

Thanks again for the tip on the shared memory.
Locked