# Zoneminder status with Arecont Cameras



## Phishfry (Aug 4, 2017)

I was wondering how well the zoneminder port works?

What is a reasonable amount of cameras it can support?

I am using Arecont cameras 5MP with the Arecont Windows software and I want to make the switch to FreeBSD. I have one installation with 8 cameras and one with 12. I have a couple at home I want to test with to start with.

Any real world install issues? Can it do motion detection? Can it interface with GPIO switches?

Is the FreeBSD version on par with the Linux version?


----------



## Phishfry (Aug 4, 2017)

I want to build a FreeBSD NVR. Maybe with NanoBSD.
Spinning up a box now. Looks like zoneminder is in ports.
Looks like the zoneminder forum has very recent FreeBSD chatter so I will check that out too.


----------



## abishai (Aug 6, 2017)

I use 12 3MP cameras in jailed ZM (H264 version).


----------



## Phishfry (Aug 7, 2017)

I now have nginx, php-fpm, fcgiwrap and mysql-server configured and zoneminder service is now running and web interface up.

I used the google drive pdf from the zoneminder forum for setup.

I applied these changes from a recent forum post:

```
Fix was the fcgiwrap ownership to www:www not root:wheel

/usr/local/etc/rc.d/fcgiwrap and change:
fcgiwrap_socket_owner=${fcgiwrap_socket_owner:-"www"}
fcgiwrap_socket_group=${fcgiwrap_socket_group:-"www"}

chown -R www:www /var/run/fcgiwrap
```


On 11.1-Release I installed from packages: zoneminder-h264 myphp56-server fcgiwrap nginx
I have never installed FEMP before so that was a blast.

My nginx.conf needed a change from the pdf it seems for cgi path.
location = /cgi-bin/ {

Thank You abishai for the work. It is the most complex port I have ever used.
I also could not cut and paste from the pdf so that took much longer.

Now to fire up some cameras.


----------



## abishai (Aug 7, 2017)

It is incorrect to edit rc.d file, provided by port.

```
fcgiwrap_user="www"
fcgiwrap_socket_owner="www"
```
 in rc.conf is enough.

```
abishai@zm:~ % ls -lah /var/run/fcgiwrap/fcgiwrap.sock
srwxr-xr-x  1 www  wheel     0B Aug  7 03:00 /var/run/fcgiwrap/fcgiwrap.sock
```
I'm not the author of pdf, one of the testers wrote it. I described the process in port itself https://svnweb.freebsd.org/ports/he...es/README.FreeBSD?revision=417398&view=markup


----------



## Phishfry (Aug 16, 2017)

Thanks I have my first camera running for a few days now. I really like this software.

One thing I don't see documented anywhere is ffmpeg server.
A guy on IRC gave me his Zoneminder FreeBSD settings, some I saw nowhere else. Not sure they are all needed.

/etc/rc.conf

```
nginx_enable="YES"
php_fpm_enable="YES"
mysql_server_enable="YES"
mysql_enable="YES"
fcgiwrap_enable="YES"
fcgiwrap_user="www"
fcgiwrap_socket_group="www"
fcgiwrap_socket_owner="www"
fcgiwrap_flags="-c 4"
fcgiwrap_socket_mode="0755"
ffserver_enable="YES"
zoneminder_enable="YES"
```


----------



## ronaldlees (Aug 17, 2017)

This port looks interesting.   I noticed that Phishfry listed the package called zoneminder-h264..  I have all raw and MJPEG cameras.  So maybe there's a zoneminder-mjpeg port.   Very intersting.  Thanks for posting.


----------



## Phishfry (Aug 17, 2017)

You raise a good point. What is the difference between Zoneminder and Zoneminder-h264
I used the latter due to tutorials I used.
I think the h264 port is geared more to the newer digital IP cameras and the original port best for analog cameras.
The h264 version will do mjpeg and h264 with rtsp streams on the Arecont cameras.


----------



## Phishfry (Aug 18, 2017)

Phishfry said:


> My nginx.conf needed a change from the pdf it seems for cgi path.
> location = /cgi-bin/ {


This was totally wrong. The instructions are right.
I am so happy with this program I decided to post some screenshots. It was a bear to setup but simple to use.


----------



## Phishfry (Aug 18, 2017)

Here is Monitor-1 with the events at the bottom.


----------



## Phishfry (Aug 18, 2017)

The view for multiple cameras is called Montage. I setup a third camera but still fine tuning.


----------



## ronaldlees (Aug 24, 2017)

Do you know if it will work with Postgresql rather than mysql?


----------



## Phishfry (Aug 25, 2017)

The Zoneminder forum had something about that topic:
https://forums.zoneminder.com/viewtopic.php?t=25785


----------



## Phishfry (Aug 26, 2017)

The more I use Zoneminder the less I like it. It really seems going in the right direction but it is awkward to use.

With Zoneminder I have missing captures of obvious events.

Also my IP cams switch between low light and drop a frame here and there but it makes a log entry for Signal Loss and it is filling the log making it hard to use the program. Half the events are junk signal loss.

I need to figure out how to filter the log and how to refine motion capture.


----------



## ronaldlees (Aug 26, 2017)

The POS software I'm using now with webcams breaks on signal loss, so just getting an event log item would be a great improvement    Not going to say which software, since I slandered it.


----------



## trumee (Aug 29, 2017)

Phishfry said:


> The more I use Zoneminder the less I like it. It really seems going in the right direction but it is awkward to use.
> 
> With Zoneminder I have missing captures of obvious events.
> 
> ...



In camera settings>Buffers>Alarm count, increase this to 2 or 3 to reduce the junk events.


----------



## abishai (Aug 29, 2017)

Phishfry said:


> One thing I don't see documented anywhere is ffmpeg server.


ZM doesn't use it, it uses only tiny bits of ffmpeg itself.



ronaldlees said:


> Do you know if it will work with Postgresql rather than mysql?


No.



Phishfry said:


> I need to figure out how to filter the log and how to refine motion capture.


You can set  job that cleans them (in ZM web console). However, my cameras don't drop frames when switch.



Phishfry said:


> What is the difference between Zoneminder and Zoneminder-h264


h264 has experimental backend that saves streams to mpeg4 container instead of plain jpegs. Also, it can write h264 streams from camers directly to disk, saving resources for monitors in record or mocord modes. web interface of this version is slightly broken by design (uses external js scripts for playing, it's stupid in surveillance software). I use it in production with ZMNinja client (not available on FreeBSD)


----------



## Phishfry (Aug 30, 2017)

trumee said:


> In camera settings>Buffers>Alarm count, increase this to 2 or 3 to reduce the junk events


Now that was the tip I needed. 2 frames was enough to stop all meaningless Signal events.
That tab also has the pre-event/post event image count so I cleaned up my captures with that.
Thanks for the help.



abishai said:


> it uses only tiny bits of ffmpeg itself.


Ok Thanks for that information. So no need to enable ffserver in /etc/rc.conf then?
I had someone in the IRC/bsd-mips offer up his setup and it had several settings I saw nowhere else. So I dunno the validity..


----------

