How to Install ZoneMinder under Ubuntu 12.04 Server
From steamWiki
- These are just notes for myself to improve this page later. In the meantime. Use them if you can!
- Note: I was unable to get my webcam to work without mjpg_streamer
INSTALL ZONEMINDER + MJPG_STREAMER
- become root
- Download & Install Ubuntu
- apt-get install zoneminder
- Install mjpg_streamer
- apt-get install libjpeg-dev subversion imagemagick
- svn co https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer mjpg-streamer
- cd mjpg-streamer/mjpg-streamer
- make
- make install
- Test mjpg_streamer
- export LD_LIBRARY_PATH=.
- mjpg_streamer -i "input_uvc.so -d /dev/video1 -r 320x240" -o "output_http.so -p 8080 -w ./www"
- point a browser to http://ip.address.of.your.machine:8080/stream.html
- Setup Monitor in ZoneMinder
- General
- Source Type = "Remote"
- Source
- Remote Protocol = "HTTP"
- Remote Method = "Simple"
- Remote Host Name = "localhost"
- Remote Host Port = "8080"
- Remote Host Path = "/?action=stream"
- Remote Image Colors = "24 bit color"
- Capture Width (pixels) = "320"
- Capture Height (pixels) = "240"
- General
- Check your Monitor & Hopefully it works now!
NOTES
- Host Port should be whatever you set it to in the mjpg_streamer call
- I had to set mjpg_streamer & zoneminder to 320x240 to get it to work
- I had to chose /dev/video1 because the default (/dev/video0) was the built in webcam on my laptop
ERRORS
- 2012-09-17 20:57:30.000889 zms 3684 ERR Terminating, last frame sent time 10.011587 secs more than maximum of 10.000000 zm_monitor.cpp 3639
- This seems to be caused by incorrect resolution (or possibly other settings) in mjpg_streamer+zoneminder (ie: a resolution it can't handle... try 320 x 240)
- 2012-09-17 20:16:33.085866 zms 2484 ERR Got unexpected memory map file size 9217192, expected 36865192 zm_monitor.cpp 364
- This seems to be caused by having a resolution that is wrong and/or by having some memory settings wrong.
- edit /etc/sysctl.conf and type "kernel.shmall = 167772160" and "kernel.shmmax = 167772160" at the bottom of the file. This appears to fix the memory map issue. Error may still occur if some ZoneMinder settings are wrong.
REFERENCES