Rtsp stream reconnection when using uridecodebin source plugin

Hardik Panchal Hardik.Panchal at einfochips.com
Wed Apr 20 06:17:46 UTC 2022


Hello !


I am developing a Nvidia deepstream 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 are connected to typical inference pipeline as per our use case something like this.

source-bin-0 --|
source-bin-1 --|—[Inference pipeline as per Nvidia Deepstream Inference plugins]
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.


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 not 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!!

Regards,
Hardik Panchal
Software Engineer at eInfochips(An Arrow Company).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220420/90c3eb58/attachment-0001.htm>


More information about the gstreamer-devel mailing list