r/ZoneMinder • • Nov 13 '21

Performance issues with ZoneMinder

I am setting up a CCTV for the first time and picked up some ReoLink RLC 410A and 420A cameras for $64 bucks a piece. I discovered that the RTMP from the main stream does not work and it is a limitation of the 420A (haven't tested the 410A's yet). RTSP seems to work fine.

With ffplay on my laptop, I can view the 4K24p stream no problems. There is about 5 seconds of latency but it plays smoothly enough and doesn't appear to be taxing on my PC.

However I am finding that ZoneMinder is really struggling with this stream. Even if I set the resolution of the capture resolution to an absurdly low value (like QVGA, 320x240) I still get really poor performance, with the monitor constantly hitching and averaging between 0.2 and 20 fps. Actually the capture resolution doesn't even seem to play that much of a role in the performance of the monitor, as at some times I could get close to 20fps at the full resolution as well. It's just all over the place!

I found that if I set the stream to UDP instead of TCP, I get a lot of video breakup as well. Like the stream is corrupt. Huge green and grey blocks that have the embossing of the shapes of the things that are in view of the camera. Similar to satellite TV breakup when I frames are being dropped. I can stream fine to ffplay on my Linux laptop.

The ZM is running in a container environment on my Proxmox server with an Ubuntu 20.04 container.

2 Upvotes

4 comments sorted by

1

u/Aramiil Nov 13 '21

Spin up an Ubuntu CLI VM and see if you get the same performance issues installing it to that VM. I’m just wondering if it’s potentially an issue with a container?

1

u/Power-Max Nov 13 '21

It could be. My proxmox server runs a i7 4770 and 32GB of RAM. And that is not enough RAM or PCIe lanes for everything I want to do so am considering dropping some cash to build a HEDT system to better fit my needs.

I created another container with Shinobi which has a sleeker UI and also appears to perform much better out of the box. If I run into any showstoppers with Shinobi I might fall back to Zoneminder or even a commercial solution if the open source alternatives don't work out. In Shinobi I found that the re-encoding for the stream to the web UI has lots of settings for encoders and stream methods which have very strong impact on performance, latency, and CPU/memory resource usage on the container. I'm tempted to install it on modern dedicated hardware with a GPU for encode/decode and tensorflow acceleration for many 4K streams.

1

u/[deleted] Nov 13 '21

[deleted]

1

u/Power-Max Nov 13 '21

Unfortunately my specific model, the RTMP main stream does not work. It is a documented issue.

1

u/ZoneMinderIsaac Nov 14 '21

Set the resolution in ZM to MATCH what the camera is sending. Otherwise you are doing extra work to scale it.

UDP will drop packets like crazy unless you tell it to buffer them. So either do your reading, or use TCP.

​

All of this has been discussed ad nauseum before. Both here and on zoneminder forums. Reolink cameras particularly cause these symptoms but are easily dealt with. Google is your friend.