Rtsp-out no data (DeepStream 8.0)

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU):4090
• DeepStream Version:8.0
• JetPack Version (valid for Jetson only)
**• TensorRT Version:**8.6.1.6
**• NVIDIA GPU Driver Version (valid for GPU only):**570.133.07
• Issue Type( questions, new requirements, bugs):bugs
I’m working with the deepstream_python_apps detection with deepstream-test1-rtsp-out . I’ve successfully implemented with deepstream-app:

1.input:python3 deepstream_test1_rtsp_out.py -i /opt/nvidia/deepstream/deepstream-8.0/samples/streams/sample_720p.h264

2.output:

Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Creating H264 Encoder
Is it Integrated GPU? : 0
Creating H264 rtppay
Playing file /opt/nvidia/deepstream/deepstream-8.0/samples/streams/sample_720p.h264
Adding elements to Pipeline

Linking elements in the Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

Opening in BLOCKING MODE
Opening in BLOCKING MODE
0:00:00.430961037 53450 0x323d9d00 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2109> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:363 [Implicit Engine Info]: layers num: 0

0:00:00.431059932 53450 0x323d9d00 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2212> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
0:00:00.434891134 53450 0x323d9d00 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Frame Number=0 Number of Objects=17 Vehicle_count=11 Person_count=6
Frame Number=1 Number of Objects=15 Vehicle_count=8 Person_count=7
Frame Number=2 Number of Objects=15 Vehicle_count=9 Person_count=6
Frame Number=3 Number of Objects=18 Vehicle_count=12 Person_count=6

3.rtsp no data:

tcpdump -i any port 8554
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]… for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
10:21:21.897998 lo In IP localhost.36550 > localhost.8554: Flags [S], seq 1524342559, win 65495, options [mss 65495,sackOK,TS val 2190274947 ecr 0,nop,wscale 7], length 0
10:21:21.898034 lo In IP localhost.8554 > localhost.36550: Flags [R.], seq 0, ack 1524342560, win 0, length 0
10:21:34.761946 lo In IP localhost.34488 > localhost.8554: Flags [S], seq 3351241740, win 65495, options [mss 65495,sackOK,TS val 2190287811 ecr 0,nop,wscale 7], length 0
10:21:34.761994 lo In IP localhost.8554 > localhost.34488: Flags [S.], seq 3367290079, ack 3351241741, win 65483, options [mss 65495,sackOK,TS val 2190287811 ecr 2190287811,nop,wscale 7], length 0
10:21:34.762037 lo In IP localhost.34488 > localhost.8554: Flags [.], ack 1, win 512, options [nop,nop,TS val 2190287811 ecr 2190287811], length 0
10:21:34.762262 lo In IP localhost.34488 > localhost.8554: Flags [P.], seq 1:87, ack 1, win 512, options [nop,nop,TS val 2190287812 ecr 2190287811], length 86: RTSP: OPTIONS rtsp://localhost:8554/ds-test RTSP/1.0
10:21:34.762287 lo In IP localhost.8554 > localhost.34488: Flags [.], ack 87, win 511, options [nop,nop,TS val 2190287812 ecr 2190287812], length 0
10:21:34.765056 lo In IP localhost.8554 > localhost.34488: Flags [P.], seq 1:202, ack 87, win 512, options [nop,nop,TS val 2190287814 ecr 2190287812], length 201: RTSP: RTSP/1.0 200 OK
10:21:34.765107 lo In IP localhost.34488 > localhost.8554: Flags [.], ack 202, win 511, options [nop,nop,TS val 2190287814 ecr 2190287814], length 0
10:21:34.769598 lo In IP localhost.34488 > localhost.8554: Flags [P.], seq 87:199, ack 202, win 512, options [nop,nop,TS val 2190287819 ecr 2190287814], length 112: RTSP: DESCRIBE rtsp://localhost:8554/ds-test RTSP/1.0
10:21:34.805844 lo In IP localhost.8554 > localhost.34488: Flags [P.], seq 202:745, ack 199, win 512, options [nop,nop,TS val 2190287855 ecr 2190287819], length 543: RTSP: RTSP/1.0 200 OK
10:21:34.815757 lo In IP localhost.34488 > localhost.8554: Flags [P.], seq 199:348, ack 745, win 512, options [nop,nop,TS val 2190287865 ecr 2190287855], length 149: RTSP: SETUP rtsp://localhost:8554/ds-test/stream=0 RTSP/1.0
10:21:34.821369 lo In IP localhost.8554 > localhost.34488: Flags [P.], seq 745:970, ack 348, win 512, options [nop,nop,TS val 2190287871 ecr 2190287865], length 225: RTSP: RTSP/1.0 200 OK
10:21:34.832391 lo In IP localhost.34488 > localhost.8554: Flags [P.], seq 348:478, ack 970, win 512, options [nop,nop,TS val 2190287882 ecr 2190287871], length 130: RTSP: PLAY rtsp://localhost:8554/ds-test/ RTSP/1.0
10:21:34.840042 lo In IP localhost.8554 > localhost.34488: Flags [P.], seq 970:1193, ack 478, win 512, options [nop,nop,TS val 2190287889 ecr 2190287882], length 223: RTSP: RTSP/1.0 200 OK
10:21:34.882427 lo In IP localhost.34488 > localhost.8554: Flags [.], ack 1193, win 512, options [nop,nop,TS val 2190287932 ecr 2190287889], length 0
10:21:44.941194 lo In IP localhost.34488 > localhost.8554: Flags [P.], seq 478:593, ack 1193, win 512, options [nop,nop,TS val 2190297990 ecr 2190287889], length 115: RTSP: TEARDOWN rtsp://localhost:8554/ds-test/ RTSP/1.0
10:21:44.941438 lo In IP localhost.34488 > localhost.8554: Flags [F.], seq 593, ack 1193, win 512, options [nop,nop,TS val 2190297991 ecr 2190287889], length 0

  1. are you running deepstream_test1_rtsp_out.py in docker container and playing the outut rtsp in host?
  2. noticing “I’ve successfully implemented with deepstream-app”, if testing deepstream-app with rtsp sink, can the output rtsp stream play well?
  3. if testing deepstream_test1_rtsp_out.py without any modificatons, can the output rtsp stream play well? if using filesink or render sink, is the output video fine?

Yes, it’s on a Docker container with an RTX 4090 GPU.
I verified with deepstream-app and it didn’t work either.
Also, deepstream_test1_rtsp_out.py didn’t work either.

python3 deepstream_test1_rtsp_in_rtsp_out.py -i rtsp://127.0.0.1:554/live/dog
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating H264 Encoder
Is it Integrated GPU? : 0
Creating H264 rtppay
Adding elements to Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

Opening in BLOCKING MODE
0:00:00.449795760 58075 0x991d9b0 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl. trt engine from :/opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:363 [Implicit Engine Info]: layers num: 0

0:00:00.449888789 58075 0x991d9b0 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2engine model: /opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
0:00:00.454012792 58075 0x991d9b0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

Decodebin child added: rtph264depay0

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

Decodebin child added: nvv4l2decoder0

Opening in BLOCKING MODE
In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7fe42c7a0770 (GstCapsFeatures at 0x7fe3880bcef0)>
Frame Number= 0
Frame Number= 1
Frame Number= 2
Frame Number= 3
Frame Number= 4
Frame Number= 5
Frame Number= 6
Frame Number= 7
Frame Number= 8
Frame Number= 9
Frame Number= 10
Frame Number= 11
Frame Number= 12
Frame Number= 13
Frame Number= 14
Frame Number= 15

netstat -antp |grep 8554
tcp 0 0 0.0.0.0:8554 0.0.0.0:* LISTEN 403474/python3
root@instance-bf274329:~# tcpdump -i any port 8554
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]… for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes

from this log, the model detects some objects, hence rtsp receiving, decoding, inference should be fine.
If testing deepstream-app with filesink or render sink, is the output video fine? if so, the issue should be related to the rtspserver and network.

Have these Python app use cases been validated in an NVIDIA RTX 4090 x86 container?

Will there be any impact since the operating system I’m using is Ubuntu 22.04?

My requirement is simple: RTSP stream in, detection, RTSP stream out。

please refer to the compatibility table. DS8.0 requires Ubuntu 24.04 and TRT 10.9.0.34. and please refer to this doc to start docker. If all lib versions meet the requirements, Please refer to my last comment to narrow down this issue. From the logs, the detection model work is working.

Do I need to downgrade the NVIDIA driver if I use DeepStream 7.1?

I’m currently using the nvcr.io/nvidia/deepstream:8.0-gc-triton-devel image. Is an enterprise license required to support the RTSP server?

I’m using the Ubuntu 24.04 operating system, but it’s still not working. Haven’t a large company like yours tested this product thoroughly?

python3 deepstream_test1_rtsp_in_rtsp_out.py -i rtsp://127.0.0.1:554/live/dog/
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating H264 Encoder
Is it Integrated GPU? : 0
Creating H264 rtppay
Adding elements to Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

Opening in BLOCKING MODE
0:00:00.302373663 54285 0x1b9c1b30 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2109> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:363 [Implicit Engine Info]: layers num: 0

0:00:00.302425155 54285 0x1b9c1b30 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2212> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
0:00:00.305303192 54285 0x1b9c1b30 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

^CDecodebin child added: rtph264depay0

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

root@gpu-kvm:/opt/nvidia/deepstream/deepstream-8.0/sources/deepstream_python_apps/apps/deepstream-rtsp-in-rtsp-out# python3 deepstream_test1_rtsp_in_rtsp_out.py -i rtsp://116.148.216.132:554/live/dog/
Creating Pipeline

Creating streamux

Creating source_bin 0

Creating source bin
source-bin-00
Creating Pgie

Creating tiler

Creating nvvidconv

Creating nvosd

Creating H264 Encoder
Is it Integrated GPU? : 0
Creating H264 rtppay
Adding elements to Pipeline

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Starting pipeline

Opening in BLOCKING MODE
0:00:00.295278965 54306 0xa2f17b0 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2109> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:363 [Implicit Engine Info]: layers num: 0

0:00:00.295331949 54306 0xa2f17b0 INFO nvinfer gstnvinfer.cpp:685:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2212> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-8.0/samples/models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b1_gpu0_fp16.engine
0:00:00.298013349 54306 0xa2f17b0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Decodebin child added: source

Decodebin child added: decodebin0

Decodebin child added: rtph264depay0

Decodebin child added: h264parse0

Decodebin child added: capsfilter0

Decodebin child added: nvv4l2decoder0

Opening in BLOCKING MODE
In cb_newpad

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7590a0f907d0 (GstCapsFeatures at 0x758fe80d20e0)>
Frame Number= 0
Frame Number= 1
Frame Number= 2
Frame Number= 3

ffprobe rtsp://localhost:8554/ds-test
ffprobe version 6.1.1-3ubuntu5 Copyright (c) 2007-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!
[h264 @ 0x5c2006544700] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x5c2006544700] decode_slice_header error
[h264 @ 0x5c2006544700] no frame!

Thanks for the sharing! Please add following fix code at this code line,
encoder.set_property(“bitrate”, bitrate)
encoder.set_property(“insert-sps-pps”, 1)
after adding this fix, playing output rtsp is fine on dgpu with DS8.0. Here is my test.
lo-1201g.txt (13.7 KB). At the beginning, there was some decoding error because no IDR frame. then the decoding became fine.

It works now—thank you!

Thanks for the update! If need further support, please open a new one. Thanks!