I have Single camera in use Hikvision DS-2DE4215IW-DE. Zoneminder is capturing both streams in Record mode to eliminate analysis from equation.
I suspect it is ZM is converting captured stream somehow. I have tried change resolution, color depth and camera setting in many combinations but did not get to better system load.
ltrace shows following - is it correct for correct passthrough without decoding (personally i do not like sws_scale there?
Code: Select all
ltrace -c -p 3085
^C% time seconds usecs/call calls function
------ ----------- ----------- --------- --------------------
60.76 3.882682 39219 99 av_read_frame
18.70 1.194938 12070 99 avcodec_send_packet
13.58 0.867789 8677 100 sws_scale
0.80 0.051082 127 400 __snprintf_chk
0.79 0.050795 128 396 av_rescale_q
0.70 0.044412 111 400 gettimeofday
0.69 0.043794 21897 2 mysql_query
0.52 0.033255 111 298 av_init_packet
0.48 0.030527 102 299 av_packet_unref
0.39 0.024730 124 198 _Znwm
0.31 0.019896 198 100 avcodec_receive_frame
0.28 0.018106 179 101 localtime
0.24 0.015609 156 100 av_image_fill_arrays
0.24 0.015216 153 99 av_interleaved_write_frame
0.19 0.012287 124 99 av_packet_ref
0.18 0.011686 118 99 _ZNSt8__detail15_List_node_base7_M_hookEPS0_
0.18 0.011329 114 99 av_packet_rescale_ts
Code: Select all
08/07/20 08:47:14.401690 zmc_m4[3085].INF-zm_ffmpeg_camera.cpp/802 [Re-starting video storage module]
08/07/20 08:47:14.476194 zmc_m4[3085].INF-zm_videostore.cpp/62 [Opening video storage stream /kamery/zaznam/dvur/detail/4/2020-08-07/14436/14436-video.mp4 format: mp4]
08/07/20 08:47:14.595082 zmc_m4[3085].INF-zm_ffmpeg_camera.cpp/879 [Event video offset is -2.757 sec (<0 means video starts early)]
08/07/20 08:47:15.626286 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:35900 - Capturing at 14.29 fps, capturing bandwidth 204962bytes/sec]
08/07/20 08:47:22.294145 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36000 - Capturing at 14.29 fps, capturing bandwidth 194772bytes/sec]
08/07/20 08:47:28.965121 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36100 - Capturing at 16.67 fps, capturing bandwidth 225162bytes/sec]
08/07/20 08:47:35.612424 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36200 - Capturing at 14.29 fps, capturing bandwidth 191892bytes/sec]
08/07/20 08:47:42.294631 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36300 - Capturing at 14.29 fps, capturing bandwidth 191893bytes/sec]
08/07/20 08:47:48.947898 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36400 - Capturing at 16.67 fps, capturing bandwidth 219900bytes/sec]
08/07/20 08:47:55.608066 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36500 - Capturing at 14.29 fps, capturing bandwidth 195589bytes/sec]
08/07/20 08:48:02.296030 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36600 - Capturing at 14.29 fps, capturing bandwidth 198905bytes/sec]
08/07/20 08:48:08.966793 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36700 - Capturing at 16.67 fps, capturing bandwidth 241063bytes/sec]
08/07/20 08:48:15.626762 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36800 - Capturing at 14.29 fps, capturing bandwidth 202781bytes/sec]
08/07/20 08:48:22.295703 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:36900 - Capturing at 14.29 fps, capturing bandwidth 190577bytes/sec]
08/07/20 08:48:28.967716 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37000 - Capturing at 16.67 fps, capturing bandwidth 235123bytes/sec]
08/07/20 08:48:35.628201 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37100 - Capturing at 14.29 fps, capturing bandwidth 232794bytes/sec]
08/07/20 08:48:42.296722 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37200 - Capturing at 14.29 fps, capturing bandwidth 208902bytes/sec]
08/07/20 08:48:48.966803 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37300 - Capturing at 16.67 fps, capturing bandwidth 233905bytes/sec]
08/07/20 08:48:55.634220 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37400 - Capturing at 14.29 fps, capturing bandwidth 226117bytes/sec]
08/07/20 08:49:02.278086 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37500 - Capturing at 14.29 fps, capturing bandwidth 201218bytes/sec]
08/07/20 08:49:08.968908 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37600 - Capturing at 16.67 fps, capturing bandwidth 242881bytes/sec]
08/07/20 08:49:15.631194 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37700 - Capturing at 14.29 fps, capturing bandwidth 216325bytes/sec]
08/07/20 08:49:22.297758 zmc_m4[3085].INF-zm_monitor.cpp/2544 [Dvur-HiRes: images:37800 - Capturing at 14.29 fps, capturing bandwidth 204965bytes/sec]
...
Configuration of camera main stream
Code: Select all
Resolution 1920x1080P
FPS: 15
Coding H.264
H.264+ OFF
Code: Select all
SourceType: Ffmpeg
function: Record
MaxFps, etc - Blank regarding to several forum posts
Source
rtsp://*/Streaming/Channels/1/
Target colorspace: 32bit
resolution: 1920x1080
deinterlacing: Disabled
Image Buffer Size: 400 (increased after complains in log)
System HW (crap what was available at the moment)
Intel(R) Pentium(R) Gold G5400 CPU @ 3.70GHz
16G Ram
Storage ZFS 2disk mirror without significant load