How to Install ZoneMinder under Ubuntu 12.04 Server

From steamWiki
Revision as of 11:08, 18 September 2012 by Sean (talk | contribs)

Jump to: navigation, search

INSTALL ZONEMINDER + MJPG_STREAMER

  1. become root
  2. Download & Install Ubuntu
    1. apt-get install zoneminder
  3. Install mjpg_streamer
    1. apt-get install libjpeg-dev subversion imagemagick make
    2. svn co https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer mjpg-streamer
    3. cd mjpg-streamer/mjpg-streamer
    4. make
    5. make install
  4. Test mjpg_streamer
    1. export LD_LIBRARY_PATH=.
    2. mjpg_streamer -i "input_uvc.so -d /dev/video1 -r 320x240" -o "output_http.so -p 8080 -w ./www"
    3. point a browser to http://ip.address.of.your.machine:8080/stream.html
  5. Setup Monitor in ZoneMinder
    1. General
      1. Source Type = "Remote"
    2. Source
      1. Remote Protocol = "HTTP"
      2. Remote Method = "Simple"
      3. Remote Host Name = "localhost"
      4. Remote Host Port = "8080"
      5. Remote Host Path = "/?action=stream"
      6. Remote Image Colors = "24 bit color"
      7. Capture Width (pixels) = "320"
      8. Capture Height (pixels) = "240"
  6. 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

  1. http://ubuntuforums.org/showthread.php?t=1566970
  2. http://blog.philippklaus.de/blog/2012/01/09/compile-mjpg-streamer-from-source-on-ubuntu-11-10/
  3. http://www.zoneminder.com/wiki/index.php/Uvc
  4. http://siripong-computer-tips.blogspot.com/2011/10/zoneminder-troubleshooting-guide.html