How to handle rtsp reconnect when using uridecodebin?

• Hardware Platform (Jetson / GPU) - GPU
• DeepStream Version - 6.1
• JetPack Version (valid for Jetson only)
• TensorRT Version - 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only) - 520.xx.xx
• Issue Type( questions, new requirements, bugs) - question

Are there any reference to handle reconnect when using rtsp source with uridecodebin? i.e. When the stream from the source becomes unavailable, the pipeline stops(single source pipeline). Is there anyway to add a retry mechanism to wait and resume processing once the stream becomes available?

You can use rtspsrc and adapt the parameters in it.

Is it possible to wait indefinitely and resume processing when connectivity is back?

I tried the below pipeline:
gst-launch-1.0 --gst-debug=3 rtspsrc location=rtsp://localhost:8555/ timeout=10000000 udp-timeout=20000000 ! fakesink

Still, the pipeline stops as soon as the server is closed. Looks like timeout and udp-timeout has no impact. Can you please let me know if I’m missing something?

You may check option udp-reconnect, please be noted that this is a pure GStreamer topic, you may need to check with GStreamer website to get more information.

I think udp-reconnect is set to True by default. Still it doesn’t work. I understand this is a gstreamer element. Just curious if this problem was solved by any of the community members.
Is there any way to solve this problem with uridecodebin itself by connecting it to a videotestsrc in case of rtsp unavailability?

You can set this rtsp-reconnect-interval-sec para in source. You can also refer our open source to see how it worked.

1 Like

Thanks! I handled it with uridecodebin itself by swapping the source with videotestsrc in case of outage by following the runtime addition/deletion of source reference.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.