Switching to ZoneMinder

Published: Sunday, April 19, 2020

Tags: ZoneMinder

Blue Iris (version 4) has been my video surveillance software for three years. It was a good place to start, and easy to get things up and running, especially considering how little experience I had with IP cameras. The developer also offered software updates until sometime in 2019 when version 5 came out and they demanded payment for upgrade.

I had been very happy with the software updates, especially impressed with the redesign of the web UI. It evolved from 1990's low resolution JPEG snap shots to fully mobile-friendly interactive UI. I also purchased their phone app, which works most of the time..when the main menu is accessible. Not a big deal since a quick restart can fix this.

The issues with Blue Iris ...

  • Limited motion detection parameters. Lots of false alarm from the shadows of the palm tree leaves in windy days.
  • High CPU usage when the main window is not minimized. I rarely access the desktop and when I do, everything is slow.
  • Runs only on Windows.

Time for a change

ZoneMinder is probably the most widely used open source video surveillance software system. The latest version at the time is v1.34.9. It wasn't too challenging to setup and add the cameras. The only time consuming part was figuring out the Source Path for each camera. The list from their wiki page was very helpful. It also took some time to understand how motion detection works in ZoneMinder. Further tuning of the parameters would also be required (example).

Major troubles encountered and solutions

Out of memory

This wiki page provides the equation for minimal memory in dev/shm

Min Memory = 1.2 * ((image-width*image-height*image buffer size*target color space*number of cameras/8/1024/1024 )

Fix 'No Data' in montage review

The text overlay 'No Data' is displayed at all times, even when the timeline shows motion detected with recordings.

Digging into the Log and located the error

Fatal: Can't create frame images from video for this event xxx.mp4
image.php  Line 213

This was caused by incorrect PATH_FFMEPG setting in the options. It was left empty with default installation. Enabling OPT_FFMEPG and adding PATH_FFMPEG fixed this issue.

Fix API issue

When trying to access http://server/zm/api/host/getVersion.json
I got 404 error: The requested URL was not found on this server.
It seems that there was a problem with URL rewrite engine/configuration. Adding the following to /etc/apache2/conf-enabled/zoneminder.conf file resolved the issue:
<Directory "/usr/share/zoneminder/www/api">
   RewriteEngine on
   RewriteRule ^$ app/webroot/ [L]
   RewriteRule (.*) app/webroot/$1 [L]
   RewriteBase /zm/api

<Directory "/usr/share/zoneminder/www/api/app">
   RewriteEngine on
   RewriteRule ^$ webroot/ [L]
   RewriteRule (.*) webroot/$1 [L]
   RewriteBase /zm/api

<Directory "/usr/share/zoneminder/www/api/app/webroot">
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    RewriteBase /zm/api

Can't display more than 5 views in Montage

This is a known issue with browsers.

Final thoughts

It seems to be working well so far. The freedom in motion detection parameters is very appealing. The mobile app zmNinja is very well designed and built. The menus, views, timelines, and events are exactly where they need to be. It runs so much faster compared to Blue Iris app, also faster than web browser. A big thank you to the developer!