# Deepstream

**URL:** https://forums.developer.nvidia.com/t/deepstream/271449
**Category:** DeepStream SDK
**Tags:** deepstream
**Created:** [November 1, 2023, 2:02pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449 "2023-11-01T14:02:05Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 1, 2023, 2:02pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/1 "2023-11-01T14:02:05Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** : NVIDIA GeForce RTX 3090  
**• DeepStream Version** : 6.3  
**• JetPack Version (valid for Jetson only)**  
**• TensorRT Version** : 12.2  
**• NVIDIA GPU Driver Version (valid for GPU only)** : 535.104.05  
**• 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)**

How to make deepstream\_test3.py run **continuously** with RTSP links

---

<div class="post-metadata">

### Author: ![miguel.taylor](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/miguel.taylor/32/273049_2.png) [@miguel.taylor](https://forums.developer.nvidia.com/u/miguel.taylor)
#### Post date: [November 1, 2023, 5:01pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/2 "2023-11-01T17:01:32Z")

</div>

You can pass an RTSP uri as a parameter

```auto
python3 deepstream_test3.py "rtsp://..."

```

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 2, 2023, 2:07am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/4 "2023-11-02T02:07:33Z")

</div>

What do you mean specifically with **continuously**? You can refer to our [README](https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/apps/deepstream-test3/README#L105).

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 2, 2023, 6:17am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/5 "2023-11-02T06:17:20Z")

</div>

I mean for example if RTSP cameras stopped sending frames for some time, will deepstream pipeline stop or it will still listen and wait for incoming frames

I am looking for production pipeline

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 2, 2023, 10:57am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/6 "2023-11-02T10:57:24Z")

</div>

This depends on whether the source plugin you are using has a reconnection function.

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 2, 2023, 11:00am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/7 "2023-11-02T11:00:23Z")

</div>

you mean that deepstream elements like nvstreammux in pipeline has reconnection function or I should make custom reconnection function

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 3, 2023, 1:36am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/8 "2023-11-03T01:36:29Z")

</div>

Usually, the reconnection function is in the source plugin. You can refer to our [nvurisrcbin](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvurisrcbin.html).

```auto
rtsp-reconnect-interval

```

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 19, 2023, 5:19pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/9 "2023-11-19T17:19:07Z")

</div>

> [@yuweiw](#):
>
> ```auto
> rtsp-reconnect-interval
> 
> ```

in deepstream-test3.py

I am testing this script with 7 videos in parallel and added while loop to make docker container always work as below

```auto
    while True:
    # create an event loop and feed gstreamer bus mesages to it
        loop = GLib.MainLoop()
        bus = pipeline.get_bus()
        bus.add_signal_watch()
        bus.connect ("message", bus_call, loop)

        tiler_sink_pad=tiler.get_static_pad("sink")
        if not tiler_sink_pad:
            sys.stderr.write(" Unable to get sink pad \n")
        else:
            tiler_sink_pad.add_probe(Gst.PadProbeType.BUFFER, tiler_sink_pad_buffer_probe, 0)

        # List the sources
        log.info("Now playing...")
        for i, source in enumerate(args):
            log.info(f"{i} : {source}")

        log.info("Starting pipeline \n")
        # start play back and listed to events		
        pipeline.set_state(Gst.State.PLAYING)
        try:
            time_st = time.time()
            loop.run()
            time_end = time.time()
            log.info(f"frame time = {time_end-time_st}")
        except:
            pass
        # cleanup
        log.info("Exiting app\n")
        pipeline.set_state(Gst.State.NULL)
        log.info(f"RTSP streams not available, wait for {settings.PIPELINE_WAIT_TIME} seconds!")
        time.sleep(settings.PIPELINE_WAIT_TIME)

```

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 19, 2023, 5:19pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/10 "2023-11-19T17:19:50Z")

</div>

it didn’t start inference pipeline on other 6 videos and gives error as below

Error: gst-resource-error-quark: Resource not found. (3): gstfilesrc.c(532): gst\_file\_src\_start (): /GstPipeline:pipeline0/GstBin:source-bin-06/GstDsNvUriSrcBin:uri-decode-bin/GstURIDecodeBin:nvurisrc\_bin\_src\_elem/GstFileSrc:source:  
No such file “/opt/nvidia/deepstream/deepstream-6.3/sources/inference/configs/streams/cam7.mp4”  
Error: gst-resource-error-quark: Resource not found. (3): gstfilesrc.c(532): gst\_file\_src\_start (): /GstPipeline:pipeline0/GstBin:source-bin-06/GstDsNvUriSrcBin:uri-decode-bin/GstURIDecodeBin:nvurisrc\_bin\_src\_elem/GstFileSrc:source:

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 20, 2023, 1:55am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/11 "2023-11-20T01:55:20Z")

</div>

If you use rtsp source, then why the source in your pipeline is

> [@Lino120](#):
>
> /opt/nvidia/deepstream/deepstream-6.3/sources/inference/configs/streams/cam7.mp4

?

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 20, 2023, 3:38pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/12 "2023-11-20T15:38:36Z")

</div>

I am planning to use RTSP but I am doing testing on 7 videos  
so why if one video does not exists pipeline stopped? , I am expecting that pipeline should work on existing 6 videos

Also for RTSP , if one of source is down , will pipeline work on other running source and will stop ??

Appreciate your feedback

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 21, 2023, 2:46am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/13 "2023-11-21T02:46:31Z")

</div>

You need to ensure that the uri is available during startup if you use the demo.

> [@Lino120](#):
>
> Also for RTSP , if one of source is down , will pipeline work on other running source and will stop ??

No, it will keep trying to reconnect.

---

<div class="post-metadata">

### Author: ![Lino120](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Lino120](https://forums.developer.nvidia.com/u/Lino120)
#### Post date: [November 21, 2023, 3:04pm UTC](https://forums.developer.nvidia.com/t/deepstream/271449/14 "2023-11-21T15:04:25Z")

</div>

OK it will try to reconnect for source which is down but for other RTSP sources will pipeline work and do inference?

please I need clear answer for this

---

<div class="post-metadata">

### Author: ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)
#### Post date: [November 22, 2023, 7:25am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/15 "2023-11-22T07:25:38Z")

</div>

**There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks**

Yes. For other RTSP sources, pipeline will work and do inference. You need to set the appropriate `batched-push-timeout` proverty for nvstreammux. You can try to set it to `40000` instead of the `40000000` in the code.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)
#### Post date: [December 6, 2023, 7:25am UTC](https://forums.developer.nvidia.com/t/deepstream/271449/16 "2023-12-06T07:25:46Z")

</div>

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