Smooth events, but choppy live view.
Posted: Sat Jan 15, 2022 3:14 pm
Hello everyone,
I am pretty new to ZoneMinder and currently setting up a server for recording 4 HikVision DS-2CD1343G0-I 4mp cameras.
The server is a X8SIE Supermicro quad-core x3440 XEON machine with 16GB of ram, SSD sata3 drive on a 1000mbps network.
Zoneminder version is 1.34.23 installed via apt-get on a clean Debian 11 Bullseye.
Accessing the camera via rtsp://user:pass@192.168.1.64:554/Streaming/Channels/101
At first I got choppy events and choppy live feed. After trying out different configuration options I managed to guess that "H264 camera passthrough" mode was the key to getting events to record and playback smoothly. I currently have only one camera attached working at 2560x1440 and streaming at 20fps. All events are played in a nice-looking player with playback options, volume control, progress bar and playback speed selector. Great!
The problem is that I cannot get the same quality for the live view. When opening live view it says it is getting around 20fps from the camera, the resolution looks fine, but the stream is choppy. Definitely nowhere near 20fps. A few seconds behind (which is ok) but skipping a lot of frames. It does not look like a player, no volume control, no full screen button, just video window playing a few frames per second. Zoneminder bandwidth setting is set to High, so the stream should not lowered in quality due to bandwidth reasons.
Meanwhile the server load is around 2 (50%) and memory usage is below 1G, so there should be no CPU or RAM bottleneck. However I still think the load is getting way too high for simply recording just one camera. Here is top overview:
top - 17:03:38 up 3 days, 5:21, 1 user, load average: 2.34, 2.27, 2.04
Tasks: 118 total, 4 running, 114 sleeping, 0 stopped, 0 zombie
%Cpu(s): 95.4 us, 3.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 1.7 si, 0.0 st
MiB Mem : 16001.1 total, 174.9 free, 926.2 used, 14900.0 buff/cache
MiB Swap: 16367.0 total, 16362.0 free, 5.0 used. 14588.4 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
33969 www-data 20 0 610724 431308 162756 R 44.7 2.6 1681:46 zma
33965 www-data 20 0 430968 236056 168300 R 31.1 1.4 918:31.67 zmc
84203 www-data 20 0 418816 174784 165160 R 21.5 1.1 1:24.42 nph-zms
Iotop reports around 100k/s activity on the SSD drive, so it is barely being used.
How do I get the live view to play smoothly like the events do?
Perhaps the solution to the first problem will also solve the high CPU load?
Any advice?
Regards,
LuboD
I am pretty new to ZoneMinder and currently setting up a server for recording 4 HikVision DS-2CD1343G0-I 4mp cameras.
The server is a X8SIE Supermicro quad-core x3440 XEON machine with 16GB of ram, SSD sata3 drive on a 1000mbps network.
Zoneminder version is 1.34.23 installed via apt-get on a clean Debian 11 Bullseye.
Accessing the camera via rtsp://user:pass@192.168.1.64:554/Streaming/Channels/101
At first I got choppy events and choppy live feed. After trying out different configuration options I managed to guess that "H264 camera passthrough" mode was the key to getting events to record and playback smoothly. I currently have only one camera attached working at 2560x1440 and streaming at 20fps. All events are played in a nice-looking player with playback options, volume control, progress bar and playback speed selector. Great!
The problem is that I cannot get the same quality for the live view. When opening live view it says it is getting around 20fps from the camera, the resolution looks fine, but the stream is choppy. Definitely nowhere near 20fps. A few seconds behind (which is ok) but skipping a lot of frames. It does not look like a player, no volume control, no full screen button, just video window playing a few frames per second. Zoneminder bandwidth setting is set to High, so the stream should not lowered in quality due to bandwidth reasons.
Meanwhile the server load is around 2 (50%) and memory usage is below 1G, so there should be no CPU or RAM bottleneck. However I still think the load is getting way too high for simply recording just one camera. Here is top overview:
top - 17:03:38 up 3 days, 5:21, 1 user, load average: 2.34, 2.27, 2.04
Tasks: 118 total, 4 running, 114 sleeping, 0 stopped, 0 zombie
%Cpu(s): 95.4 us, 3.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 1.7 si, 0.0 st
MiB Mem : 16001.1 total, 174.9 free, 926.2 used, 14900.0 buff/cache
MiB Swap: 16367.0 total, 16362.0 free, 5.0 used. 14588.4 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
33969 www-data 20 0 610724 431308 162756 R 44.7 2.6 1681:46 zma
33965 www-data 20 0 430968 236056 168300 R 31.1 1.4 918:31.67 zmc
84203 www-data 20 0 418816 174784 165160 R 21.5 1.1 1:24.42 nph-zms
Iotop reports around 100k/s activity on the SSD drive, so it is barely being used.
How do I get the live view to play smoothly like the events do?
Perhaps the solution to the first problem will also solve the high CPU load?
Any advice?
Regards,
LuboD