Missing keepalive message in REMOTE RTSP
Posted: Mon Nov 13, 2017 1:56 pm
Hi
I have purchased several 5Mpix IP cameras from Aliexpress seller Ganvis (https://www.aliexpress.com/store/540241). These are inexpensive cameras with great resolution and moderate night capability. I am using these cameras with ZM 1.30.4 in RTP/RTSP method (Source Type REMOTE). The only problem in this configuration is that process zmc will be jammed very often and the process will be automatically restarted. Restart of zmc process was causing every now and then false alarm event as the received image was corrupted during restart.
I investigated this problem and after hours of debugging found out, that the camera requires keepalive messages from zm_rtsp.cpp, but these messages were missing. Zm_rtsp.cpp expects to get "GET_PARAMETER" command from camera in order to send keepalive messages, but my cameras did not send the this option.
The workaround I am currently using is to force zm_rtsp.cpp send keepalive messages.
Code changes:
Line 365 zm_rtsp.cpp
-- bool sendKeepalive = false;
++ bool sendKeepalive = true;
Line 508 zm_rtsp.cpp
-- int timeout = 0;
++ int timeout = 60;
This change made the trick and now all my cameras have been working over a week without any jamming.
I think that ZoneMinder monitor configuration should have an option to force keepalive message sending. Most likely my cameras are not the only ones needing keepalive messages.
Cheers
osk
I have purchased several 5Mpix IP cameras from Aliexpress seller Ganvis (https://www.aliexpress.com/store/540241). These are inexpensive cameras with great resolution and moderate night capability. I am using these cameras with ZM 1.30.4 in RTP/RTSP method (Source Type REMOTE). The only problem in this configuration is that process zmc will be jammed very often and the process will be automatically restarted. Restart of zmc process was causing every now and then false alarm event as the received image was corrupted during restart.
I investigated this problem and after hours of debugging found out, that the camera requires keepalive messages from zm_rtsp.cpp, but these messages were missing. Zm_rtsp.cpp expects to get "GET_PARAMETER" command from camera in order to send keepalive messages, but my cameras did not send the this option.
The workaround I am currently using is to force zm_rtsp.cpp send keepalive messages.
Code changes:
Line 365 zm_rtsp.cpp
-- bool sendKeepalive = false;
++ bool sendKeepalive = true;
Line 508 zm_rtsp.cpp
-- int timeout = 0;
++ int timeout = 60;
This change made the trick and now all my cameras have been working over a week without any jamming.
I think that ZoneMinder monitor configuration should have an option to force keepalive message sending. Most likely my cameras are not the only ones needing keepalive messages.
Cheers
osk