Deepstream-app: bus_callback does not allow reconnection of RTSP sources

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX

• DeepStream Version
6.0

• JetPack Version (valid for Jetson only)
4.6.2-b5

• Issue Type( questions, new requirements, bugs)
bug

• 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)

  1. Configure deepstream-app to use an RTSP source (source2 in my config) and keep reconnecting if the connection fails:
[source0]
enable=1
type=2

[source2]
enable=1
type=4
uri=rtsp://localhost:544/rtsp_live0
rtsp-reconnect-interval-sec=1
rtsp-reconnect-attempts=-1 # keep trying reconnecting forever
  1. Run the app
  2. When it’s up and running, interrupt that RTSP stream (I use an IP camera so just unplug an Ethernet cable from it).
  3. After a short while the app finishes the following error message:

ERROR from src_elem1: Could not open resource for reading and writing.
Debug info: gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin1/GstRTSPSrc:src_elem1:
Failed to connect. (Generic error)

It should not be like that because I asked the app to reconnecting to the RTSP source indefinitely.

Solution: it seems like a simple change fixes it (line 143 of deepstream_app.c):

if ((i != bin->num_bins) &&
          (appCtx->config.multi_source_config[0].type == NV_DS_SOURCE_RTSP))

multi_source_config[0] should be multi_source_config[i] and it works as expected in my case.
The same applies to line 158.

1 Like

thanks for your report, will fix.

@dmitry.skorokhod can’t reproduce on dgpu deepstream6.1 Quickstart Guide — DeepStream 6.1.1 Release documentation
here are configuration and logs:
6.1.txt (1.9 KB)
source2_1080p_dec_infer-resnet_demux_int8_b.txt (4.8 KB)

Thanks for looking into it.
I tested it with DS 6.0 so it might be already fixed in 6.1, need to give it a try.
Do you know if (and how) it’s possible to install DS 6.1 alongside 6.0 just to test (as I don’t want to introduce any new issues to my setup by completely migrating to 6.1)?

if dgpu, you can use deepstream docker DeepStream | NVIDIA NGC ,but if jetson, deepstream 6.1 need to install corresponding jetpack and deepstream please refer to Quickstart Guide — DeepStream 6.1.1 Release documentation

I use DS with Jetson here.

I also tested on jetson orin deepstream6.1, it can’t reproduce, here are logs and configuration file:

source2_1080p_dec_infer-resnet_demux_int8_b.txt (4.8 KB)
6.1-jetson.log (221.6 KB)

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