# Deepstream-app multiple rtsp sink output stuck after few seconds

**URL:** <https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055>\
**Category:** DeepStream SDK\
**Tags:** deep-learning, jetson-inference\
**Created:** [May 5, 2021, 12:00pm UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055 "2021-05-05T12:00:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahsaanraazaa](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahsaanraazaa/32/278647_2.png) [@ahsaanraazaa](https://forums.developer.nvidia.com/u/ahsaanraazaa)\
**Post date:** [May 5, 2021, 12:00pm UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/1 "2021-05-05T12:00:28Z")

</div>

Please provide complete information as applicable to your setup.

Hardware Platform GPU  
Deepstream 5.1  
TensorRt 7.2.1  
NVIDIA GPU Driver Version 455.23.05  
Issue Type Questions  
**• 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)**  
when deepstream-app rtsp sink is used for 8 streams with tiled-display disabled. if any of the stream is opened through rtsp link it stuck after 10 to 20 seconds and even if i use only one stream and one rtsp sink it still has the  
same problem. if i enable tiled-display it will work fine without any issue.  
**• How to reproduce the issue ?**  
deepstream-app -c config.txt  
**Config.txt content:**

[application]  
enable-perf-measurement=1  
perf-measurement-interval-sec=1

[tiled-display]  
enable=0  
rows=1  
columns=2  
width=1280  
height=720  
gpu-id=0  
nvbuf-memory-type=0

[source0]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source1]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source2]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source3]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source4]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source5]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source6]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source7]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[sink0]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=0  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5400  
rtsp-port=8554

[sink1]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=1  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5401  
rtsp-port=8555

[sink2]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=2  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5402  
rtsp-port=8556

[sink3]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=3  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5403  
rtsp-port=8557

[sink4]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=4  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5404  
rtsp-port=8558

[sink5]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=5  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5405  
rtsp-port=8559

[sink6][application]  
enable-perf-measurement=1  
perf-measurement-interval-sec=1

[tiled-display]  
enable=0  
rows=1  
columns=2  
width=1280  
height=720  
gpu-id=0  
nvbuf-memory-type=0

[source0]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source1]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source2]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source3]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source4]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source5]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source6]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source7]  
enable=1  
type=3  
uri=file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[sink0]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=0  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5400  
rtsp-port=8554

[sink1]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=1  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5401  
rtsp-port=8555

[sink2]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=2  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5402  
rtsp-port=8556

[sink3]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=3  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5403  
rtsp-port=8557

[sink4]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=4  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5404  
rtsp-port=8558

[sink5]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=5  
gpu-id=0  
enable=1  
type=4  
codec=1  
sync=0  
source-id=6  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5406  
rtsp-port=8560

[sink7]  
enable=1  
type=4  
codec=1  
sync=0  
source-id=7  
gpu-id=0  
bitrate=4000000  
nvbuf-memory-type=0  
udp-port=5407  
rtsp-port=8561

[osd]  
enable=1  
gpu-id=0  
border-width=1  
text-size=15  
text-color=1;1;1;1;  
text-bg-color=0.3;0.3;0.3;1  
font=Serif  
show-clock=0  
clock-x-offset=800  
clock-y-offset=820  
clock-text-size=12  
clock-color=1;0;0;0  
nvbuf-memory-type=0

[streammux]  
gpu-id=0  
live-source=1  
batch-size=8  
batched-push-timeout=40000  
width=1280  
height=720  
enable-padding=0  
nvbuf-memory-type=0

[primary-gie]  
enable=1  
gpu-id=0  
gie-unique-id=1  
nvbuf-memory-type=0  
config-file=dstest3\_pgie\_config.txt

[tests]  
file-loop=1

I also tested this on jetson nano it also has the similar issue on it too.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [May 7, 2021, 10:01am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/3 "2021-05-07T10:01:03Z")

</div>

The “file-loop=1” option will run the application in loop. That means the session will restart after the session finishes. For every new session, the rtsp server is initialized from the NULL. The connection between client and server should be reset. You need to reconnect the rtsp sever with your rtsp stream player. The way you use the function is wrong.  
It is better to set live-source=0 in [streammux] group even It has nothing to do with the “stuck”.

---

<div class="post-metadata">

**Author:** ![ahsaanraazaa](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahsaanraazaa/32/278647_2.png) [@ahsaanraazaa](https://forums.developer.nvidia.com/u/ahsaanraazaa)\
**Post date:** [May 17, 2021, 9:39am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/4 "2021-05-17T09:39:02Z")

</div>

[application]  
enable-perf-measurement=1  
perf-measurement-interval-sec=1

[tiled-display]  
enable=0  
rows=2  
columns=4  
width=1280  
height=720  
gpu-id=0  
nvbuf-memory-type=0

[source0]  
enable=1  
type=3  
uri=rtsp://LINK…  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source1]  
enable=1  
type=3  
uri=file:/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[source2]  
enable=1  
type=3  
uri=file:/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample\_720p.h264  
num-sources=1  
gpu-id=0  
cudadec-memtype=0

[sink0]  
enable=1  
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming  
type=4  
#1=h264 2=h265  
codec=1  
source-id=0  
sync=0  
bitrate=2000000  
rtsp-port=8554  
udp-port=5400

[sink1]  
enable=1  
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming  
type=4  
#1=h264 2=h265  
codec=1  
source-id=1  
sync=0  
bitrate=4000000  
rtsp-port=8555  
udp-port=5401

[osd]  
enable=1  
gpu-id=0  
border-width=1  
text-size=15  
text-color=1;1;1;1;  
text-bg-color=0.3;0.3;0.3;1  
font=Serif  
show-clock=0  
clock-x-offset=800  
clock-y-offset=820  
clock-text-size=12  
clock-color=1;0;0;0  
nvbuf-memory-type=0

[streammux]  
gpu-id=0  
live-source=0  
batch-size=3  
batched-push-timeout=40000  
width=1280  
height=720  
enable-padding=0  
nvbuf-memory-type=0

[primary-gie]  
enable=1  
gpu-id=0  
gie-unique-id=1  
nvbuf-memory-type=0  
config-file=dstest3\_pgie\_config.txt

[tests]  
file-loop=0

**video streams works fine but rtsp stream output still stuck**

 ![send](https://global.discourse-cdn.com/nvidia/original/3X/1/4/145ab488d469a55205ce7c4e0abe08f0d63d0871.png)

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [May 17, 2021, 9:43am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/5 "2021-05-17T09:43:36Z")

</div>

There is rtsp source. Please set “live-source=1” in [streammux].

---

<div class="post-metadata">

**Author:** ![ahsaanraazaa](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahsaanraazaa/32/278647_2.png) [@ahsaanraazaa](https://forums.developer.nvidia.com/u/ahsaanraazaa)\
**Post date:** [May 17, 2021, 10:07am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/6 "2021-05-17T10:07:35Z")

</div>

I tested with live-source=1 and live-source=0 same issue occurred

---

<div class="post-metadata">

**Author:** ![ahsaanraazaa](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahsaanraazaa/32/278647_2.png) [@ahsaanraazaa](https://forums.developer.nvidia.com/u/ahsaanraazaa)\
**Post date:** [May 19, 2021, 6:58am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/7 "2021-05-19T06:58:53Z")

</div>

rtsp source is at 5 fps and 2 video streams are at 30 fps does that causing a problem

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [June 1, 2021, 10:48am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/8 "2021-06-01T10:48:39Z")

</div>

I’ve run the case with your config file. The rtsp output playback is OK. No stuck is found.

---

<div class="post-metadata">

**Author:** ![ahsaanraazaa](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ahsaanraazaa/32/278647_2.png) [@ahsaanraazaa](https://forums.developer.nvidia.com/u/ahsaanraazaa)\
**Post date:** [June 7, 2021, 11:24am UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/9 "2021-06-07T11:24:31Z")

</div>

I think issue is related to vlc. I tested it with gstreamer it displays the output but vlc for some reason creates the same issue

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:13pm UTC](https://forums.developer.nvidia.com/t/deepstream-app-multiple-rtsp-sink-output-stuck-after-few-seconds/177055/11 "2021-10-12T16:13:57Z")

</div>


