Rtsp stream reconnection in deepstream-app when using uridecodebin source plugin

Hello !

I am developing a deep stream inference application with multiple RTSP sources.
Where each individual source is constructed using uridecodebin plugin. Until this point, I have developed a pipeline with multiple source bins connected to nvstreammux and then goes the typical inference pipeline as per our use case something like this.

source-bin-0 --|
source-bin-1 --|—| nvstreammux |—| nvinfer |----| nvmsgbroker |
source-bin-2 --|

Which is working totally fine!

I am looking to incorporate RTSP reconnection in case any of the RTSP sources (camera) is down for a while and comes up after some time.

For this, I am referring deepstream-app and deepsteram-test5 examples. But The logic for reconnection in these examples are only restricted to source-bin having rtspsrc and decodebin plugins. It is not implemented for uridecodebin.
After referring to the deepstream-app and deepsteram-test5 examples I have tried implementing the same logic in my application.
In case of source error, I am setting a particular uridecodebin state to NULL and then to PLAY again.

My observations after performing some test cases are:

  1. When I am using [rtspsrc-decodebin] as the source-bin my reconnection logic of setting the state to NULL and PLAY works fine and I am able to reconnect to my RTSP source successfully. Here when I set the source-bin state to PLAY it returns me GST_STATE_CHANGE_ASYNC and the source-bin is able to provide frames to the upstream elements.
  2. But In the case of [uridecodebin] as the source-bin, my same reconnection logic does not work. Here the observation is after I set the source-bin state to PLAY it returns me GST_STATE_CHANGE_NO_PREROLL and my overall pipeline gets stuck. It is not giving me the further error of source disconnected but also not able to provide frames to the upstream elements.

The main difference I can conclude here is that when I am using uridecodebin and changing state to PLAY it is returning with GST_STATE_CHANGE_NO_PREROLL and I am able to reconnect, while with rtspsrc it is returning GST_STATE_CHANGE_ASYNC and I am able to connect.

I am seeking help to successfully reconnect to my RTSP source when I am using uridecodebin as the source-bin.

Thank you in advance!!

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

uridecodebin is in gstreamer open source project gst-plugins-base/gsturidecodebin.c at 1.14 · GStreamer/gst-plugins-base (github.com)

You can debug by yourself

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