Difference between revisions of "General Notes"

From ZoneMinder Wiki
Jump to navigationJump to search
m (Made headings smaller...)
 
(48 intermediate revisions by 18 users not shown)
Line 1: Line 1:
==Zoneminder build notes==
==Zoneminder Build Notes==
*Installing from source
==== Required for Building ====
http://www.zoneminder.com/fileadmin/downloads/README.html<br>
* MySQL [http://www.lamphowto.com  www.lamphowto.com] Notes on compiling MySQL from source
http://www.zoneminder.com/forums/viewtopic.php?t=5715<br>
* OpenSSL
http://www.zoneminder.com/forums/viewtopic.php?t=5929<br>
* PHP
* Apache
* Perl/Libperl
./configure will complain if anything is missing.
 
==== Installing from Source ====
* http://www.zoneminder.com/fileadmin/downloads/README.html<br>
* http://www.zoneminder.com/forums/viewtopic.php?t=5715<br>
* http://www.zoneminder.com/forums/viewtopic.php?t=5929<br>
:./configure --with-mysql=/usr/local/mysql
:./configure --with-mysql=/usr/local/mysql
:--with-ffmpeg=/home/src/ffmpeg-0.4.9-pre1
:--with-ffmpeg=/home/src/ffmpeg-0.4.9-pre1
Line 19: Line 27:
:--with-webgroup=httpd
:--with-webgroup=httpd
OR
OR
:http://www.zoneminder.com/forums/viewtopic.php?t=6053
* http://www.zoneminder.com/forums/viewtopic.php?t=6053
:./configure --with-webdir=/var/www/html/zm  
:./configure --with-webdir=/var/www/html/zm  
:--with-cgidir=/var/www/cgi-bin ZM_DB_PASS=<password>  
:--with-cgidir=/var/www/cgi-bin ZM_DB_PASS=<password>  


*Debian installation
==== Create and Populate the Database ====
http://www.zoneminder.com/forums/viewtopic.php?t=5391 <br>
* http://forums.zoneminder.com/viewtopic.php?t=5754<br>
http://www.zoneminder.com/forums/viewtopic.php?t=6215 <br>
* http://forums.zoneminder.com/viewtopic.php?t=6023<br>
:http://www.zoneminder.com/forums/viewtopic.php?t=5892<br>
<code>
:./configure --with-mysql=/usr
:mysql mysql < db/zm_create.sql
:--with-webdir=/var/www/zm
:mysql mysql
:--with-cgidir=/var/www/cgi-bin --sysconfdir=/etc
:> grant select,insert,update,delete on <database name>.* to '<database user>'@localhost identified by '<database password>';
:--with-ffmpeg=/usr/local
:> quit
:--with-webuser=www-data
: mysqladmin reload</code>
:--with-webgroup=www-data CPPFLAGS="-I /usr/local/ssl/include -I /usr/local/lib"


*With a new install create and populate mysql databases.
==== Misc Notes (Anyone care to categorize?) ====
http://www.zoneminder.com/forums/viewtopic.php?t=6023<br>
Check zone.conf or zm.conf. Check that there are no bogus vesions of this file lying around. <br>
mysql mysql < db/zm_create.sql
"nobody" doesn't have shell access, choose a different Apache alias like "httpd". <br>
mysql mysql
zmdc.log or /var/log/messages log any errors.<br>
grant select,insert,update,delete on <database name>.* to
'<database user>'@localhost identified by '<database password>';
quit
mysqladmin reload
Check zone.conf or zm.conf. Check that there are no bogus vesions of this file
lying around. "nobody" doesn't have shell access, choose a different Apache alias like
"httpd". The zmdc.log logs any errors.
zm.sock file must be able to be created.
zm.sock file must be able to be created.


*Build for Suse10
==Apache ==
http://www.zoneminder.com/forums/viewtopic.php?t=5925 <br>
http://www.zoneminder.com/forums/viewtopic.php?t=5686&highlight=suse<br>
http://www.zoneminder.com/forums/viewtopic.php?t=6221<br>
http://www.zoneminder.com/forums/viewtopic.php?t=6249<br>


*Fedora4 notes
==== Permissions Problems ====
http://www.zoneminder.com/forums/viewtopic.php?t=5991<br>
* http://www.zoneminder.com/forums/viewtopic.php?t=5642
Set web user and group correctly and set the log dir to a writeable location.
<code>sudo -u apache /etc/rc.d/rc.zoneminder start</code>
With FC4 there are three things that must be done to get ZM running,:
** now.. zmc and zma is running on user apache
#is in the /etc/ld.so.conf.d/ dir created a file with 775 perm called zm.conf and add the line '/usr/local/lib' to it and type 'ldconfig' once it is added, also with a fresh install of FC4 make sure SE linux is disabled if you are not using it. Check your log path in options under the paths tab. This will tell you were the log are going to be put.
#Second make sure the path exists.  
#Third create the log files if they do not exist and make sure that they have the correct permissions. If zm can not open and write the log files, it will not start.


*OpenSSl and openssl-devel
==== su Issue ====
You should have these packages installed:
http://www.zoneminder.com/forums/viewtopic.php?t=5652
openssl,openssl-devel,php-mysql
To check if you have them, do
rpm -qa | grep openssl
 
*General forum notes
http://www.zoneminder.com/forums/viewtopic.php?t=6261<br>


==Apache ==
==== Allowing CGI Execution (REQUIRED for ZM) ====
*permission problem
http://www.zoneminder.com/forums/viewtopic.php?t=5642
sudo -u apache /etc/rc.d/rc.zoneminder start
now.. zmc and zma is running on user apache
*su issue
http://www.zoneminder.com/forums/viewtopic.php?t=5652
*http webserver must allows cgi execution
http://www.zoneminder.com/forums/viewtopic.php?t=5853
http://www.zoneminder.com/forums/viewtopic.php?t=5853
*/usr/local/etc/zm.conf  must exist and what process owns it.
*/usr/local/etc/zm.conf  must exist and what process owns it.
webuser and webgroup must be correct for apache to have ownership over zm.conf
webuser and webgroup must be correct for apache to have ownership over zm.conf


==BIOS issues==
==BIOS Issues==
Turn off ACPI in the bios. ACPI is a power management configuration
Turning off ACPI power management in the BIOS may help alleviate some issues with ZoneMinder and capture hardware.  
on the motherboard that interferes with the datacapture cards.




==Brightness control==
==Brightness control==
Brightness control script
* http://www.zoneminder.com/forums/viewtopic.php?t=3953
http://www.zoneminder.com/forums/viewtopic.php?t=3953&highlight=brightness
* http://www.zoneminder.com/forums/viewtopic.php?t=5680
http://www.zoneminder.com/forums/viewtopic.php?t=5680
* http://www.zoneminder.com/forums/viewtopic.php?t=3657
http://www.zoneminder.com/forums/viewtopic.php?t=3657


==contribs directory==
== Contribs Forum==
contribs directory has user based files added to zoneminder
The [http://www.zoneminder.com/forums/viewforum.php?f=9 contribs forum] contains contributions from ZoneMinder users like yourself!


==Cambozola==
==Cambozola==
http://www.zoneminder.com/forums/viewtopic.php?t=5745
Cambozola is a Java plugin that decodes multipart JPEG streams. Mozilla-based browser have native support, so this plugin is for browsers like Internet Explorer that lack that support.


http://www.zoneminder.com/forums/viewtopic.php?t=6320
To install Cambozola for use in zm, Download the cambozola.jar file from the Downloads page or directly from the charliemouse website. If you download from charliemouse you will need to extract the one file (cambozola.jar) from the archive. Place cambozola.jar in the ZM root web directory (so if your web pages for ZM is installed at /var/www/html/zm the file should go there as well). Now all thats left to be done is to enable it in ZM goto options and under the web tab check that cambozola is enabled. In 1.25 you will find OPT_CAMBOZOLA under the '''Images''' tab. That's it, you're done.
 
* http://www.zoneminder.com/forums/viewtopic.php?t=5745
* http://www.zoneminder.com/forums/viewtopic.php?t=6320
 
NOTE: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:
 
  $ sudo chmod 775 cambozola.jar
 
Once I did this, images started to stream for me.
 
NOTE: If you find that Cambozola doesn't load in IE at all, but instead you get a black 'X' where the video should be, Zoneminder is incorrectly detecting that your IE can handle MJPEG streams.  To fix, go to '''Options''' then '''High B/W''', '''Medium B/W''', or '''Low B/W''' (depending on which you use) and set the option '''Override the automatic detection of browser streaming capability''' to "no".  This will force all browsers to use Cambozola.  Also, with modern versions of Java, you'll probably also have to go into your Control Panel to the Java options and add the URL of your Zoneminder instance to your Exception Site List, due to the fact that Cambozola.jar is self-signed.  Otherwise you'll get a Java message '''Application Blocked by Security Settings'''


==Capture Card Issues==
==Capture Card Issues==
==== Image is Flipped ====
==== Image is Flipped ====
* Applies to 4 inputs on one chip:
* Applies to 4 inputs on one chip:
http://www.zoneminder.com/forums/viewtopic.php?t=6042
**http://www.zoneminder.com/forums/viewtopic.php?t=6042


==== Scrambled Images ====
==== Scrambled Images ====
* Applies to 4 inputs on one chip, using lspci and dmesg to determine hardware.
* Applies to 4 inputs on one chip, using lspci and dmesg to determine hardware.
http://www.zoneminder.com/forums/viewtopic.php?t=6024
**http://www.zoneminder.com/forums/viewtopic.php?t=6024
**http://www.zoneminder.com/wiki/index.php/Pico2000
 
==== Black Screen bttv Video Devices ====
* Black Screen in ZM when using 2.6.21.5 kernel '''but''' works with TVTime
** http://www.zoneminder.com/forums/viewtopic.php?t=10108 describes why a V4L2 app has to init the devices 1st before a V4L1 app.
** A script to workaround this is available at http://www.zoneminder.com/forums/viewtopic.php?t=9414


==CAUSE NOTES field section==
==CAUSE NOTES field section==
http://www.zoneminder.com/forums/viewtopic.php?t=6065
*http://www.zoneminder.com/forums/viewtopic.php?t=6065


==Database Mysql==
==Database MySQL==
==== Create a New Database ====  
==== Create a New Database ====  
* http://www.zoneminder.com/forums/viewtopic.php?t=5754
* http://www.zoneminder.com/forums/viewtopic.php?t=5754
Line 122: Line 117:


==== Backup a Database ====
==== Backup a Database ====
In Ubuntu and other modern distributions you can install MySQL administrator GUI.
the default login is :-<br>
Server Hostname ---- localhost<br>Username ---- Root<br>Password ----- (Blank, no password)
In here, there is backup and restore functions. The backup can also be scheduled.


==== Delete Databases/Tables ====
==== Delete Databases/Tables ====


==== Database Tricks/Tips ====  
==== Database Tricks/Tips ====  
* My personal recommendation is to try converting your database over to INNODB tables.
 
** Researching the web I found this to be faster for larger tables (as events grow) and much more reliable.  
=====MySQL Tune Up=====
For small one or two camera systems with few events the default MySQL settings should work quite well. Hi resolution cameras with lots of activity or monitors on Record or Mocord will run up thousands of events in short order. This will put a strain on MySQL with default settings.
Many Linux distributions provide MySQL 5.5 or older. For these I recommend setting up MySQL to use INNODB tables. Researching the web I found this to be faster for larger tables (as events grow) and much more reliable. to do this:
 
Edit the MySQL config file (for Ubuntu 14.04 it is /etc/mysql/my.cnf) and add:
 
[mysqld]
 
innodb_file_per_table
 
If you have a running system you can convert to INNODB
*[[Enable and convert MySQL to innodb_file_per_table for Zoneminder]]
 
 
One tool I use is mysqltuner. This is run from the command line and gives clear instructions as to what values to change. If these instructions are not clear to you I recommend my friend Google.
 
On a new system under load we recommend running mysqltuner daily until you get to stability with the amount of events you store.
 
When you run mysqltuner you will be prompted to enter the admin user (normally root) and then the password.
 
Many of the settings in MySQL are "default" and are not listed in the configuration file. So, if mysqltuner recommends you change the value for innodb_buffer_pool_size and you open the my.cnf (or other config file) and you do not find the value you will have to add it! Something like this:
 
[mysqld]
 
innodb_file_per_table
 
innodb_buffer_pool_size = 512m  (Note that memory values can be also written in bytes)
 
Stop Zoneminder, restart MySQL, then start Zoneminder to apply changes
 
 
Forum topics about MySQL
* http://www.zoneminder.com/forums/viewtopic.php?t=6000
* http://www.zoneminder.com/forums/viewtopic.php?t=6000
* http://www.zoneminder.com/forums/viewtopic.php?t=6143
* http://www.zoneminder.com/forums/viewtopic.php?t=6143
Line 133: Line 165:
* http://www.zoneminder.com/forums/viewtopic.php?t=6095
* http://www.zoneminder.com/forums/viewtopic.php?t=6095


==FFmpeg==
====Update Database After Installing from RPM's====
* http://www.zoneminder.com/forums/viewtopic.php?t=5887
 
== ffmpeg ==
*Install ffmpeg for Fedora with
*Install ffmpeg for Fedora with
yum -i  ffmpeg
yum -i  ffmpeg<br>
yum -i ffmpeg-devel
yum -i ffmpeg-devel


*Install ffmpeg and ffmpeg-devel on Fedore4
*Install ffmpeg and ffmpeg-devel on Fedore4
http://www.zoneminder.com/forums/viewtopic.php?t=5601&sid=4e7192b74fe4306e341e9c4036727f7b
**http://www.zoneminder.com/forums/viewtopic.php?t=5601
<code>
rpm -ivh http://rpm.livna.org/livna-release4.rpm
rpm -ivh http://rpm.livna.org/livna-release4.rpm
yum install ffmpeg ffmpeg-devel
yum install ffmpeg ffmpeg-devel
</code>
Place the devel stuff in /usr/include/ffmpeg
Place the devel stuff in /usr/include/ffmpeg
Now configure, make, make install
Now configure, make, make install


http://www.zoneminder.com/forums/viewtopic.php?t=5576&sid=4e7192b74fe4306e341e9c4036727f7b
*http://www.zoneminder.com/forums/viewtopic.php?t=5576&sid=4e7192b74fe4306e341e9c4036727f7b
*After getting ffmpeg from CVS, do:
*After getting ffmpeg from CVS, do:
./configure , make,  make install, make installibs
<code>./configure , make,  make install, make installibs</code>
 
===Changes in ffmpeg again===
It would seem that ffmpeg has possibly changed things again, no real supprise there but it complicates building ZM.
 
So if you find when you make:
 
zm_mpeg.h:29:29: error: ffmpeg/avformat.h: No such file or directory
 
zm_mpeg.h:31:28: error: ffmpeg/swscale.h: No such file or directory
 
 
and whereis turns up:
 
/usr/include/libavformat/avformat.h
 
/usr/include/libswscale/swscale.h
 
 
The file you would need to change is zm_mpeg.h
and change the following two lines in that file:
 
#include <ffmpeg/avformat.h>
#include <ffmpeg/swscale.h>


==Gentoo==
 
http://www.zoneminder.com/forums/viewtopic.php?t=5685
Would have to be canged to:
http://www.zoneminder.com/forums/viewtopic.php?t=4217&highlight=gentoo
 
http://www.zoneminder.com/forums/viewtopic.php?t=5303&highlight=gentoo
#include <libavformat/avformat.h>
http://www.zoneminder.com/forums/viewtopic.php?t=3924&highlight=gentoo+start
#include <libswscale/swscale.h>
 
==Increase Image size==
If you increase the image size on a camera, it's always best to close down any streams and restart ZM to make sure that all memory is released.
http://www.zoneminder.com/forums/viewtopic.php?t=7049


==Image display problems==
==Image display problems==
http://www.zoneminder.com/forums/viewtopic.php?t=6027
http://www.zoneminder.com/forums/viewtopic.php?t=6027


==Firefox, colorzilla extensions==
Also remember you may need to increase your 'shared memory'. See the FAQ for details
 
==Firefox, Colorzilla Extensions==
http://www.zoneminder.com/forums/viewtopic.php?t=5647
http://www.zoneminder.com/forums/viewtopic.php?t=5647


==Kodicom capture card==
==Kodicom Capture Cards==
:http://www.zoneminder.com/forums/viewtopic.php?t=5640
* http://www.zoneminder.com/forums/viewtopic.php?t=5640
:http://www.zoneminder.com/forums/viewtopic.php?t=4130&highlight=kmc4400r
* http://www.zoneminder.com/forums/viewtopic.php?t=4130
:http://www.zoneminder.com/forums/viewtopic.php?t=6158
* http://www.zoneminder.com/forums/viewtopic.php?t=6158
*KMC-8800 8-chip bt878 capture card
*KMC-8800 8-chip bt878 capture card
http://www.zoneminder.com/forums/viewtopic.php?t=5609
** http://www.zoneminder.com/forums/viewtopic.php?t=5609
http://www.linuxtv.org/v4lwiki/index.php/Kodicom_4400R
** http://www.linuxtv.org/wiki/index.php/Kodicom_4400R
http://www.zoneminder.com/forums/viewtopic.php?t=6012
** http://www.linuxtv.org/wiki/index.php/Kodicom_8800R
** http://www.zoneminder.com/forums/viewtopic.php?t=6012


*modprobe.conf file
*modprobe.conf file
http://www.zoneminder.com/forums/viewtopic.php?t=5508&postdays=0&postorder=asc&start=15
**http://www.zoneminder.com/forums/viewtopic.php?t=5508&postdays=0&postorder=asc&start=15
http://www.zoneminder.com/forums/viewtopic.php?t=6024
** http://www.zoneminder.com/forums/viewtopic.php?t=6024
Edit your /etc/modprobe.conf file and add this line: options bttv card=77
Edit your /etc/modprobe.conf file and add this line:<br>
"options bttv card =77" is a DEFAULT setting to get a card working.
options bttv card=77<br>
All screens must be same resolution.
*http://www.linux.com/howtos/Webcam-HOWTO/dev-intro.shtml
*http://www.zoneminder.com/forums/viewtopic.php?t=6892
All screens must be the same resolution.


*bttv settings  
*bttv settings  
http://www.zoneminder.com/forums/viewtopic.php?t=5603&sid=4e7192b74fe4306e341e9c4036727f7b
**http://www.zoneminder.com/forums/viewtopic.php?t=5603&sid=4e7192b74fe4306e341e9c4036727f7b


note that under ubuntu that the file to edit is /etc/modprobe.d/aliases.
note that under ubuntu that the file to edit is /etc/modprobe.d/aliases.


==LOGITECH QUICKCAM usb==
==Logitech USB QuickCam==
*I'm using FC4 and had a similiar problem with a quickcam 4000.
*I'm using FC4 and had a similiar problem with a quickcam 4000.
I guess you are using the default module supplied with centos. I think, not sure about this though, that it is missing some capabilities. So I installed the pwc module (http://www.saillard.org/linux/pwc/INSTALL.en) and these crashes stopped.
I guess you are using the default module supplied with CentOS. I think, not sure about this though, that it is missing some capabilities. So I installed the pwc module (http://www.saillard.org/linux/pwc/INSTALL.en) and these crashes stopped.
http://www.zoneminder.com/forums/viewtopic.php?t=5906
http://www.zoneminder.com/forums/viewtopic.php?t=5906




==Message logs==
==Message Logs==
http://www.zoneminder.com/forums/viewtopic.php?t=5771
http://www.zoneminder.com/forums/viewtopic.php?t=5771


==Memory==
==Memory Problems/Tweaks==
http://www.zoneminder.com/forums/viewtopic.php?t=6242
*http://www.zoneminder.com/forums/viewtopic.php?t=6242
*Shared memory setting must be high.
**http://www.zoneminder.com/forums/viewtopic.php?t=6024


==SELinux was enabled==
==SELinux Issues==
http://www.zoneminder.com/forums/viewtopic.php?t=6337
*http://www.zoneminder.com/forums/viewtopic.php?t=6337
http://www.zoneminder.com/forums/viewtopic.php?t=4836
*http://www.zoneminder.com/forums/viewtopic.php?t=4836
http://www.zoneminder.com/forums/viewtopic.php?t=6147
*http://www.zoneminder.com/forums/viewtopic.php?t=6147
 
<code>
==Suse issues==
cat sysctl.conf
Startup script
*http://www.zoneminder.com/forums/viewtopic.php?t=6353
 
==Shared memory setting must be high.==
http://www.zoneminder.com/forums/viewtopic.php?t=6024
 
frank@wdshss:/etc> cat sysctl.conf
# Disable response to broadcasts.
# Disable response to broadcasts.
# You don't want yourself becoming a Smurf amplifier.
# You don't want yourself becoming a Smurf amplifier.
Line 215: Line 279:
#net.ipv6.conf.all.forwarding = 1
#net.ipv6.conf.all.forwarding = 1
kernel.shmall = 134217728
kernel.shmall = 134217728
kernel.shmmax = 134217728  
kernel.shmmax = 134217728
http://www.zoneminder.com/forums/viewtopic.php?t=6000
</code>
* http://www.zoneminder.com/forums/viewtopic.php?t=6000


==Mocord, Record, Modect==
==Mocord, Record, Modect==
http://www.zoneminder.com/forums/viewtopic.php?t=6120
http://www.zoneminder.com/forums/viewtopic.php?t=6120


==MODPROBE==
==External Triggering==
====zmtrigger.pl====
Some discussion on using external events (X10 for example) to trigger your ZM camera: 
    http://www.zoneminder.com/forums/viewtopic.php?t=6423&highlight=
 
(Could use your help here)
 
==Modprobe==
modprobe.conf  
modprobe.conf  
mod = 133 or something like that for Kodicom
mod = 133 or something like that for Kodicom
http://www.zoneminder.com/forums/viewtopic.php?t=5603
http://www.zoneminder.com/forums/viewtopic.php?t=5603


==Manual==
==Official ZoneMinder Manual==
http://www.zoneminder.com/fileadmin/downloads/README.html#_Toc125113490
http://www.zoneminder.com/fileadmin/downloads/README.html


==MMS gateway and API software==
==MMS Gateway and API Aoftware==
GPRS or HTTP a Jpeg image to the MMS gateway server which in turn sends the image to a mobile phone
GPRS or HTTP a Jpeg image to the MMS gateway server which in turn sends the image to a mobile phone
*http://www.redcoal.com/
*http://www.redcoal.com/
*http://www.zoneminder.com/forums/viewtopic.php?t=6101
*http://www.zoneminder.com/forums/viewtopic.php?t=6101
*http://wurfl.sourceforge.net/
*http://wurfl.sourceforge.net/
*http://www.mig.co.za


==Multiple zones==
==Multiple zones==
http://www.zoneminder.com/forums/viewtopic.php?t=6079
http://www.zoneminder.com/forums/viewtopic.php?t=6079


==Perl package zmpgk.pl==
==Perl Package zmpgk.pl==
http://www.zoneminder.com/forums/viewtopic.php?t=5801
*http://www.zoneminder.com/forums/viewtopic.php?t=5801
 
==Roundrobin==
*http://www.zoneminder.com/forums/viewtopic.php?t=5658


==Roundrobbin==
==Remote Camera Source/ Using Another ZM Box as a Source====
http://www.zoneminder.com/forums/viewtopic.php?t=5658
*http://www.zoneminder.com/forums/viewtopic.php?t=5549
*http://www.zoneminder.com/forums/viewtopic.php?t=5595
*http://www.zoneminder.com/forums/viewtopic.php?t=5549
*http://www.zoneminder.com/forums/viewtopic.php?t=12037


==Remote camera source==
==Simultaneous connections (number off ) to Web browser==
http://www.zoneminder.com/forums/viewtopic.php?t=5549&sid=4e7192b74fe4306e341e9c4036727f7b
*http://www.zoneminder.com/forums/viewtopic.php?t=6765


==Streaming ==
==Streaming ==
Line 252: Line 329:
http://www.zoneminder.com/forums/viewtopic.php?t=5572
http://www.zoneminder.com/forums/viewtopic.php?t=5572


==SETTINgs==
==Settings==
*"disable farm out wrtiting of imagess" if frame capture errors appear in log.
*"disable farm out writing of images" if frame capture errors appear in log.<br>
http://www.zoneminder.com/forums/viewtopic.php?t=5992
** http://www.zoneminder.com/forums/viewtopic.php?t=5992


*color pallet, video hieght, or video width. Try starting with 320x240 (assuming ntsc) and try different pallets.  
*color pallet, video hieght, or video width. Try starting with 320x240 (assuming ntsc) and try different pallets.  
http://www.zoneminder.com/forums/viewtopic.php?t=6027&sid=9a52386394831b24741c67ba70cc1507
**http://www.zoneminder.com/forums/viewtopic.php?t=6027&sid=9a52386394831b24741c67ba70cc1507


==Timelapsed video==
==Timelapsed video==
http://www.zoneminder.com/forums/viewtopic.php?t=6049
http://www.zoneminder.com/forums/viewtopic.php?t=6049


==Truck detection links==
==Vehicle Detection Links==
http://www.zoneminder.com/forums/viewtopic.php?t=5858
*http://www.zoneminder.com/forums/viewtopic.php?t=5858
http://www.zoneminder.com/forums/viewtopic.php?t=5184&highlight=truck+intersection
*http://www.zoneminder.com/forums/viewtopic.php?t=5184&highlight=truck+intersection
http://www.cnssystems.ca/


*All things are possible and the example someone posted a while back of detecting trucks and buses, but not cars, passing over a distant intersection is probably appropriate for you. What I would suggest you need are quite high pixel differences (indicating difference from the background) and pretty small counts of changed pixels or blob sizes. You might find it useful to turn on diagnostic images initially (and only for a while as they slow everything down a lot) which will output what ZM thinks the differences etc are are in the images.
*All things are possible and the example someone posted a while back of detecting trucks and buses, but not cars, passing over a distant intersection is probably appropriate for you. What I would suggest you need are quite high pixel differences (indicating difference from the background) and pretty small counts of changed pixels or blob sizes. You might find it useful to turn on diagnostic images initially (and only for a while as they slow everything down a lot) which will output what ZM thinks the differences etc are are in the images.
==Update database after installing from RPM's==
http://www.zoneminder.com/forums/viewtopic.php?t=5887
The command you enetered above only freshens it.
zmupdate.pl --version= <?>
==Ubuntu install==
http://www.zoneminder.com/forums/viewtopic.php?t=5633
GUI package that installs Mplayer etc.
http://ubuntuforums.org/showpost.php?p=356392
EXTRA_LIBS parameter in .configure script
http://www.zoneminder.com/forums/viewtopic.php?t=6141
==Using another ZoneMinder box as the remote IP camera source==
http://www.zoneminder.com/forums/viewtopic.php?t=5595
http://www.zoneminder.com/forums/viewtopic.php?t=5549


==Water marked==
==Water marked==
Line 290: Line 350:


==xawtv ==
==xawtv ==
http://www.zoneminder.com/forums/viewtopic.php?t=5696
*http://www.zoneminder.com/forums/viewtopic.php?t=5696
what from xawtv -hwscan?
what from xawtv -hwscan?
xawtv -device /dev/video?
xawtv -device /dev/video?


==zmc daemon captures the images==
==zmc daemon captures the images==
http://www.zoneminder.com/forums/viewtopic.php?t=6146
*http://www.zoneminder.com/forums/viewtopic.php?t=6146
 
==Zone Configurations and Fine Tunings==
 
The way I tuned my zones was to walk out in front of the camera and stand at the furthest distance from the camera where it would be useful to detect motion.
 
Then I replayed the footage and took a still of my standing away from the camera, loaded it into a photo editor and cropped the image to the size of my body.
 
Then looking at the image attibutes gave me the dimensions of the remaining space, I took the height and width and multiplied them to get a minumum number of changed pixels I wanted to cause an alarm.
 
I went into my zone and changed the units from percent to pixels. Then input the number I got from my previous calculation into the first two min fields, and subtracted 15% and put that number in the last minumum field.
 
* This section needs alot of work.  Please contribute as much as you can!
 
Once you have Zoneminder up and running and all your cameras recording events, it then becomes important to fine tune your zones so that you record all of the events that are important to you, and just as important, NOT record events that are not important
 
There are many parameters to be adjusted.  So many, in fact, that it is easy to change just a few parameters, and create a config that does not do what you want at all.  It is all so confusing.  Here, we will attempt to document some basic configs, and explain in some detail the effects that each parameter will have and how each parameter relates to the other parameters.
 
The Documentation page offers some help in understanding how these parameters are related and important.  You can view the online documentation here:
 
[http://www.zoneminder.com/fileadmin/downloads/README.html#_Toc151468571  Zone Config Documentation]
 
[[Reference Image Blend Percentage aka Vapor Trails]]
 
[[Zone Parameter Explanations version 1.21]]
 
[[Zone Parameter Explanations version 1.22]]
 
[[Zone Analysis Pseudo Algorithm]]
 
[[Zone Configuration Basics]]
 
[[Zone Configuration Advanced]]
 
[[Special Situation Configs]]

Latest revision as of 11:19, 28 December 2017

Zoneminder Build Notes

Required for Building

  • MySQL www.lamphowto.com Notes on compiling MySQL from source
  • OpenSSL
  • PHP
  • Apache
  • Perl/Libperl

./configure will complain if anything is missing.

Installing from Source

./configure --with-mysql=/usr/local/mysql
--with-ffmpeg=/home/src/ffmpeg-0.4.9-pre1
--with-lame=/home/src/lame-3.96.1/libmp3lame
--with-webdir=/home/sites/Security.658Ridgecrest.com/web
--with-cgidir=/home/sites/Security.658Ridgecrest.com/web
--with-webuser=httpd
--with-webgroup=httpd
--with-libarch=lib
--enable-debug=yes

OR

./configure --with-webdir=/var/www/htdocs/ZM
--with-cgidir=/var/www/cgi-bin --sysconfdir=/etc
--with-webuser=httpd
--with-webgroup=httpd

OR

./configure --with-webdir=/var/www/html/zm
--with-cgidir=/var/www/cgi-bin ZM_DB_PASS=<password>

Create and Populate the Database

mysql mysql < db/zm_create.sql
mysql mysql
> grant select,insert,update,delete on <database name>.* to '<database user>'@localhost identified by '<database password>';
> quit
mysqladmin reload

Misc Notes (Anyone care to categorize?)

Check zone.conf or zm.conf. Check that there are no bogus vesions of this file lying around.
"nobody" doesn't have shell access, choose a different Apache alias like "httpd".
zmdc.log or /var/log/messages log any errors.
zm.sock file must be able to be created.

Apache

Permissions Problems

sudo -u apache /etc/rc.d/rc.zoneminder start

    • now.. zmc and zma is running on user apache

su Issue

http://www.zoneminder.com/forums/viewtopic.php?t=5652

Allowing CGI Execution (REQUIRED for ZM)

http://www.zoneminder.com/forums/viewtopic.php?t=5853

  • /usr/local/etc/zm.conf must exist and what process owns it.

webuser and webgroup must be correct for apache to have ownership over zm.conf

BIOS Issues

Turning off ACPI power management in the BIOS may help alleviate some issues with ZoneMinder and capture hardware.


Brightness control

Contribs Forum

The contribs forum contains contributions from ZoneMinder users like yourself!

Cambozola

Cambozola is a Java plugin that decodes multipart JPEG streams. Mozilla-based browser have native support, so this plugin is for browsers like Internet Explorer that lack that support.

To install Cambozola for use in zm, Download the cambozola.jar file from the Downloads page or directly from the charliemouse website. If you download from charliemouse you will need to extract the one file (cambozola.jar) from the archive. Place cambozola.jar in the ZM root web directory (so if your web pages for ZM is installed at /var/www/html/zm the file should go there as well). Now all thats left to be done is to enable it in ZM goto options and under the web tab check that cambozola is enabled. In 1.25 you will find OPT_CAMBOZOLA under the Images tab. That's it, you're done.

NOTE: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:

 $ sudo chmod 775 cambozola.jar

Once I did this, images started to stream for me.

NOTE: If you find that Cambozola doesn't load in IE at all, but instead you get a black 'X' where the video should be, Zoneminder is incorrectly detecting that your IE can handle MJPEG streams. To fix, go to Options then High B/W, Medium B/W, or Low B/W (depending on which you use) and set the option Override the automatic detection of browser streaming capability to "no". This will force all browsers to use Cambozola. Also, with modern versions of Java, you'll probably also have to go into your Control Panel to the Java options and add the URL of your Zoneminder instance to your Exception Site List, due to the fact that Cambozola.jar is self-signed. Otherwise you'll get a Java message Application Blocked by Security Settings

Capture Card Issues

Image is Flipped

Scrambled Images

Black Screen bttv Video Devices

CAUSE NOTES field section

Database MySQL

Create a New Database

Repair a Database

Backup a Database

In Ubuntu and other modern distributions you can install MySQL administrator GUI.

the default login is :-
Server Hostname ---- localhost
Username ---- Root
Password ----- (Blank, no password)

In here, there is backup and restore functions. The backup can also be scheduled.

Delete Databases/Tables

Database Tricks/Tips

MySQL Tune Up

For small one or two camera systems with few events the default MySQL settings should work quite well. Hi resolution cameras with lots of activity or monitors on Record or Mocord will run up thousands of events in short order. This will put a strain on MySQL with default settings. Many Linux distributions provide MySQL 5.5 or older. For these I recommend setting up MySQL to use INNODB tables. Researching the web I found this to be faster for larger tables (as events grow) and much more reliable. to do this:

Edit the MySQL config file (for Ubuntu 14.04 it is /etc/mysql/my.cnf) and add:

[mysqld]

innodb_file_per_table

If you have a running system you can convert to INNODB


One tool I use is mysqltuner. This is run from the command line and gives clear instructions as to what values to change. If these instructions are not clear to you I recommend my friend Google.

On a new system under load we recommend running mysqltuner daily until you get to stability with the amount of events you store.

When you run mysqltuner you will be prompted to enter the admin user (normally root) and then the password.

Many of the settings in MySQL are "default" and are not listed in the configuration file. So, if mysqltuner recommends you change the value for innodb_buffer_pool_size and you open the my.cnf (or other config file) and you do not find the value you will have to add it! Something like this:

[mysqld]

innodb_file_per_table

innodb_buffer_pool_size = 512m (Note that memory values can be also written in bytes)

Stop Zoneminder, restart MySQL, then start Zoneminder to apply changes


Forum topics about MySQL

Update Database After Installing from RPM's

ffmpeg

  • Install ffmpeg for Fedora with

yum -i ffmpeg
yum -i ffmpeg-devel

rpm -ivh http://rpm.livna.org/livna-release4.rpm yum install ffmpeg ffmpeg-devel Place the devel stuff in /usr/include/ffmpeg Now configure, make, make install

./configure , make, make install, make installibs

Changes in ffmpeg again

It would seem that ffmpeg has possibly changed things again, no real supprise there but it complicates building ZM.

So if you find when you make:

zm_mpeg.h:29:29: error: ffmpeg/avformat.h: No such file or directory

zm_mpeg.h:31:28: error: ffmpeg/swscale.h: No such file or directory


and whereis turns up:

/usr/include/libavformat/avformat.h

/usr/include/libswscale/swscale.h


The file you would need to change is zm_mpeg.h and change the following two lines in that file:

  1. include <ffmpeg/avformat.h>
  2. include <ffmpeg/swscale.h>


Would have to be canged to:

  1. include <libavformat/avformat.h>
  2. include <libswscale/swscale.h>

Increase Image size

If you increase the image size on a camera, it's always best to close down any streams and restart ZM to make sure that all memory is released. http://www.zoneminder.com/forums/viewtopic.php?t=7049

Image display problems

http://www.zoneminder.com/forums/viewtopic.php?t=6027

Also remember you may need to increase your 'shared memory'. See the FAQ for details

Firefox, Colorzilla Extensions

http://www.zoneminder.com/forums/viewtopic.php?t=5647

Kodicom Capture Cards

Edit your /etc/modprobe.conf file and add this line:
options bttv card=77

All screens must be the same resolution.

note that under ubuntu that the file to edit is /etc/modprobe.d/aliases.

Logitech USB QuickCam

  • I'm using FC4 and had a similiar problem with a quickcam 4000.

I guess you are using the default module supplied with CentOS. I think, not sure about this though, that it is missing some capabilities. So I installed the pwc module (http://www.saillard.org/linux/pwc/INSTALL.en) and these crashes stopped. http://www.zoneminder.com/forums/viewtopic.php?t=5906


Message Logs

http://www.zoneminder.com/forums/viewtopic.php?t=5771

Memory Problems/Tweaks

SELinux Issues

cat sysctl.conf

  1. Disable response to broadcasts.
  2. You don't want yourself becoming a Smurf amplifier.

net.ipv4.icmp_echo_ignore_broadcasts = 1

  1. enable route verification on all interfaces

net.ipv4.conf.all.rp_filter = 1

  1. enable ipV6 forwarding
  2. net.ipv6.conf.all.forwarding = 1

kernel.shmall = 134217728 kernel.shmmax = 134217728

Mocord, Record, Modect

http://www.zoneminder.com/forums/viewtopic.php?t=6120

External Triggering

zmtrigger.pl

Some discussion on using external events (X10 for example) to trigger your ZM camera:

   http://www.zoneminder.com/forums/viewtopic.php?t=6423&highlight=

(Could use your help here)

Modprobe

modprobe.conf mod = 133 or something like that for Kodicom http://www.zoneminder.com/forums/viewtopic.php?t=5603

Official ZoneMinder Manual

http://www.zoneminder.com/fileadmin/downloads/README.html

MMS Gateway and API Aoftware

GPRS or HTTP a Jpeg image to the MMS gateway server which in turn sends the image to a mobile phone

Multiple zones

http://www.zoneminder.com/forums/viewtopic.php?t=6079

Perl Package zmpgk.pl

Roundrobin

Remote Camera Source/ Using Another ZM Box as a Source==

Simultaneous connections (number off ) to Web browser

Streaming

  • rtp and raw streaming

http://www.zoneminder.com/forums/viewtopic.php?t=5572

Settings

Timelapsed video

http://www.zoneminder.com/forums/viewtopic.php?t=6049

Vehicle Detection Links

  • All things are possible and the example someone posted a while back of detecting trucks and buses, but not cars, passing over a distant intersection is probably appropriate for you. What I would suggest you need are quite high pixel differences (indicating difference from the background) and pretty small counts of changed pixels or blob sizes. You might find it useful to turn on diagnostic images initially (and only for a while as they slow everything down a lot) which will output what ZM thinks the differences etc are are in the images.

Water marked

http://www.zoneminder.com/forums/viewtopic.php?t=4591&highlight=watermark http://www.zoneminder.com/forums/viewtopic.php?t=4188&highlight=watermark

xawtv

what from xawtv -hwscan? xawtv -device /dev/video?

zmc daemon captures the images

Zone Configurations and Fine Tunings

The way I tuned my zones was to walk out in front of the camera and stand at the furthest distance from the camera where it would be useful to detect motion.

Then I replayed the footage and took a still of my standing away from the camera, loaded it into a photo editor and cropped the image to the size of my body.

Then looking at the image attibutes gave me the dimensions of the remaining space, I took the height and width and multiplied them to get a minumum number of changed pixels I wanted to cause an alarm.

I went into my zone and changed the units from percent to pixels. Then input the number I got from my previous calculation into the first two min fields, and subtracted 15% and put that number in the last minumum field.

  • This section needs alot of work. Please contribute as much as you can!

Once you have Zoneminder up and running and all your cameras recording events, it then becomes important to fine tune your zones so that you record all of the events that are important to you, and just as important, NOT record events that are not important

There are many parameters to be adjusted. So many, in fact, that it is easy to change just a few parameters, and create a config that does not do what you want at all. It is all so confusing. Here, we will attempt to document some basic configs, and explain in some detail the effects that each parameter will have and how each parameter relates to the other parameters.

The Documentation page offers some help in understanding how these parameters are related and important. You can view the online documentation here:

Zone Config Documentation

Reference Image Blend Percentage aka Vapor Trails

Zone Parameter Explanations version 1.21

Zone Parameter Explanations version 1.22

Zone Analysis Pseudo Algorithm

Zone Configuration Basics

Zone Configuration Advanced

Special Situation Configs