Error streaming RTSP with RTSP sink in deepstream-app

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU: Nvidia GeForce 4090)
• DeepStream Version: 6.2 docker container
• NVIDIA GPU Driver Version: 525.147.05
• Issue Type: questions
**• How to reproduce the issue ? **

I am trying to stream the output bounding box video as RTSP using deepstream-app using the RTSP setting for Sink group. Here is my config file:

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

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

[source0]
enable=1
type=3
uri=file://sample.mov
#uri=file:///opt/nvidia/deepstream/deepstream-6.2/videos/wah_train_0018.mov
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
type=2
sync=4
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
gpu_id=0
#1=h264 2=h265
codec=1
container=1
#output-file=sample_out.mp4
#encoder type 0=Hardware 1=Software
enc-type=1
sync=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
# set below properties in case of RTSPStreaming
rtsp-port=8556
udp-port=5400
udp-buffer-size=100000
nvbuf-memory-type=0

[osd]
enable=1
gpu-id=0
border-width=5
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=1
batched-push-timeout=40000
width=2560
height=1440
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5_chandana.txt

[tracker]
enable=1
gpu-id=0
tracker-height=320
tracker-width=120
ll-lib-file=/opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=config_tracker_IOU.yml


[tests]
file-loop=0

When I run this I get the following output, indicating that RTSP url is ready for playing:

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

However, within the same container when I try to check the stream with opencv python:

cv2.VideoCapture('rtsp://localhost:8556/ds-test')

I get the following error:

[rtsp @ 0x119f5c0] method DESCRIBE failed: 503 Service Unavailable

and on the deepstream-app output:

(deepstream-app:4812): GLib-GObject-WARNING **: 16:59:20.564: g_object_get_is_valid_property: object class 'GstUDPSrc' has no property named 'pt'
**PERF:  12.57 (13.13)	
**PERF:  13.13 (13.13)	
**PERF:  13.12 (13.13)	
**PERF:  13.11 (13.13)	
0:02:34.899787319  4812 0x561fa7d72860 WARN               rtspmedia rtsp-media.c:3272:wait_preroll: failed to preroll pipeline
0:02:34.899829208  4812 0x561fa7d72860 WARN               rtspmedia rtsp-media.c:3652:gst_rtsp_media_prepare: failed to preroll pipeline
0:02:34.900447824  4812 0x561fa7d72860 ERROR             rtspclient rtsp-client.c:1077:find_media: client 0x561fa7824110: can't prepare media
0:02:34.900601776  4812 0x561fa7d72860 ERROR             rtspclient rtsp-client.c:2963:handle_describe_request: client 0x561fa7824110: no media

When I play on VLC, I get the same error. I have already tried changing the sink to File sink (as suggested in other posts on this forum) to test if the encoder is working. The file is written and I am able to play and view it. So I doubt the encoder is the issue.

Could you help me figure out what is wrong with the RTSP please? If you think it is a network problem as mentioned in other posts, please elaborate more on what could be the problem and how I can fix it

Is VLC test on the other machines? In the same container, can you use this “gst-launch-1.0 uridecodebin uri=rtsp://stream address ! fakesink” to check if there is any error log. if no error, please refer to this topic.

/opt/nvidia/deepstream/deepstream-6.2# gst-launch-1.0 uridecodebin uri=rtsp://localhost:8556/ds-test ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://localhost:8556/ds-test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Unhandled error
Additional debug info:
gstrtspsrc.c(6585): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Service Unavailable (503)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

The ran the following in the same container as the deepstream-app is running. I’m getting the same error as VLC and ffmpeg (also tried in the same container). Please advise.

no narrow down the issue, please do some tests.

  1. when deepstream-app is running, can you use this command to test in container? will the printing flush?
    sudo tcpdump -v host 224.224.255.255
  2. please refer to this topic to improve encoding.

/opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-app# tcpdump -v host 224.224.255.255 tcpdump: listening on enp36s0f0, link-type EN10MB (Ethernet), capture size 262144 bytes

This is the output I’m getting. I’m not sure what you mean by will the printing flush

No other output other than this

sorry, I mean, the command-line keeps on printing. please refer to the test in this topic.
please refer to create_udpsink_bin in\opt\nvidia\deepstream\deepstream-6.4\sources\apps\apps-common\src\deepstream_sink_bin.c, deepstraem-app uses updsink to send data to “224.224.255.255”. you can add a probe function on udpsink’ sink. if the function can always receive data, please check why tcpdump can’t receive data from 224.224.255.255. BTW, udpsink is Gsteamer Opensource plugin.

Thank you for your help. I solved the issue by turning off the UFW on my host system and I managed to get the RTSP stream to play on VLC! I did not try the probe approach you shared.

1 Like

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