odam icon indicating copy to clipboard operation
odam copied to clipboard

[FEATURE REQUEST] Try to reconnect for VideoCapture

Open LdDl opened this issue 5 years ago • 0 comments

Is your feature request related to a problem? Please describe. When reading frames from RTSP or USB/Ethernet source sometime disconnects may occur.

Describe the solution you'd like Add channel listener. When it receives a signal (disconnected from video source) it will try reestablish connection. I guess, some kind of wrapper around gocv.VideoCapture is needed.

Describe alternatives you've considered systemd/cron is an option. But you always can disable reconnect option configuration JSON (context is below) and prepare systemd/cron by yourself.

Additional context It's better to add reconnect option to configuration JSON also, eg '"reconnect_opts": {"num_of_attempts": 5, "sleep_time_between_attempts": "10sec"}'

LdDl avatar Aug 06 '20 05:08 LdDl