Deepstream-app multiple rtsp sink output stuck after few seconds

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.

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”.

[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

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

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

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

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

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