DeepStream dynamically delete source

Pipeline
rtspsrc,rtph264depay,nvv4l2decoder \ ----------------------------------------------/rtmpsinkbin
rtspsrc,rtph264depay,nvv4l2decoder – > streammux,pgie, nvtracker, streamdemux, rtmpsinkbin
rtspsrc,rtph264depay,nvv4l2decoder /----------------------------------------------\rtmpsinkbin

when I set rtspsrc element state:
GstStateChangeReturn state_return = gst_element_set_state (srcbin[i].rtspsrc, GST_STATE_NULL);

I got error from bus_call:

ERROR from element rtsp-src: Unhandled error
Error details: gstrtspsrc.c(6161): gst_rtspsrc_send (): /GstPipeline:pipeline/GstRTSPSrc:rtsp-src:
Option not supported (551)

But state_return is return as GST_STATE_CHANGE_SUCCESS
Why

• Hardware Platform (Jetson / GPU)
• DeepStream Version 5.0dp
• JetPack Version (valid for Jetson only)
• TensorRT Version 7
• NVIDIA GPU Driver Version (valid for GPU only)

Hi,
You may replace rtmpsinkbin with fakesink and try again. To make sure the issue is not triggered by rtmpsink.

And can try to launch RTP server through test-launch:

sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev
gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)
[test-launch.c download from: https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c]
./test-launch "filesrc location=sample_1080p_h264.mp4 ! qtdemux ! rtph264pay name=pay0 pt=96 "

To clarify if the issue is specific to the RTSP source.

replace rtmpsinkbin with fakesink: result is same error
use test-launch … : result is OK
but camera is hikvision ,everything is ok
How can I fix this bug ?

Hi,
We have a sample for dynamically add/delete sources:

Please refer to it for your implementation.

I know this repo and test . will occur same error

It is solved by rtspssrc source code

1 Like

Hi,
Good to know you have fixed it. Thanks.

could you tell me how slove it? thank you

could you tell me how slove it? thank you