Zoenminder 1.24X DCS 3220 5 fps choppy video/Shared Memory

Forum for questions and support relating to the 1.24.x releases only.
Locked
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Zoenminder 1.24X DCS 3220 5 fps choppy video/Shared Memory

Post by metallica1973 »

I have setup zoneminder 1.24X on an Ubuntu 10.04 LTS build and can see that the Dlink DCS 3220 cameras are capturing at 5.88 fps @ 352x240 which to me is rather slow. The specs of the camera are as follows:

• Up to 30fps at 176x120/176x144
• Up to 30fps at 352x240/352x288
• Up to 10fps at 704x480/704x576

I am using a BC-04120 8 port DVR card from Bluecherry on a newer system with 8G of ram and a terabyte hdd. If the camera is capable of running at 30fps@352x240 then why is Zoneminder only running at 5 fps? I have not set any Max fps or Max Alarm fps. It should be capturing at a lot higher speed I would imagine. What can I do to increase the picture speed and or fps?

Also I am recieving this error in the logs:

zms[2047]: WAR [Unable to store frame as timestamp invalid]
Last edited by metallica1973 on Sat Mar 12, 2011 2:41 pm, edited 2 times in total.
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

It was all related to shared memory and the zoneminder area of this sucks. This post was more intuitive and provided the answer that was needed.

http://www.zoneminder.com/forums/viewtopic.php?p=67244

To summarize what is in this post:


Now what are the recommended values for Zonemider? Here I slightly disagree with FAQ.
My understanding is that each camera will allocate one segment. So shmmax should be calclulated not for all cameras as FAQ suggests but only for one camera. For example camera with 320x240 resolution and GREY colorcode and 40 frames in ring buffer requires:
320x240 x 1byte(Grey) x 40 = 3070200
Similarly RGB24 camera would require 3 times as much
320x240 x 3bytes(RGB) x 40 = 9216000

To be safe you need to increase this number by 10% or something. Indeed ipcs for this setup (one Grey and one RGB24) says that zoneminder allocates slightly larger amount of memory


So to define shmmax pick the most high resolution camera with the biggest ringbuffer and calcluate shmmax in bytes. In the abouve example it should be something like 10MB, or 16MB if you like round numbers. In this case Linux default number 32MB (or 0x2000000) is actually fine

To define shmall take shmmax and multiply by the number of cameras and divide by 4096. To be safe you have to increase this number so that other processes can allocate shared memory too. So in this example it should be:
shmall = 16MB * 2 (cameras) * 2 (safety factor) / 4096 = 16384 (pages). Again Linux default number 2097152 pages or 8GB of memory is also fine.

credit goes to Kushnirenko

Also here is a killer How-To for Ubuntu 10.10 and Zoneminder.

http://www.how2forge.org/forums/showthread.php?t=49657
Last edited by metallica1973 on Fri Mar 11, 2011 1:22 pm, edited 2 times in total.
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

Insert foot in Mouth, I am still getting shared memory issues my Dlink DCS 3220 cameras and my 64bit,8 Gig machine. It will work for a little bit and then the screen will go black. This is a nightmare.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Post by PacoLM »

Hi,

I was also having problems (random) with shared memory until I changed the default value of 'Stream Replay Image Buffer' in the buffers tab from 1000 to 100.
Hope it helps,

PacoLM
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

thanks PacoLM

I will take a look this evening as well as this posting:

http://www.zoneminder.com/forums/viewtopic.php?p=54581[/url]
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

ok,

I made those adjustments which I had forgotten about previously before but realized that I am still having shared memory issues that are appearing in my logs. I am 4G of RAM, 64 bit processor, Nvidia video card bith a Bluecherry DVR card. This shared memory thing is a bitch. I have tried every setting under the sun and cannot get this piece of @#$#@@#$@ to work.
I have read just about every post in regards to shared memory and none have remedied this issue. I have tried this formula:

http://www.zoneminder.com/forums/viewtopic.php?p=67244


i have increment shmall by 10% and etc and the same @#$


this is the camera that I am usin, a Dlink DCS 3220 IP camera:

http://www.dlink.com/products/?pid=350

I noticed on the camera that is has these variables. Could this be the root of the issue?

Code: Select all

Video settings
 	Color	
 	Size: 176x120/176x144,352x240/352x288,704x480/704x576
 	Maximum frame rate	30
 	Key frame interval :	120
 	 Fix bit rate: 256k	
 	 Fix quality	: good
 	
What is the magic solution?
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Focus on your "nightmare' post for my reply
Locked