tathagat dasgupta
tathagat dasgupta

Reputation: 11

Unable to link Nvstreamdemux to rtph264pay element using PyGObject

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson

• DeepStream Version 5.0

• JetPack Version (valid for Jetson only) 4.4

• TensorRT Version 7.0

• NVIDIA GPU Driver Version (valid for GPU only) • Issue Type( questions, new requirements, bugs) questions • 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)

print("Linking demux to the rtppayload in the Pipeline \n")
    for i in range(number_of_sources):
       demux_srcpad = streamdemux.get_request_pad("src_%u"%i)
       if not demux_srcpad:
           sys.stderr.write("Unable to get the src pad of streamdemux \n")
       sinkpad = rtppayload_list[i].get_static_pad("sink")
       if not sinkpad:
           sys.stderr.write(" Unable to get sink pad of rtppayload \n")
       demux_srcpad.link(sinkpad)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I am trying to create source pads for the nvstreamdemux element at run-time and link to several rtph264pay elements which reside inside the list : rtppayload_list. The above given code results in the following error: gi.overrides.Gst.LinkError:

Any help would be appreciated. Thanks !

Upvotes: 0

Views: 754

Answers (1)

hishaamhhh
hishaamhhh

Reputation: 157

you can only link element and pads that are compatible with each other.

in you case, nvstreamdemux outputs raw data in NV12 or RGBA format at its source pad whereas rtph264pay takes h264 encoded stream at its input sink pad. So these two are incompatible with each other.

You need to link nvstreamdemux to some element that encodes raw data into h264 like nvv4l2h264enc and then in turn link nvv4l2h264enc to rtph264pay.

so your pipeline should look like nvstreamdemux->nvv4l2h264enc->rtph264pay

Upvotes: 0

Related Questions