Package Details: zoneminder 1.30.4-1

Git Clone URL: (read-only)
Package Base: zoneminder
Description: Capture, analyse, record and monitor video security cameras
Upstream URL:
Keywords: analyse camera capture monitor record security video zoneminder
Licenses: GPL
Submitter: None
Maintainer: mesmer
Last Packager: mesmer
Votes: 54
Popularity: 0.054847
First Submitted: 2008-03-21 00:09
Last Updated: 2017-09-16 00:01

Required by (1)

Sources (6)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

Nocifer commented on 2018-09-23 19:34


Would you care to elaborate on what kind of "a few problems here or there" you've been having? I'd like to fix them if I can (and if they're due to faulty packaging), that's the whole point of my updating this ancient PKGBUILD :)

Regarding ffmpeg 4.0.2-3: I just rebuilt and reinstalled zoneminder and it worked as before, without any errors or hick-ups. The only difference I could spot is at the end of CMake's configuration step, where in the "Optional libraries not found" list there is a new "AVResample" item added. I did a little digging though and I found that the entire reason for Arch updating the ffmpeg package was to drop support for libavresample. See here:

So this is probably our culprit. Seeing as it is designated "optional" in ZoneMinder's CMake file, it seems like it isn't an absolutely required component. So, if your setup is broken, I guess that unknowingly to you or not your camera(s) have been making use of video resampling through ffmpeg.

If that's what you really want or need (i.e. for some reason your camera(s) need that specific resampling library to work properly - which I doubt) then maybe you could consider using libvlc instead of ffmpeg, as it's there for precisely that reason - as an optional alternative in case ffmpeg doesn't cover your needs.

If that isn't the case, then maybe you could try fiddling with your camera(s)'s settings and find a way to either change the resampling method or disable the resampling altogether. Sorry for being so vague but as I said, I'm not exactly an expert on ZoneMinder :P

alanking commented on 2018-09-23 10:50

appreciate your work Nocifer, works pretty well mostly. I am having a few problems here or there but overall it is mostly working... just wanted to warn users the ffmpeg 1:4.0.2-3 update yesterday broke zm. so i needed to downgrade.

Nocifer commented on 2018-09-15 22:46

After almost a year of eagerly waiting for this package to be updated, I decided to take matters into my own hands. Some much needed observations:

  • This package is an effing mess.
  • ZoneMinder itself is an effing mess.
  • ZoneMinder's documentation is an even worse effing mess (I'm talking instructions conflicting with other instructions within the same file, and both of them being outdated or just plain wrong).

This is really not intended as bashing to ZoneMinder's developers or to the previous and current (?) maintainers of this package, it's just something I had to get out of my chest. Developers, please keep up the good work!

So, first the good news:

  • ZoneMinder is updated to its latest version 1.32 and builds and runs on a current Arch installation. No more downgrading, no more hacking, no more cursing.
  • It now uses Nginx instead of Apache (yeah, I know that some people may want it without hardcoded dependencies on either an HTTP server or a database server, but first things first - first we get it working, then we can think about proper deployment).
  • As far as I can tell everything works properly, meaning I have successfully added a camera and viewed its live feed, recorded motion events, etc. Oh, and the API works as well (tested with both official instructions and zmNinja).
  • It installs ready to run out of the box, i.e. the database is created automatically and Nginx, PHP-FPM et al are also configured automatically.

Now, the not-so-good news:

  • I'm not a Perl coder, so I can't properly debug missing or buggy modules etc besides what I can gleam from the various error logs. There are some errors here and there there that mostly have to do with missing memory maps, which I believe have more to do with the software itself rather than the packaging. But, I may be wrong.
  • I have never used ZoneMinder before, so I can't really tell if everything is really working properly.
  • I only have access to an old-ish, cheap-ish Foscam IP camera, which means that I can't easily tell whether bad and/or buggy performance is my fault, ZoneMinder's fault or the camera's fault.

What this comes down to is: people with experience on using ZoneMinder, please check these errors and see if you can tell whether they're errors that should be fixed on my side or common bugs that upstream should/will take care of. Also, assume that I have made errors in packaging and/or forgotten a few dependencies, so please check every nook and corner to ensure that nothing is blatantly broken!

And finally the bad news:

  • In order to make ZoneMinder run automagically I had to resort to a few hacks like messing with the main Nginx configuration file without checking whether its contents have been changed from the default or not (i.e. whether this is a fresh install or it was already installed). In the same vein there should be a few other sanity checks in the script, like checking whether there is already a previous ZoneMinder database in place and upgrading it instead of trying to create it (and probably failing miserably). Suffice to say that this PKGBUILD may just make your PC go boom or do other bad things, so I recommend checking it out extensively before you use it. Caveat emptor. You have been warned.

Without further ado:

Fingers crossed that it works for you as great as it worked for me.

Oh, also @zlqrn:

"why is this beautiful software so hard to install!!!!"

It's hard because under the surface it's really not as beautiful as you may think... :P

alanking commented on 2018-09-14 21:37

I hope so, as of now my zoneminder is broke due to PHP 7 and ffmpg/x265 updates which I had to allow for other packages. I see the new version is PHP 7 compatible. Fingers crossed mesmar or someone else can maintain this important package.

escentrix commented on 2018-09-14 20:24

There is a new version out now. Is this package still maintained for an expected update?

ImNtReal commented on 2018-09-13 14:00

Seems like onvif support requires: perl-data-uuid perl-soap-wsdl perl-io-socket-multicast

zlqrn commented on 2018-07-30 13:50

WHY?? every year something goes nuts with zoneminder.

cant follow @hardroids example because getting ffmpeg3.4-full to install is/was a bitch. then after pulling that miracle zoneminder wont install because i get a cmake error with zm.dir and zm_mpeg at 38% build point >> all research indicates this is a ffmpeg issue. SO WTF is going on?? (i know nu updates of ffmpeg chanes nomenclature and shit but come on).

why is this beautiful software so hard to install!!!!

@hardroid > please explaing a bit more about your ubuntu installation. you have another machine where you copied folders from? your new PKGBLD is defintely better. but still cant get this damn software to install. so bad and such a waste of time i sometimes think i will have to ditch arch linux (dont want to anyway) MESMER PLZ UPDATE

hardroid commented on 2018-06-07 16:17

Finally I got this working with php-7.2!

And also with API works!

API from ubuntu package!

First I did JohnyRi's steps (thx JohnyRi!)

1) force remove ffmpeg by

pacman -Rdd ffmpeg

2) downgrading the x265 package to 2.7-1.

downgrade x265

3) install ffmpeg 3.4.2-2 using downgrade.

downgrade ffmpeg


installing perl-sys-cpu and perl-sys-meminfo

yaourt -S perl-sys-cpu perl-sys-meminfo


Compiling and installing with this PKGBUILD

a.) changed sha key to the new one

b.) changed ZoneMinder-$pkgver everywhere to zoneminder-$pkgver

c.) removed php-mcrypt from dependencies

# Maintainer: ...
pkgdesc='Capture, analyse, record and monitor video security cameras'
arch=( i686 x86_64 mips64el arm armv7h )
backup=( etc/zm.conf )
license=( GPL )
    mariadb perl-dbd-mysql perl-dbi
    apache php php-apache php-gd perl-php-serialization
    perl-libwww perl-net-sftp-foreign
    ffmpeg vlc perl-sys-mmap
    gnutls polkit
    perl-expect perl-archive-zip perl-date-manip
    perl-mime-lite perl-mime-tools
    cmake netpbm git 
    'php-apcu-bci: Bring back the API for android control'


prepare () {
    cd $srcdir/zoneminder-$pkgver/web/api/app/Plugin/
    if [ ! -d "crud" ]; then
    git clone -b 3.0
    mkdir -p Crud
    mv  crud/* Crud
    patch $srcdir/zoneminder-$pkgver/src/zm_image.cpp < $srcdir/fabs.patch
    patch $srcdir/zoneminder-$pkgver/src/zm_comms.h < $srcdir/uio.patch

build() {
   cd $srcdir/zoneminder-$pkgver

   cmake -DCMAKE_INSTALL_PREFIX=/usr \
          -DZM_PERL_SUBPREFIX=/lib/perl5 \
          -DZM_WEBDIR=/srv/http/zoneminder \
          -DZM_CGIDIR=/srv/http/cgi-bin \
          -DZM_WEB_USER=http \
          -DZM_CONTENTDIR=/var/cache/zoneminder \
          -DZM_LOGDIR=/var/log/zoneminder \
          -DZM_RUNDIR=/run/zoneminder \
          -DZM_TMPDIR=/var/lib/zoneminder/temp \
          -DZM_SOCKDIR=/var/lib/zoneminder/sock .

    make V=0

package() {

    cd $srcdir/zoneminder-$pkgver

    DESTDIR=$pkgdir make install

    # Change Polkit directory permissions to Arch Linux policy
    chmod -v 700 $pkgdir/usr/share/polkit-1/rules.d/
    chown -v polkitd $pkgdir/usr/share/polkit-1/rules.d/

    mkdir -pv           $pkgdir/var/{cache/zoneminder,log/zoneminder}
    chown -Rv http.http $pkgdir/var/{cache/zoneminder,log/zoneminder}

    # corresponds to -DZM_SOCKDIR=/var/lib/zoneminder/sock
    mkdir -pv          $pkgdir/var/lib/zoneminder/sock
    chown -v http.http $pkgdir/var/lib/zoneminder/sock

    # corresponds to -DZM_TMPDIR=/var/lib/zoneminder/temp
    mkdir -pv          $pkgdir/var/lib/zoneminder/temp
    chown -v http.http $pkgdir/var/lib/zoneminder/temp

    chown -v  http.http $pkgdir/etc/zm.conf 
    chmod 0700          $pkgdir/etc/zm.conf

    # Make content directories in /var/cache/zoneminder and to link them in /srv/http/zoneminder
    for i in events images temp; do
        mkdir              $pkgdir/var/cache/$_pkgname/$i
        chown -v http.http $pkgdir/var/cache/$_pkgname/$i
        ln -s                     /var/cache/$_pkgname/$i $pkgdir/srv/http/$_pkgname/$i
        chown -v --no-dereference http.http               $pkgdir/srv/http/$_pkgname/$i

    # Create a link to the Zoneminder cgi binaries
    ln -sv /srv/http/cgi-bin $pkgdir/srv/http/$_pkgname

    chown -h http.http $pkgdir/srv/http/{cgi-bin,$_pkgname,$_pkgname/cgi-bin}

    # Link Cambozola
    # ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$_pkgname

    # Install configuration files
    mkdir -p                                        $pkgdir/etc/httpd/conf/extra
    install -D -m 644 $srcdir/httpd-$_pkgname.conf  $pkgdir/etc/httpd/conf/extra

    mkdir -p                                        $pkgdir/usr/lib/systemd/system
    install -D -m 644 $srcdir/$_pkgname.service     $pkgdir/usr/lib/systemd/system

    install -D -m 644 COPYING                       $pkgdir/usr/share/license/$_pkgname
    install -D -m 644 db/zm*.sql                    $pkgdir/usr/share/$_pkgname/db

    mkdir -p                                        $pkgdir/usr/share/doc/$_pkgname
    # install -D -m 644 $srcdir/README              $pkgdir/usr/share/doc/$_pkgname

    install -Dm644 ../zoneminder-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/zoneminder.conf

Then I copied API Folder (/usr/share/zoneminder/www/api) from my ubuntu bionic installation:

Package: zoneminder
Version: 1.30.4-bionic
to the arch linux zoneminder api folder (/srv/http/zoneminder/api) (overwrite all existing)

This was the trick!

In ZMNinja Android App the "ZM cgi-bin URL" has to be changed from http://your-ip/zm/cgi-bin to http://your-ip/cgi-bin and it workes perfectly

JohnyRi commented on 2018-06-03 07:22

Hi, @sav I managed to temporarily fix the bug by doing this:

1) force remove ffmpeg by # pacman -Rdd ffmpeg.

2) downgrading the x265 package to 2.7-1.

3) install ffmpeg 3.4.2-2 using downgrade.

Hope this helps until the zoneminder package is fixed.

Be aware that doing upgrade without disabling x265 and ffmpeg packages to update would result in zoneminder stop working again.

sav commented on 2018-06-01 17:36

@antoined, after upgrading the system, rolled back the ffmpeg package to version 1-_3.4.2-2-x86_64 and zoneminder worked. Now this procedure does not work. When will we see the solution or update?