App crash when camara IP change

• Hardware Platform: Jetson Xavier NX Module
• DeepStream Version 5.0
• JetPack Version 4.4. [L4T 32.4.3]
• TensorRT Version 7.1.3.0

Infrastructure setup:
I have 20 HikVision ip cameras, connected to the internet each with a different dynamic IP provided by the ISP. Every 12 h there is a forced IP change.
In my local network i have a VPN. The 20 cameras are connected to my local network via VPN, using a local ip.

The Xavier is in my local network and im connected with the local network to the camaras.

Problem:
The app crash every time that a camera change they dynamic IP, but this does not make any sense because it should lock as a micro cut of max 5sec to the app.

Edit: I’m seeing the same problem when i connect to a local camara (without a VPN) and i restart the camera

There isn’t a way to force a reconnect, every time that a connection is lost?

Error in the app:
Warning: gst-resource-error-quark: Could not read from resource. (9): gstrtspsrc.c(5293): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstBin:source-bin-03/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source:

Unhandled return value -7.

Error: gst-resource-error-quark: Could not read from resource. (9): gstrtspsrc.c(5361): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstBin:source-bin-03/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source:

Thanks!

DeepSream is just a RTSP client, which can connect to RTSP server (ip camera) with the ip and port number. https://tools.ietf.org/html/rfc2326. The RTSP session is based on the same IP and same port number. So for your case, when the ip address changes, the previous session was broken, but nobody informed client this thing. You need to monitor the ip change(We don’t know how, you may need to ask your camera vendor) event in your application(it should be outside gstreamer pipeline because gstreamer doesn’t have such function), and stop the gstreamer pipeline when you find the ip changed, and reset the new ip to rtsp src and start the new session.

But my cameras don’t change the ip that DeepSream connects because i’m using a VPN to connect to my local network with static ip.

To illustrate:

The camera connect to the VPN with a dynamic public IP, when is connected we assign a static local IP (10.128.75.24) if the Camera is forced to change the IP by the ISP. The camera reconnect to the VPN, and the VPN assign the same IP (10.128.75.24) [This don’t take more than 5sec]

I’m using HikVision cameras

Someone knows a way to prevent this fails?

To be clear, Deepstream support small cut (max 30 sec) in the connection of one camara or many camaras, in a multi stream application?

Your application need to monitor “The camera reconnect to the VPN” even by itself, deepstream pipeline does not have such function.