Compiling ZoneMinder 1.25 from Source

ZoneMinder ScreenshotI have a nice MythTV setup in the house, which is an open source DVR software project.  I also have several IP cameras for security but haven’t been happy with the various software tools I’ve used for viewing and controlling them. I finally decided recently to install ZoneMinder to enable recording video when my alarm goes off or motion is detected.  I want to use the ZoneMinder MythTV plugin so I can view camera feeds in Myth and manage recorded footage. This will give me the capability of reviewing surveillance video just like watching a show on a DVR – a pretty handy tool.

So according to this wiki page:

NOTE: starting from ZoneMinder version 1.24.3, “mapped memory” is the default method instead of “shared memory”. MythZoneMinder only supports “shared memory” access so you need to have ZoneMinder installation which was compiled explicitly to use older “shared memory” access. If MythZoneMinder is used together with ZonerMinder installation using “mapped memory”, the Live View does not work.

Unfortunately, that doesn’t tell the whole story. But if you download the latest ZoneMinder packages (1.25 as of this writing) and run ./configure -h you will see there is an option for “–enable-mmap=yes”

So for me, the instructions here almost worked perfectly. Apparently there has been a split / fork in libffmpeg that is causing some headaches. To get mine to compile I had to add:

#include libavutil/mathematics.h

to zm_ffmpeg.h (make sure it is inside the extern “C” section and surround with greater than / less than characters that WordPress will not let me escape). Credit to this link. I also added it zm_mpeg.h while I was hacking through some errors (again it is a pure C library in a C++ file so you need the extern).

So this got me to the point of a building Zoneminder 1.25 on Ubuntu 12.04 x64. Now on to install / configure / hook up to MythTv.

*** UPDATE ***
Wish I had read this page first. Apparently Ubuntu version has the shared memory enabled. So all you have to do is follow the standard package manager steps to make it work.

No comments yet - be first!

Add your thoughts