Rtsp input to deepstream_test_3.py not working

The rtsp stream can be viewed using VLC, but when used as the input to deepstream_test_3.py (included in deepstream apps), the following error occured:

Error: gst-resource-error-quark: Unhandled error (9): gstrtspsrc.c(6563): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source:
Bad Request (400)
Exiting app

Also tried this: (rtsp address hidden)
!gst-launch-1.0 uridecodebin uri=rtsp://address ! nveglglessink
Got the following error:

ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Unhandled error
Additional debug info:
gstrtspsrc.c(6563): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Bad Request (400)

Information about the machine:
• Hardware Platform (Jetson / GPU): Tesla V100
• DeepStream Version: deepstream SDK 6.1
• TensorRT Version: 8.4.1-1+cuda11.6
• NVIDIA GPU Driver Version (valid for GPU only): 510.47.03

Could you provide us the rtsp source uri?

I am afraid I cannot share the rtsp uri as it’s confidential. I am wondering if there is a way to stop the deepstream (or gstreamer) to request response from the camera server. It seems that gst stop running when trying to retrieve info from the server.

The code actually works for one of my rtsp uri, and I compared the output for running

!gst-launch-1.0 uridecodebin uri=rtsp:address ! nveglglessink

The one works showing:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp:address
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING …
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request

But the one didn’t work, stopped after “Progress: (open) Retrieving server options”:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp:address
Progress: (open) Retrieving server options
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Unhandled error
Additional debug info:
gstrtspsrc.c(6563): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Bad Request (400)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

Cause we cannot get the source, it may mainly depend on you to solve it. Also it seems that It is related to your RTSP stream configuration and GStreamer processing from the log Progress: (open) Retrieving server options. You can also check this problem from the gstreamer forums. Thanks

My problem is solved with the command: sudo apt remove gstreamer1.0-plugins-ugly

I saw this solution several times in other posts like this one and this one, but I didn’t try it because some people posted it didn’t work for them. I finally gave it a try, and it fixed my problem.

1 Like