Ubuntu 10.10 BC-04120A DVR card and Dlink DCS 3220 Ip Camera

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

Ubuntu 10.10 BC-04120A DVR card and Dlink DCS 3220 Ip Camera

Post by metallica1973 »

I am running Zoneminder 1.24x on a Ubuntu 10.10, dual-core, 8Gig, Nvidia Video Card with a BC-04120A DVR card using Dlink DCS 3220 Ip cameras. I performed the install using this script and all is well:

Code: Select all

#!/bin/sh 
# ZoneMinder 1.24.2 installation script 
# 
# Copyright (C) 2010 Chris "Pada" Kistner 
# 
# This program is free software; you can redistribute it and/or 
# modify it under the terms of the GNU General Public License 
# as published by the Free Software Foundation; either version 2 
# of the License, or (at your option) any later version. 

echo "--- Checking for root privileges..." 
if [ "`whoami`" != "root" ]; then 
echo Error: This script requires root access 
exit 1 
fi 

echo "--- Installing extra codecs, which includes x264 support..." 
apt-get -y install libavcodec-extra-52 libavformat-extra-52 libswscale-extra-0 libavfilter-extra-1 

echo "--- Installing ZoneMinder..." 
apt-get -y install zoneminder 

echo "--- Adding ZoneMinder to Apache2..." 
ln -s /etc/zm/apache.conf /etc/apache2/sites-enabled/zoneminder.conf 
service apache2 restart 

echo "--- Adding alias for zoneminder service and fixing ZoneMinder startup..." 
ln -s /etc/init.d/zoneminder /etc/init.d/zm 
update-rc.d -f zoneminder remove 
update-rc.d -f zm remove 
update-rc.d zm defaults 92 
service zm restart 

echo "--- Correcting SHM to 90% of memory..." 
apt-get -y install coreutils bc 
page_size=$(getconf PAGE_SIZE) 
mem_bytes=$(awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo) 
mb=1048576 
mem_bytes_mb=$(expr $mem_bytes / $mb) 
shmmax=$(echo "$mem_bytes * 0.90" | bc | cut -f 1 -d '.') 
shmmax_mb=$(expr $shmmax / $mb) 
shmall=$(expr $mem_bytes / $page_size) 
shmmax_cur=$(sysctl -n kernel.shmmax) 
shmmax_cur_mb=$(expr $shmmax_cur / $mb) 
shmall_cur=$(sysctl -n kernel.shmall) 
echo "-- Total memory = $mem_bytes B = $mem_bytes_mb MB" 
echo "-- Page size = $page_size B" 
echo "-- Current kernel.shmmax = $shmmax_cur B = $shmmax_cur_mb MB" 
echo "-- Current kernel.shmall = $shmall_cur pages" 
if [ "$shmmax" -eq "$shmmax_cur" ] && [ "$shmall" -eq "$shmall_cur" ]; then 
echo "-- Recommended shm values already set" 
else 
echo "-- Recommended: kernel.shmmax = $shmmax B = $shmmax_mb MB" 
echo "-- Recommended: kernel.shmmall = $shmall pages" 
file=/etc/sysctl.conf 
if [ "`grep "^kernel\.shmmax" $file -c`" != "0" ]; then 
echo "-- Replacing: kernel.shmmax in $file" 
sed "s/^kernel\.shmmax.*$/kernel.shmmax=$shmmax/g" -i $file 
else 
echo "-- Adding: kernel.shmmax to $file" 
echo kernel.shmmax=$shmmax >> $file 
fi 
if [ "`grep "^kernel\.shmall" /etc/sysctl.conf -c`" != "0" ]; then 
echo "-- Replacing: kernel.shmall in $file" 
sed "s/^kernel\.shmall.*$/kernel.shmall=$shmall/g" -i $file 
else 
echo "-- Adding: kernel.shmall to $file" 
echo kernel.shmall=$shmall >> $file 
fi 
echo "-- Using: new sysctl values" 
sysctl -p 
fi 

# Done 
echo "--- Done."
but am having trouble with shared memory and the Dlink Cameras. I have played around several settings along shared memory and still black screens, the camera will work for a while and then just stop all together. Is there a trick to get these cameras to work?
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

I made 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. 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?[/url]
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Focus on your "nightmare' post for my reply
Locked