Zoneminder Server Setup

Forum for questions and support relating to the 1.28.x releases only.
Locked
bmather9
Posts: 23
Joined: Sun Jul 19, 2015 10:44 pm

Zoneminder Server Setup

Post by bmather9 »

So I'm planning my setup and expecting about 6 x 1080p IP cameras to cover my home. My headless Ubuntu server runs a Pentium G620 dual core at 2.6 Ghz with 8GB of RAM and plenty of storage, roughly 9TB.

My first question is how many cameras can it safely handle with motion detection and recording? I also use it as a fileserver/media streaming, Bittorrent downloads, and VPN, but I'm pretty much the only user (other than my wife who almost never uses it). I'd be ok turning down the frame rate a bit, but do want to be able to see relatively fluid motion.

Next, I've see the IPCamMontage (http://www.zoneminder.com/wiki/index.php/IpCamMontage) which could probably be a solution to help me keep lower load on the server if necessary, but I'm not sure how this would work if I want to view it from outside of my LAN? I'd certainly want to secure it somehow and that doesn't seem so easy?

If I just decide to do any viewing through Zoneminder, I'd like to also be able to do so from outside my LAN without needed to connect to my VPN. Is Zoneminder considered secure to open to the web? I guess I probably need to do some reading on this, but if someone could point me in the right direction I'd appreciate it.

Thanks!
bmather9
Posts: 23
Joined: Sun Jul 19, 2015 10:44 pm

Re: Zoneminder Server Setup

Post by bmather9 »

One more thing I just thought of...it appears zoneminder doesn't record or monitor any audio??? Are there any solutions for this?
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zoneminder Server Setup

Post by bbunge »

You should be OK with 6 cameras. Start with low resolution and frame rate to get it running then push these up to see want happens.
As for the audio, there are some areas where it is illegal to record audio unless you have warnings posted. Pennsylvania is one. See the WIKI for CCTV laws for more info.

bb
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder Server Setup

Post by knight-of-ni »

Basically what bbunge just said.

It is not realistic to expect six 1080p cameras to work on a 2.6GHz dual core machine without making compromises. It might work at 1-2 fps and no motion detection, but even that would be close.

The only way to get a precise answer is to configure just one camera and observe the cpu usage.
You need to get your cpu usage to about 25% per camera.

Here is how I figured that:
desired cpu cap = 75% (you need to leave room for other processes)
75% / 25% = 3 x number of cores = 6 cameras

With this load, doing anything else significant on this machine is out the question.

Streaming this remotely at full resolution will be an issue. Fortunately, you can configure zoneminder user accounts with default resolutions that are less.

What is your upload bandwidth?
My 720p @5fps camera uses ~2.5Mbps streaming from the server to a local client.
I've got a 4Mpbs upload, and this camera drops packets on me every time, but I've always got other things competing for bandwidth.

Honestly, I recommend you get a better machine, especially since you want to do additional things with it. You can afford six 1080p cameras, which means buying an off-lease server is likely a reasonable expense. Sounds like you already have plenty of disks, one can get empty 8 core server for a mere $200-300 on ebay.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
bmather9
Posts: 23
Joined: Sun Jul 19, 2015 10:44 pm

Re: Zoneminder Server Setup

Post by bmather9 »

knnniggett wrote:Basically what bbunge just said.

It is not realistic to expect six 1080p cameras to work on a 2.6GHz dual core machine without making compromises. It might work at 1-2 fps and no motion detection, but even that would be close.

The only way to get a precise answer is to configure just one camera and observe the cpu usage.
You need to get your cpu usage to about 25% per camera.

Here is how I figured that:
desired cpu cap = 75% (you need to leave room for other processes)
75% / 25% = 3 x number of cores = 6 cameras

With this load, doing anything else significant on this machine is out the question.

Streaming this remotely at full resolution will be an issue. Fortunately, you can configure zoneminder user accounts with default resolutions that are less.

What is your upload bandwidth?
My 720p @5fps camera uses ~2.5Mbps streaming from the server to a local client.
I've got a 4Mpbs upload, and this camera drops packets on me every time, but I've always got other things competing for bandwidth.

Honestly, I recommend you get a better machine, especially since you want to do additional things with it. You can afford six 1080p cameras, which means buying an off-lease server is likely a reasonable expense. Sounds like you already have plenty of disks, one can get empty 8 core server for a mere $200-300 on ebay.
I have 5 Mbps upload without much else competing for it. I understand 1080p streaming can be difficult outside of the LAN and I'm ok with dropping to 720p if needed.

Buying another machine to handle the load might be an option, but what other options do I have? Originally I was testing out with a samsung SmartCam which was nice because it does the motion detection internally and has local recording. I was thinking of using ZoneMinder to just have a second source of recording. The SmartCam image quality was crap so I gave up on that idea and am now looking into relying on ZoneMinder using Hikivision or Dahua Cameras. I guess the lower price for the cameras makes up for buying a 2nd server for recording.

Maybe I should layout my goals and see how you think I should attain them:

For roughly 6 cameras:
1. 1080p recording/dual location (potentially low-rate jpeg frames backed up to the cloud)
2. Motion detection (zoneminder seems to be able to handle this; maybe backup some images to the cloud when motion is detected?)
3. Power failure resistant (I plan to solve this one with a good UPS)
4. Night Vision (given with most cameras I've looked at)
5. Viewing multiple cameras inside and outside of the LAN (can I do a montage without going through zoneminder to avoid loading up the server? can these be set to different resolutions/framerates?)
6. turn off recording when I'm home (I intend to script this for when my cell phone is connected to my home wifi)
7. Audio recording would be a nice to have

Thanks for the advice!
Locked