RTSP output streams interfere with each other

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.0dp
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.0.0.1
• NVIDIA GPU Driver Version (valid for GPU only)
• 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) Not sure you can reproduce.
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

My server (dGPU) deployed 4 deepstream-apps, which base on deepstream-test5-app, each app receives 1 rtsp input stream, and outputs 1 RTSP streams.

The weird thing is, when I use VLC player to display one of the output stream, the frames seems frozed, and switch back and forth to other IPCamera stream! Here’s the video: app output stream

You can see that the timestamps doesn’t changed, and suddenly switch to other ipcamera.

If I display the origin input stream from IPCamera via VLC, the video is normal and won’t switch to other camera. Check this video: Input stream

So the problem is, if I display the input stream directly, everything’s fine, but if I display the stream output by the app, the frame will be frozed and switch back and forth to other camera.

I’ve tried some debugging, if I just launch ONLY ONE app, there’s no such problem; if I launch 4 apps, and each app’s sink is set to EGLSink instead of rtsp sink, there’s no such problem too.

Here’s one of my app’s configuration:

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

[tiled-display]
enable = 0
rows = 2
columns = 2
width = 1920
height = 1080
gpu-id = 0
nvbuf-memory-type = 0

[source0]
enable = 1
type = 4
uri = rtsp://admin:1234@192.168.1.13:554/h264/ch1/main/av_stream
num-sources = 1
gpu-id = 0
cudadec-memtype = 0
smart-record = 1
smart-rec-video-cache = 30
smart-rec-duration = 5
smart-rec-start-time = 3
smart-rec-interval = 5
smart-rec-dir-path = ./capture

[sink0]
enable = 0
type = 1
sync = 0
source-id = 0
gpu-id = 0
nvbuf-memory-type = 0

[sink1]
enable = 1
type = 4
codec = 1
enc-type = 0
sync = 0
qos = 0
bitrate = 4000000
profile = 0
rtsp-port = 8554
udp-port = 5400

[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 = Arial
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 = 4
batched-push-timeout = 40000
width = 1920
height = 1080
enable-padding = 0
nvbuf-memory-type = 0

[primary-gie]
enable = 1
gpu-id = 0
batch-size = 1
network-mode = 1
......

I’m 100% sure that each app use different rtsp port, and all apps are running in docker container. Each app receives different rtsp stream.

Please give me some help, because it happends in our customer’s production environment, that’s fatal problem to them. Thanks everyone.

Do you use the same app configuration file for the four apps?

Thanks Fiona, actually I used different settings for 4 apps, the rtsp-port are 8554, 8555, 8556 and 8557. Besides, I use docker container to deploy the app, and the outside port numbers are different too, so there’s no port confliction.

But what confuse me is the udp-port, should I change the different udp-port for 4 apps? And do I have to expose the udp-port outside the container? For example, docker run -it -p 8554:8554 -p 5400:5400 .... I didn’t expose the udp-port, but it would also work before.

The udp port should be different too

Ok, and do I have to expose the udp-port outside the container?

rtsp port is for control, udp port is for payload. You need to expose both.

Thanks Fiona, I’ll try and let you know later.

Thanks Fiona, problem solved, we should expose different udp-ports.

1 Like