Cannot start the application with 3 RTSP Streaming

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - GPU - 1050ti
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.1.2
• NVIDIA GPU Driver Version (valid for GPU only) 465
• Issue Type( questions, new requirements, bugs) 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I have 3 RTSP streams and I want to stream out 3 input streams. Based on the NVIDIA specifications, I am using GTX 1050ti which supports 3 stream encoders.

Here is my configure file.

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

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

[source0]
enable=1
type=4
uri=rtsp://192.168.1.16/sub-stream
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source1]
enable=1
type=4
uri=rtsp://admin:3@192.168.1.11/channel1-encoder1
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source2]
enable=1
type=4
uri=rtsp://admin:3@192.168.1.11/channel1-encoder2
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source3]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source4]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source5]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source6]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source7]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source8]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source9]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source10]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source11]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source12]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source13]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source14]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

[source15]
enable=0
type=4
uri=rtsp://1.1.1.1/init
drop-frame-interval=0
num-sources=1
gpu-id=0
cudadec-memtype=0
nvbuf-memory-type=3
crop-left=0
crop-top=0
crop-right=1280
crop-bottom=720

# rstp out
[sink0]
enable=1
type=4
source-id=0
codec=1
enc-type=0
sync=1
bitrate=4000000
profile=0
rtsp-port=8550
udp-port=5400
output-file=ANPR-streaming
iframeinterval=5
gpu-id=0
qos=0

[sink1]
enable=1
type=4
source-id=1
codec=1
enc-type=0
sync=1
bitrate=4000000
profile=0
rtsp-port=8551
udp-port=5410
output-file=ANPR-streaming
iframeinterval=5
gpu-id=0
qos=0

[sink2]
enable=1
type=4
source-id=2
codec=1
enc-type=0
sync=1
bitrate=4000000
profile=0
rtsp-port=8552
udp-port=5420
output-file=ANPR-streaming
iframeinterval=5
gpu-id=0
qos=0

[sink3]
enable=0
# type2 = window
type=2
sync=0  # faster > reduce 1 second
source-id=0
gpu-id=0
nvbuf-memory-type=0

[sink16]
enable=1
type=6
msg-conv-config=ANPR_msgconv_config.txt
msg-conv-payload-type=257
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_kafka_proto.so
msg-broker-conn-str=localhost;9092
topic=anpr
msg-broker-config=ANPR_cfg_kafka.txt
msg-conv-msg2p-lib=../message_broker_custom/libnvds_msgconv.so


[message-consumer0]
enable=1
proto-lib=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_kafka_proto.so
conn-str=localhost;9092
config-file=ANPR_cfg_kafka.txt
subscribe-topic-list=deepStreamConfig;deepStreamHeartbeat

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

[primary-gie]
enable=1
gpu-id=0
batch-size=4
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=ANPR_YOLOV4Model_Config_30June.txt

[secondary-gie0]
enable=1
gpu-id=0
gie-unique-id=2
operate-on-gie-id=1
operate-on-class-ids=0;1
batch-size=4
config-file=ANPR_LPRModel_Config_8July.txt
nvbuf-memory-type=0

[osd]
enable=1
gpu-id=0
border-width=1
text-size=13
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Arial
show-clock=1
clock-x-offset=1000
clock-y-offset=10
clock-text-size=20
clock-color=1;0;0;0
nvbuf-memory-type=0

[tracker]
enable=1
tracker-width=640
tracker-height=480
ll-lib-file=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_mot_klt.so
gpu-id=0
enable-batch-process=0
display-tracking-id=0

[nvds-analytics]
enable=1
config-file=ANPR_config_nvdsanalytics.txt

[tests]
file-loop=0

The error will be

I set up 3 input streams as source 0, 1,2 and 3 RTSP output streams as sink 0,1,2.

How about two sources and two encoding sinks?

It’s totally fine. There are no issues with N sources and 2 encoding sinks.

GTX 1050 Ti is not in deepstream supporting list. We do not guarantee it can work.

Beside the NVIDIA 1050ti, I also tried with RTX 2060 and NVIDIA Quadro P2000. I met the same problem.

I notice that you set the output file name just the same for different output file sink.
You can not write the different encoded stream to the same file.

Actually, the output file name is used to specify the link URL of streams. I run normally without any issues with 2 RTSP outputs.
I’ve tried to change the output file names with different names, however, the error still occurred.

That was so weird when I tried with 3 input sources from video files and then 3 RTSP output streams run very well.

I guess during the initialization, there is one more implicit encoder to be created?

The maximum RTSP output streams will be N+1 = 3 (with N is the number of current output streams)?

Formally deepstream supports P4, T4, V100, GA100 (DS 5.1). Quickstart Guide — DeepStream 5.1 Release documentation

Thank you for your support. I found a problem is that when I changed to another stream. It can run 3 streaming outputs at the same time.

Therefore, I think the Deepstream app is very sensitive to the RSTP input stream.

Is the new stream still RTSP stream?

What is your original RTSP streams which caused the failure? Does it come from a IP camera? If so, can you tell us the camera type?

Hello Fiona Chen,

Actually, it is just a normal H.264 RTSP stream from the Camera Recoder.

I realized that if I start the app with 3 identical RTSP streams (the same URI), as A A A, the app can run properly.

If I change 1 RTSP stream to another URI as A A B, the app fails to run.

I found that this issue belongs to the NVIDIA Driver software, not the Deepstream app.

Personally, creating individual streams for each RTSP stream is not a practical case.

Thank you for your great support.