Camera falls-off due to "RTSP timed out" and doesn't go back

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
sogawa-sps
Posts: 3
Joined: Tue Jan 29, 2019 3:36 pm

Camera falls-off due to "RTSP timed out" and doesn't go back

Post by sogawa-sps » Tue Jan 29, 2019 3:47 pm

I have ZM v1.30.4 running from a docker container and TENVIS camera. It's connected as:

Code: Select all

Remote Protocol	Remote 
Method	RTP/RTSP
Remote Host Name	admin:xxxxxxxx@192.168.1.127
Remote Host Port	554
Remote Host Path	/11
Target colorspace	
Capture Width (pixels)	640
Capture Height (pixels)	352
It works in motion detection mode.

Right after adding it works fine, but after couple of hours camera became red and monitor didn't show anything. If I just open settings window and press "Save" without changing anything it starts to work again. ZM restart also helps.

In logs I see:

Code: Select all

2019-01-29 09:24:56.995850 zmc_m1[14350].ERR-zmc.cpp/312 [Failed to pre-capture monitor 1 718285028 (1/1)]
2019-01-29 09:24:56.493700 zmc_m1[14357].ERR-zm_rtsp.cpp/729 [RTSP timed out]
What brings me to idea that TENVIS cam becomes unresponsive from time to time and during this "outage" zm marks it as bad. Is it possible to increase this time-out threshold? Or force ZM to retry to connect to bad cameras regularly?

bbunge
Posts: 2444
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Camera falls-off due to "RTSP timed out" and doesn't go back

Post by bbunge » Wed Jan 30, 2019 6:58 pm

Try ffmpeg and let us know what Linux Distro and version you are using.

sogawa-sps
Posts: 3
Joined: Tue Jan 29, 2019 3:36 pm

Re: Camera falls-off due to "RTSP timed out" and doesn't go back

Post by sogawa-sps » Mon Apr 15, 2019 9:34 pm

Hi,

Sorry for the such a long delay with the answer.

I've played with ffmpeg but it didn't work for that Tenvis cam.

Container OS where ZM is running:

Code: Select all

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Host OS (just in case if it's important):

Code: Select all

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Actually I've also tried to run a container under Windows 10/Hyper-V - the same story.

sogawa-sps
Posts: 3
Joined: Tue Jan 29, 2019 3:36 pm

Re: Camera falls-off due to "RTSP timed out" and doesn't go back

Post by sogawa-sps » Mon Apr 15, 2019 9:39 pm

As for now I've implemented the following script as a WA but it obviously has two big disadvantages: still big gap when video is not being captured, too frequent unnecessary restarts.

Code: Select all

#!/bin/bash
last_event=$(mysql -s -N  --execute="use zm;select time_to_sec(timediff(now(), StartTime)) > 600 from Events order by StartTime desc limit 1;")
if [ "$last_event" -eq "1" ]; then
   echo $(date)"Restart ZoneMinder" | tee -a /var/logs/zm_check.log
   /etc/init.d/zoneminder restart
fi 
If anybody can advise how to catch a moment when source becomes actually red from a script instead of simply checking for last event time it would solve my problem. A query, a logs grep etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests