- 1 Zoneminder Build Notes
- 2 Apache
- 3 BIOS Issues
- 4 Brightness control
- 5 Contribs Forum
- 6 Cambozola
- 7 Capture Card Issues
- 8 CAUSE NOTES field section
- 9 Database MySQL
- 10 ffmpeg
- 11 Increase Image size
- 12 Image display problems
- 13 Firefox, Colorzilla Extensions
- 14 Kodicom Capture Cards
- 15 Logitech USB QuickCam
- 16 Message Logs
- 17 Memory Problems/Tweaks
- 18 SELinux Issues
- 19 Mocord, Record, Modect
- 20 External Triggering
- 21 Modprobe
- 22 Official ZoneMinder Manual
- 23 MMS Gateway and API Aoftware
- 24 Multiple zones
- 25 Perl Package zmpgk.pl
- 26 Roundrobin
- 27 Remote Camera Source/ Using Another ZM Box as a Source==
- 28 Simultaneous connections (number off ) to Web browser
- 29 Streaming
- 30 Settings
- 31 Timelapsed video
- 32 Vehicle Detection Links
- 33 Water marked
- 34 xawtv
- 35 zmc daemon captures the images
- 36 Zone Configurations and Fine Tunings
Zoneminder Build Notes
Required for Building
- MySQL www.lamphowto.com Notes on compiling MySQL from source
./configure will complain if anything is missing.
Installing from Source
- ./configure --with-mysql=/usr/local/mysql
- ./configure --with-webdir=/var/www/htdocs/ZM
- --with-cgidir=/var/www/cgi-bin --sysconfdir=/etc
- ./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.
sudo -u apache /etc/rc.d/rc.zoneminder start
- now.. zmc and zma is running on user apache
Allowing CGI Execution (REQUIRED for ZM)
- /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
Turning off ACPI power management in the BIOS may help alleviate some issues with ZoneMinder and capture hardware.
The contribs forum contains contributions from ZoneMinder users like yourself!
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
- Applies to 4 inputs on one chip:
- Applies to 4 inputs on one chip, using lspci and dmesg to determine hardware.
Black Screen bttv Video Devices
- Black Screen in ZM when using 188.8.131.52 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
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.
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:
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:
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
- Install ffmpeg for Fedora with
yum -i ffmpeg
yum -i ffmpeg-devel
- Install ffmpeg and ffmpeg-devel on Fedore4
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
- After getting ffmpeg from CVS, do:
./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:
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>
Would have to be canged to:
- include <libavformat/avformat.h>
- 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
Also remember you may need to increase your 'shared memory'. See the FAQ for details
Firefox, Colorzilla Extensions
Kodicom Capture Cards
- KMC-8800 8-chip bt878 capture card
- modprobe.conf file
Edit your /etc/modprobe.conf file and add this line:
options bttv card=77
All screens must be the same resolution.
- bttv settings
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
- Shared memory setting must be high.
- Disable response to broadcasts.
- You don't want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
- enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
- enable ipV6 forwarding
- net.ipv6.conf.all.forwarding = 1
kernel.shmall = 134217728 kernel.shmmax = 134217728
Mocord, Record, Modect
Some discussion on using external events (X10 for example) to trigger your ZM camera:
(Could use your help here)
modprobe.conf mod = 133 or something like that for Kodicom http://www.zoneminder.com/forums/viewtopic.php?t=5603
Official ZoneMinder Manual
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
Perl Package zmpgk.pl
Remote Camera Source/ Using Another ZM Box as a Source==
Simultaneous connections (number off ) to Web browser
- rtp and raw streaming
- "disable farm out writing of images" if frame capture errors appear in log.
- color pallet, video hieght, or video width. Try starting with 320x240 (assuming ntsc) and try different pallets.
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.
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: