Streaming with RTSP in deepstream has black screen

I am trying to stream using RTSP protocol and I have black screen in display. deepstream-app is used to stream from DVR.
What could be the issue?
This rtsp format (rtsp://192.17.3.2:554/user=admin&password=&channel=2&stream=0.sdp?) worked in Windows11 using VCR.
I have tested with Windows 11 PC streaming from CCTV to PC.
Using the same rtsp format to Xavier with Deepstream has black screen.

My config is

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

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

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=rtsp://192.17.3.2:554/user=admin&password=&channel=2&stream=0.sdp?
num-sources=1
#drop-frame-interval=2
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

Device infos are as follow.

• Hardware Platform (Jetson / GPU)
Xavier
• DeepStream Version
5.1 (;atest)
• JetPack Version (valid for Jetson only)
R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t186ref, EABI: aarch64, DATE: Fri Jun 26 04:34:27 UTC 2020
• TensorRT Version
latest
• NVIDIA GPU Driver Version (valid for GPU only)
10.2

Please provide complete information as applicable to your setup.

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

They are at bottom.

Please try gst-launch pipeline to check whether the rtsp uri works in the platform.

How can I try using gst-launch?
Can have gst-launch command format?
Initially with wrong rtsp format, the program show connection error.

Now with correct rtsp format, no error and just that display shows black screen.
Is that because of type=4 needs to be chosen.?
Current type is 3. For rtsp, type=4?

I tried as the following gst-launch.

xavier@xavier-desktop:~$ gst-launch-1.0 --gst-debug=rtspsrc:5 rtspsrc location=rtsp://192.17.3.2/user=admin&password=&channel=2&stream=0.sdp? ! rtph264depay ! queue ! nvv4l2decoder ! queue ! nvvideoconvert ! nveglglessink

The following errors happened.
rtsp link provided is not used.

Provided rtps is rtsp://192.17.3.2/user=admin&password=&channel=2&stream=0.sdp?
But only front part is used rtsp://192.17.3.2/user=admin

xavier@xavier-desktop:~$ gst-launch-1.0 --gst-debug=rtspsrc:5 rtspsrc location=rtsp://192.17.3.2/user=admin&password=&channel=2&stream=0.sdp? ! rtph264depay ! queue ! nvv4l2decoder ! queue ! nvvideoconvert ! nveglglessink
[2] 16954
[3] 16955
[4] 16956
bash: !: command not found
[1]   Exit 1                  gst-launch-1.0 --gst-debug=rtspsrc:5 rtspsrc location=rtsp://192.17.3.2/user=admin
[3]-  Done                    password=
[4]+  Done                    channel=2
xavier@xavier-desktop:~$ 0:00:00.062975168 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8617:gst_rtspsrc_uri_set_uri:<rtspsrc0> parsing URI
0:00:00.063076992 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8624:gst_rtspsrc_uri_set_uri:<rtspsrc0> configuring URI
0:00:00.063111072 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8640:gst_rtspsrc_uri_set_uri:<rtspsrc0> set uri: rtsp://192.17.3.2/user=admin
0:00:00.063131680 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8642:gst_rtspsrc_uri_set_uri:<rtspsrc0> request uri is: rtsp://192.17.3.2/user=admin
Setting pipeline to PAUSED ...
0:00:00.063379360 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8391:gst_rtspsrc_start:<rtspsrc0> starting
0:00:00.063515584 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd OPEN
0:00:00.063541280 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5598:gst_rtspsrc_loop_send_cmd:<rtspsrc0> not interrupting busy cmd unknown
Pipeline is live and does not need PREROLL ...
0:00:00.063948992 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command OPEN
0:00:00.063994560 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
0:00:00.064058752 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4614:gst_rtsp_conninfo_connect:<rtspsrc0> creating connection (rtsp://192.17.3.2/user=admin)...
Progress: (open) Opening Stream
0:00:00.064632000 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4625:gst_rtsp_conninfo_connect:<rtspsrc0> sanitized uri rtsp://192.17.3.2/user=admin
0:00:00.064716384 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4659:gst_rtsp_conninfo_connect:<rtspsrc0> connecting (rtsp://192.17.3.2/user=admin)...
Progress: (connect) Connecting to rtsp://192.17.3.2/user=admin
0:00:00.133218848 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7342:gst_rtspsrc_retrieve_sdp:<rtspsrc0> create options... (async)
0:00:00.133296448 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7351:gst_rtspsrc_retrieve_sdp:<rtspsrc0> send options...
0:00:00.133489696 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
Progress: (open) Retrieving server options
0:00:00.133759744 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
0:00:00.133788736 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5964:gst_rtspsrc_try_send:<rtspsrc0> sending message
0:00:00.136703776 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5866:gst_rtsp_src_receive_response:<rtspsrc0> received response message
0:00:00.136736352 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5885:gst_rtsp_src_receive_response:<rtspsrc0> got response message 200
0:00:00.136763936 16954   0x5565d205e0 INFO                 rtspsrc gstrtspsrc.c:7364:gst_rtspsrc_retrieve_sdp:<rtspsrc0> Now using version: 1.0
0:00:00.136794016 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7371:gst_rtspsrc_retrieve_sdp:<rtspsrc0> create describe...
0:00:00.136816096 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7388:gst_rtspsrc_retrieve_sdp:<rtspsrc0> send describe...
0:00:00.136872896 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
0:00:00.136897760 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:476:default_before_send:<rtspsrc0> default handler
0:00:00.136917120 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5964:gst_rtspsrc_try_send:<rtspsrc0> sending message
Progress: (open) Retrieving media info
0:00:00.142664832 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5866:gst_rtsp_src_receive_response:<rtspsrc0> received response message
0:00:00.142694656 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5885:gst_rtsp_src_receive_response:<rtspsrc0> got response message 451
0:00:00.142748704 16954   0x5565d205e0 WARN                 rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<rtspsrc0> error: Unhandled error
0:00:00.142766432 16954   0x5565d205e0 WARN                 rtspsrc gstrtspsrc.c:6161:gst_rtspsrc_send:<rtspsrc0> error: ERROR (451)
0:00:00.142861824 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7514:gst_rtspsrc_retrieve_sdp:<rtspsrc0> free connection
0:00:00.142881632 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4715:gst_rtsp_conninfo_close:<rtspsrc0> closing connection...
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Unhandled error
Additional debug info:
gstrtspsrc.c(6161): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
ERROR (451)
0:00:00.142999552 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4721:gst_rtsp_conninfo_close:<rtspsrc0> freeing connection...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
0:00:00.143094272 16954   0x5565d205e0 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<rtspsrc0> can't get sdp
0:00:00.143167552 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command LOOP
0:00:00.143190560 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
0:00:00.143211872 16954   0x5565d205e0 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<rtspsrc0> we are not connected
0:00:00.143229376 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5636:gst_rtspsrc_loop:<rtspsrc0> pausing task, reason flushing
0:00:00.143245600 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd WAIT
0:00:00.143261536 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5585:gst_rtspsrc_loop_send_cmd:<rtspsrc0> cancel previous request LOOP
0:00:00.143277120 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy LOOP
Setting pipeline to READY ...
0:00:00.143292736 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.143406048 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd CLOSE
0:00:00.144448928 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy WAIT
0:00:00.144490976 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.144570816 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread:<rtspsrc0> got command CLOSE
0:00:00.144601280 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 0
Setting pipeline to NULL ...
0:00:00.144779040 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:8422:gst_rtspsrc_stop:<rtspsrc0> stopping
0:00:00.144832896 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd:<rtspsrc0> sending cmd WAIT
0:00:00.144854048 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd:<rtspsrc0> connection flush busy CLOSE
0:00:00.144873824 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush:<rtspsrc0> set flushing 1
0:00:00.144906176 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7569:gst_rtspsrc_close:<rtspsrc0> TEARDOWN...
0:00:00.144926176 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7574:gst_rtspsrc_close:<rtspsrc0> not ready, doing cleanup
0:00:00.144944000 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:7637:gst_rtspsrc_close:<rtspsrc0> closing connection...
0:00:00.144960768 16954   0x5565d205e0 DEBUG                rtspsrc gstrtspsrc.c:2058:gst_rtspsrc_cleanup:<rtspsrc0> cleanup
0:00:00.145016928 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:7569:gst_rtspsrc_close:<rtspsrc0> TEARDOWN...
0:00:00.145036704 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:7574:gst_rtspsrc_close:<rtspsrc0> not ready, doing cleanup
0:00:00.145054016 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:7637:gst_rtspsrc_close:<rtspsrc0> closing connection...
0:00:00.145070752 16954   0x5565d95150 DEBUG                rtspsrc gstrtspsrc.c:2058:gst_rtspsrc_cleanup:<rtspsrc0> cleanup
Freeing pipeline ...

@Fiona.Chen
Hi Fiona, any suggestion for this issue?
This rtsp://192.17.3.2/user=admin&password=&channel=2&stream=0.sdp? works for windows and VLC software.

@Fiona.Chen
Hi Fiona,
For this rtsp url rtsp://192.17.3.2/user=admin&password=&channel=2&stream=0.sdp?
I tested as you suggested using gst-launch-1 and error is as shown above.

gst-launch-1 just take the front part of url (rtsp://192.17.3.2/user=admin)

Is that url format issue?

But when I used in deepstream-app, there is no error and just that display black screen. Type-3 or 4 no difference.

Console output shows

**PERF: FPS 0 (Avg) FPS 1 (Avg) FPS 2 (Avg)
**PERF: 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)
**PERF: 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)

What could be issue?

The error 451 in rtsp rfc2326

Please contact your DVR vendor.

Thanks Fiona. Found out that gst-launch doesn’t accept & and replace with %26 ASCII character and it works.