Rtspsrc is not being able to link with rtph264depay

Hello experts,

I am having a very basic issue and I do not know why. Maybe someone here could help me understand.
I am trying to use gstreamer plugins of deepstream and trying to execute the following after calling “gst_bin_add_many(GST_BIN(pipeline), source, rtph264depay, tee, NULL)”

gst_element_link_many (source, rtph264depay, tee, NULL);

which is always giving me FALSE
my source, rtph264depay and tee are as follows:

source = gst_element_factory_make (“rtspsrc”, “rtsp-source”);
g_object_set(G_OBJECT(source), “location”, location.c_str(), NULL);

rtph264depay = gst_element_factory_make(“rtph264depay”, “h264-depay”);
tee = gst_element_factory_make(“tee”, “tee”);

source, rtph264depay and tee are all okay (not NULL)

Any idea why I am having the issue? How to know why gst_element_link_many () is returning FALSE? How to debug?

Any help will be greatly appreciated.

Thanks in advance!

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)

Please use “gst-launch-1.0” command to try your pipeline before you write with c code. gst-launch-1.0

This problem is a gstreamer usage issue, and it has nothing to do with deepstream. You can refer to gstreamer resources or google for your answer.

gst-launch-1.0 works fine with the following commands:

gst-launch-1.0 rtspsrc location=‘rtsp://admin:admin@’ ! rtph264depay ! tee
gst-launch-1.0 rtspsrc location=‘rtsp://admin:admin@’ ! rtph264depay ! fakesink
gst-launch-1.0 rtspsrc location=‘rtsp://admin:admin@’ ! rtph264depay ! h264parse ! decodebin ! nvvidconv ! ‘video/x-raw, format=I420’ ! nvoverlaysink

I am using JP4.4.1 on a Nano 4GB. My deepstream version is 5.0

If anybody could tell me how to know what is the reason for a failed response from gst_element_link_many() then I could try to debug the issue.

By the way, I think I should mention that the same pipeline works fine for a v4l2src.

rtspsrc has dynamic src pads. rtspsrc (gstreamer.freedesktop.org), Pads and capabilities (gstreamer.freedesktop.org). You can not use gst_element_link_many() to connect it to other elements. Please investigate gstreamer first. This is deepstream forum, let’s focus on deepstream topics.

My apologies for being a bit off track. However, the code at the end of the day will be using deepstream gstreamer plugins in its pipeline and hence, it was posted in this forum. Thank you for your feedback, will have a look into the pads and find the reason why it is not working.

@caruofc No need to feel guilty to ask a gstreamer question here, if it were not deepstream, we will never learn gstreamer, very deep learning curve!! it makes deepstream difficult to learn too!

A similar question is answered here: network programming - RTSP pipeline implemented via C code not working? - Stack Overflow

with full code : Gst RtspSrc example · GitHub

I would like to reply again to mention the other simpler solution: gst_parse_launch()

gst-launch-1.0 is built using gst_parse_launch(), as long as you have a working gst-launch-1.0 xxx abc def, you are certain to make it right in c/c++ using gst_parse_launch().

read more on this: