• Hardware Platform (Jetson / GPU) Jetson Orin Nano • DeepStream Version 7.1 • JetPack Version (valid for Jetson only) 6.1
**• How to reproduce the issue ? I am working on Runtime addition and deletion of sources, i will be running multiple features within 1 nvurisrcbin so when i am adding source its running fine, when i am removing, it is removed properly, and when i am re-adding any new source bin its is giving this error
1st: add_source_bin(camera_id=22, features=[“xyz”])
2nd: remove_source(camera_id=22)
3rd: add_source_bin(camera_id=22, features=[“PEOPLE_COUNT”])
Yes, i am trying for dynamic add/remove function in python
can you please guide me in detail which function should i refer for dynamic source add/delete in deepstream_test5
I am facing the issue related to nvinfer while readding the source i have some questions
1. Do i need to manage state while nvinfer is empty meaning no data flow
2. I am enforcing nvmm RGBA caps in post processing branch of nvinfer and nvurisrcbin
The dynamic source add/remove has been implemented inside nvmultiurisrcbin. The /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test5 is the sample for how to use nvmultiurisrcbin in pipeline.
#Check for caps
caps=pad.get_current_caps()
gststruct=caps.get_structure(0)
gstname=gststruct.get_name()
# Need to check if the pad created by the decodebin is for video and not
# audio.
print("gstname=",gstname)
if(gstname.find("video")!=-1):
but in my case i was unable to get the caps so i added
template_caps = pad.get_pad_template().get_caps()
print(f"DEBUG: Template caps: {template_caps.to_string()}")
decoder_caps = None
# Try to get current caps
for i in range(10):
current_caps = pad.get_current_caps()
if current_caps:
decoder_caps = current_caps
break
# If no current caps, try setting our desired caps - FORCE RGBA
desired_caps = Gst.Caps.from_string(
"video/x-raw(memory:NVMM), format=(string)RGBA"
)
if pad.set_caps(desired_caps):
print("DEBUG: Successfully set RGBA caps")
decoder_caps = desired_caps
break
print(f"DEBUG: Waiting for decoder caps, attempt {i+1}/10")
time.sleep(0.2)
if not decoder_caps:
print("WARNING: No decoder caps available, using fixed caps")
and in post processing branch after nvinfer i add the capsfilter as below
capsfilter = Gst.ElementFactory.make("capsfilter", f"caps_{name_suffix}")
# Replace the existing caps line with:
caps = Gst.Caps.from_string(
"video/x-raw(memory:NVMM), format=(string)RGBA"
)
capsfilter.set_property("caps", caps)
Earlier i tried with nvmultiurisrcbin but there was not that much control i am solving an problem where some feature are running on core python and associate libraries like mediapipe, etc..
Is this problem related to caps negotiation???
as reason error is -5 it means some fatal error but exactly i am not getting the issue
her is my current architecture:
nvurisrcbin(1..N) - tee(1 per bin) - queue(per tee pad) - streammux(for 3 unique features) - infer(for 3 unique feature) - nvvideoconvert(per infer) - capsfilter(per infer) - fakesink(per infer)