Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) dGPU RTX3090 • DeepStream Version 7.1 • JetPack Version (valid for Jetson only) • TensorRT Version 10 • NVIDIA GPU Driver Version (valid for GPU only) 560.35.03 • 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) • Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
As background, I have read these threads (1) (2) (3), all of them are about uridecodebin/nvstreammux. None of them is about the new nvmultiurisrcbin.
I am using nvmultiurisrcbin with some initial sources provided as uri-list and sensor-id-list and during runtime I dynamically add/remove sources.
My goal: I am trying to have a consistent mapping between uri/sensor_id and source_id (if I understand correctly, it is set by internal nvstreammux of nvmultiurisrcbin in FrameMeta). I want to update the source_id for each frame’s NvDsFrameMeta for downstream identification per-stream processing.
Before using nvmultiurisrcbin I was able to modify the source_id to my desired id based on the custom uri->source_id mapping I had. I did that in a buffer probe callback on nvstreammux by accessing pad.get_peer() until I reached the uri-decode-bin which had the “uri” property.
My issue: With nvmultiurisrcbin I haven’t found a way to access the internal nvstreammux src pad, or the corresponding nvurisrcbin for each stream from pad peers.
Question: Is there a way to access the corresponding uri OR sensor_id after nvmultiurisrcbin creates the nvurisrcbin element/ghost pads/nvstreammux sinkpad for each source? I need this to be able to update the source_id property inside each frame’s NvDsFrameMeta.
Yes. However, this was for the nvstreammux case where I could access the peer pads to reach the uridecodebin element.
My problem with nvmultiurisrcbin is that I cannot access the samenvstreammux src pad or even the nvurisrcbins’ created internally by nvmultiurisrcbin.
I can only access the whole nvmultiurisrcbin’s src pad (shown on the right part of image) and calling src_pad.get_peer() does not return the nvstreammux src pad (previous element) but the next element’s sinkpad in the pipeline.
I don’t see how I can modify the source code to expose these pads or the internal (and closed source) nvstreammux which is called by libraries within the gst-nvmultiurisrcbin source code.
Do you mean to modify the gst-nvmultiurisrcbincreator.cpp with some custom logic and rebuild the plugin?
I am using Python and pyds bindings. Do I have to implement or re-build the bindings?
I also read This topic is similar but was also not solved with the provided answers (I have reviewed test5 with src_attribs_all.txt config but it doesn’t provide a clear solution. Any help to make this more clear is much appreciated!
The nvmultiurisrcbin has implemented the features you mentioned. You can implement the functions you need inside nvmultiurisrcbin. It is not recommended to implement similar functions in app while nvmultiurisrcbin has already implemented them if you want to use nvmultiurisrcbin in your app.
If the functions are implemented inside nvmulturisrcbin, the app is only for constructing the pipeline and communicate with the REST server through REST API, no needs to re-build the bindings.
We also provide Service Maker python APIs. E.G. /opt/nvidia/deepstream/deepstream/service-maker/sources/apps/python/pipeline_api/deepstream_test5_app
I figured out that I can get all three (uri, source_id and sensor_id) from the Gstreamer bus since a “stream-add” (and “stream-remove”) message is posted on the bus by gst-nvmultiurisrcbincreator.cpp whenever a stream is added to the pipeline (both initial uri-list and via REST API addition). I can then construct my mapping in python directly without having to build bindings for NvDsSourceInfo or anything else.
I hope that this is not going to change in future versions of Deepstream/nvmultiurisrcbin implementation, but in my current 7.1 it works and I can get what I wanted in Python/pyds.