RTSP stream based on detection

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
rodrigopaulodecastro
Posts: 1
Joined: Sun Mar 20, 2022 3:23 am

RTSP stream based on detection

Post by rodrigopaulodecastro »

Hi,

I am using this eufycam 2c pro which is battery powered and only sends RTSP stream when it detects movement. This causes some particular issues considering Zoneminder and basically all the surveillance programs consider that the camera will provide a constant live RTSP stream.

So, my major issue is that Zoneminder tries to connect to the RTSP stream and gets a 404 NOT FOUND, then it will try again, and again, and again for about 50s until the zmc daemon restart. The thing is, after every bad connection attempt the delay to the next attempt increases in 1s, so the delay goes 1s, 2s, 3s ... 9s and it causes frame losses because let's say the camera captures a movement and starts streaming, during the delay zoneminder will not capture anything. That could cause on the worst case 9s of frame loss.

This logic is implemented on https://github.com/ZoneMinder/zoneminde ... rc/zmc.cpp:

Seconds sleep_time = Seconds(0);
while (monitor->PrimeCapture() <= 0) {
if (prime_capture_log_count % 60) {
logPrintf(Logger::ERROR + monitor->Importance(),
"Failed to prime capture of initial monitor");
} else {
Debug(1, "Failed to prime capture of initial monitor");
}

prime_capture_log_count++;
if (zm_terminate) {
break;
}
if (sleep_time < Seconds(60)) {
sleep_time++;
}

Can you pls help me workaround that?

Tks.
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: RTSP stream based on detection

Post by dougmccrary »

Sorry.
The fix is a camera that sends continuous data.
Post Reply