DeepStream-app connects to the RTSP network camera, and after running for a period of time, it cannot get the stream. (PERF: 0.00)

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) : Jetson Xavier NX
• DeepStream Version: 5.0.0
• JetPack Version (valid for Jetson only) : 4.4.1

Deepstream-app connection the network camera through RTSP. After running for a period of time, no stream will be available. The program shows that the Eglsink window is stuck in a frame a long time ago, or the display window is black, and the terminal output information is PERF=0.00.
无标题
I have tried a variety of cameras from different manufacturers and models, and I have also changed NX equipment. Most of them have this problem, but It’s just that the timing of the problem is different. Some programs appear after a night of running, others after a few days.
Some of the devices in question were connected to only one camera, while others were connected to multiple cameras. In the case of access to multiple cameras (e.g., 4 channels), there have been some normal and some abnormal situations, such as two of them are normal and the other two are PERF=0.00.

The configuration of single-channel cameras is as follows:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl

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

[source0]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=rtsp://admin:hhkj1234@192.168.1.12:554/cam/realmonitor?channel=1&subtype=0
num-sources=1
camera-id=1
gpu-id=0
## (0): memtype_device   - Memory type Device
## (1): memtype_pinned   - Memory type Host Pinned
## (2): memtype_unified  - Memory type Unified
cudadec-memtype=0
rtsp-reconnect-interval-sec=60

[sink0]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=2
sync=0
source-id=0
gpu-id=0
display-id=0
nvbuf-memory-type=0

[sink1]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
rtsp-port=8554
udp-port=5400
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
## 1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
bitrate=4000000
profile=0

[osd]
enable=1
gpu-id=0
border-width=1
text-size=12
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
display-text=1
display-bbox=1

[streammux]
gpu-id=0
## Boolean property to inform muxer that sources are live
live-source=1
batch-size=4
## time out in usec, to wait after the first buffer is available
## to push the batch even if the complete batch is not formed
batched-push-timeout=40000
## Set muxer output width and height
width=1280
height=720
## Enable to maintain aspect ratio wrt source, and allow black borders, works
## along with width, height properties
enable-padding=0
nvbuf-memory-type=0

## config-file property is mandatory for any gie section.
## Other properties are optional and if set will override the properties set in
## the infer config file.
[primary-gie]
enable=1
gpu-id=0
model-engine-file=yolov5s-zj.engine
labelfile-path=labels.txt
batch-size=4
#Required by the app for OSD, not a plugin property
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=config_infer_primary.txt

[tracker]
enable=0
gpu-id=0
tracker-width=960
tracker-height=540
ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
display-tracking-id=1

[nvds-analytics]
enable=0
config-file=config_nvdsanalytics.txt

[tests]
file-loop=0

The configuration of four cameras is as follows:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
#gie-kitti-output-dir=streamscl

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

[source0]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=rtsp://admin:hhkj1234@192.168.1.12:554/cam/realmonitor?channel=1&subtype=0
num-sources=1
camera-id=1
gpu-id=0
cudadec-memtype=0
drop-frame-interval=1
rtsp-reconnect-interval-sec=60

[source1]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=rtsp://admin:hhkj1234@192.168.1.110:554/cam/realmonitor?channel=1&subtype=0
num-sources=1
camera-id=2
gpu-id=0
cudadec-memtype=0
drop-frame-interval=1
rtsp-reconnect-interval-sec=60

[source2]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI
type=3
uri=rtsp://admin:hhkj1234@192.168.1.125:554/cam/realmonitor?channel=1&subtype=0
num-sources=1
camera-id=3
gpu-id=0
cudadec-memtype=0
drop-frame-interval=1
rtsp-reconnect-interval-sec=60

[source3]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
num-sources=1
uri=rtsp://admin:hhkj1234@192.168.1.127:554/cam/realmonitor?channel=1&subtype=0
camera-id=4
gpu-id=0
cudadec-memtype=0
drop-frame-interval=1
rtsp-reconnect-interval-sec=60

[sink0]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=2
sync=0
source-id=0
gpu-id=0
display-id=0
nvbuf-memory-type=0

[sink1]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
rtsp-port=8554
udp-port=5400
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
## 1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0

[osd]
enable=1
gpu-id=0
border-width=1
text-size=12
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
display-text=1
display-bbox=1

[streammux]
gpu-id=0
## Boolean property to inform muxer that sources are live
live-source=1
batch-size=4
batched-push-timeout=40000
## Set muxer output width and height
width=1280
height=720
enable-padding=0
nvbuf-memory-type=0

## config-file property is mandatory for any gie section.
## Other properties are optional and if set will override the properties set in
## the infer config file.
[primary-gie]
enable=1
gpu-id=0
model-engine-file=yolov5s-zj.engine
labelfile-path=labels.txt
batch-size=4
#Required by the app for OSD, not a plugin property
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=config_infer_primary.txt

[tracker]
enable=0
gpu-id=0
tracker-width=960
tracker-height=540
ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
display-tracking-id=1

[nvds-analytics]
enable=0
config-file=config_nvdsanalytics.txt

[ds-example]
enable=1
processing-width=1280
processing-height=720
full-frame=1
unique-id=15

[tests]
file-loop=0

NVIDIA experts, can you help me out? How to solve this problem. Thank you very much!

Did you check the rtsp stream work normally when the issue happened?
Could you please upgrade to latest version 6.0GA for a try? there new features and many bug fixes.

The RTSP stream is working properly, because I can receive streams normally using VLC.

How much will it change for your system to upgrade to DS6.0.1? I already have some application environments deployed on my JetsonNx. Will this affect me?

Please check this,
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Application_migration.html

There is also a problem, I use RtspSink to push out the stream, use VLC to access xx.xx.xx. xx/ds-test to get the stream, but most of the time the obtained stream has a green background, and occasionally a frame is correct. The resolution of the video from the camera is the same as that set in streammux. What is the reason?

  • Here is my configuration.
[source0]
enable=1
## Type: 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://admin:hhkj1234@192.168.1.128:554/Streaming/Channels/101
num-sources=1
camera-id=2
rtsp-reconnect-interval-sec=60

[sink0]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=2
sync=0
source-id=0
gpu-id=0
display-id=0
nvbuf-memory-type=0

[sink1]
enable=1
## Type: 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
rtsp-port=8554
udp-port=5400
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
## 1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0

[osd]
enable=1
gpu-id=0
border-width=1
text-size=12
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
display-text=1
display-bbox=1

[streammux]
gpu-id=0
## Boolean property to inform muxer that sources are live
live-source=1
batch-size=4
## time out in usec, to wait after the first buffer is available
## to push the batch even if the complete batch is not formed
batched-push-timeout=40000
## Set muxer output width and height
width=1280
height=720
## Enable to maintain aspect ratio wrt source, and allow black borders, works
## along with width, height properties
enable-padding=0
nvbuf-memory-type=0

## config-file property is mandatory for any gie section.
## Other properties are optional and if set will override the properties set in
## the infer config file.
[primary-gie]
enable=1
gpu-id=0
model-engine-file=yolov5s-zj.engine
labelfile-path=labels.txt
batch-size=4
#Required by the app for OSD, not a plugin property
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=1
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary.txt

but most of the time the obtained stream has a green background, and occasionally a frame is correct.

It means it’s very easy to reproduce this issue, correct?
I tried your 4 rtsp camera setting in DS-6.0GA for a few minutes on Xavier, do not have this issue.

@shenshen927 Please enable your local display first to make sure the video you sent to rtsp is correct.

@Fiona.Chen Local display is enabled and the Eglsink window is always open. Local display normal. The VLC window that receives the RTSP stream either shows a green background or has a lot of mosaics in the screen. Most of the time, though, the video is shown on a green background.

It is packets lost caused the video mosaics. You may try a lower encoding bitrate to check whether it can improve this problem.

I’m closing this topic due to there is no update from you for a period, assuming this issue was resolved.
If still need the support, please open a new topic. Thanks

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