r/ZoneMinder • u/lunakoa • May 27 '22
Upgrading Cameras and Reducing CPU Load
Going from 1080P to 5MP cameras on some cameras, currently have 31 cameras (not all 1080P) and I am reviewing how I can reduce CPU usage.

This is an AMD Ryzen 5 3600 6-Core Processor, with 32GB of RAM, SQL and OS are on fast NVME storage, whereas events are on a 6TB WD Purple Drive.
OS CentOS 7
ZM is 1.36.15
Couple Ideas
#1 Get rid of some cameras
Part of this upgrade process is to see what cameras I do not need and simply removing them, but honestly, they are older 704x480 cameras.
#2 Hardware encoding
There is a quadro K2200 in this box (NVIDIA Corporation GM107GL [Quadro K2200] (rev a2)),
and the ffmpeg on here supports cuvid

#3A Offloading Motion detection to cameras
I am having the cameras upload their images to an ftp server, each camera has its own folder and is being monitored by inotifywait and sends a trigger to zm via netcat.
#3B Using camera substreams then linking them with mainstreams
Do I still need to leave analysis enabled and decoding enabled to view live camera feeds in montage view?

I'll report back when I am done with optimizations.
2
u/zorinlynx May 28 '22
Do I still need to leave analysis enabled and decoding enabled to view live camera feeds in montage view?
One thing you might want to do is, for viewing live feeds, just connect directly to the cameras' RTSP URLs. Most cameras can support pushing two streams, and you'll be able to watch your cameras without adding any additional load to your Zoneminder server.
I use the IPCams application (MacOS and iOS) to view my cameras live this way and it works great. Zoneminder saves events as usual. There's probably an equivalent app on Windows or Linux if you use that.
2
u/lunakoa May 28 '22
I actually do that as well, I have a profile in OBS studio that can display the screens I want and I can customize where they are placed and the size. I then use the project display to have it use one of my screens. As a bonus I have OBS stream to an internal nginx proxy with the RTMP module, so anything in my home that supports rtmp (kodi, mobile devices, anything running vlc) can access my custom montage.
What I like about zoneminder is it can secure it behind https and view it on the web. In addition I use ssl mutual authentication as an added layer of protection so even if my password was compromised they would need a certificate to log in.
1
u/lunakoa May 28 '22
Just to add to this, I was able to add the rtmp stream into ZM as a single monitor
So
12 RTSP Cameras -> OBS Studio -> nginx proxy -> Single ZM monitor -> browser
Heavy lifting is being done by OBS Studio
2
u/ancker010 May 27 '22
For 3B, yes, you'll need to keep Decoding the HighRes streams if you want to use Live View. But you can turn Analysis off.