Inconsistent nvurisrcbin RTSP reconnection with DeepStream 7.1 service-maker

Please provide complete information as applicable to your setup.

• (dGPU)
• DeepStream Version 7.1
• Docker Image
• Bug

Hello,

I’m using Deepstream 7.1 service-maker in C++, to create pipelines which consume RTSP streams from MediaMTX.

After a temporary outage where all upstream RTSP sources went down, my pipelines did not reconnect when the streams came back up. We rely on nvurisrcbin reconnection settings (which have worked for partial/individual feed drops before). In this scenario, pipelines did not recover/reconnect to MediaMTX despite the feeds being live again until we manually restarted the deepstream pipelines.

The snippet below shows my nvurisrcbin setup. I can share more of the pipeline code if needed.

for (uint i = 0; i < num_sources; i++)
        {
            std::string name = "src_" + std::to_string(i);
            pipeline.add("nvurisrcbin", name, "uri", uris[i], "rtsp-reconnect-interval", 15, "rtsp-reconnect-attempts", -1);
        }

Here are my mediamtx config file and logs from one of the pipelines. Please note I have replaced all rtsp urls and IP addresses with placeholders.
ds_pipeline_logs.log (20.8 MB)
mediamtx.txt (24.5 KB)

Thank you.

1 Like
  1. Before outage, did the app work well? were the filesink output of three RTSP sources fine?
  2. nvurisrcbin is opensource. it leverages Gstreamer rtspsrc to input RTSP source. From the log ds_pipeline_logs.log, the app tried many times to reconnect three sources. All failures were caused by “Could not send message. (Received end-of-file) of rtspsrc”.
    Could you use the following cmd to test src0 on the same machine running the Deepstream app, and share the running log? Thanks!
gst-launch-1.0 -v nvurisrcbin uri=rtsp://xxx  ! fakesink
  1. Yes, did not seem to have major issues before the outage. We have a rtspsink output for our pipelines, which produced rtsp outputs fine. We even had some stream outages before, which were handled by the nvurisrcbin reconnect properly.
    Another pipeline today went down with the same issue, with similar logs to the one I sent before. Other pipelines were still ok, and have validated that the rtsp input was fine when the pipeline in question was stuck in a reconnect loop. We’re ideally trying to pinpoint why the reconnection fails randomly and what steps can we take to prevent this.

  2. Attaching logs from the command, ran for 1min 30s after which I did a keyboard interrupt. Once again, ip_addresses and rtsp urls have been replaced with placeholders
    gst_log.txt (114.6 KB)

Thank you.

I tested nvurisrcbin RTSP reconnection on DS7.1 with “gst-launch-1.0 nvurisrcbin uri=rtsp://xxx rtsp-reconnect-interval=15 rtsp-reconnect-attempts=-1 ! fakesink”, but failed to reproduce this issue. could you use this simplified pipeline to test? and help to reproduce this issue?I killed mediamtx(v1.8.4)with “kill -9”. Here is the running log log-1002.txt (8.0 KB).