In nvmultiurisrcbin, how to restart a stream with a specified source_id

Continuing the discussion from How to update nvmultiurisrcbin source uri?:

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version docker-ds6.3
• TensorRT Version 8.5
• NVIDIA GPU Driver Version (valid for GPU only) 550.142

I’d like to replace or to open a certain sourceid flow, when I use the

curl - XPOST - d '{' http://localhost:9000/stream/add'
"key": "sensor",
"event": {
"camera_id": "uniqueSensorID1",
"camera_name": "front_door",
"camera_url": "file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4",
"change": "camera_streaming",
"metadata": {
"resolution": "1920 x1080",
"codec": "h264",
"framerate": 30
}
},
"headers": {
"source": "vst",
"created_at": "2021-06-01T14:34:13.417Z"
}
}'

Return results

 {
"reason" : "",
"status" : "STREAM_ADD_FAIL"
}

Unable to reopen the stream

But when I remove the stream first and add the same camera_id, SensorID, it succeeds but does not use my previous source_id

What do you mean by this?

Like my source_id = 0 is the source of the RTSP: / / 192.168.0.1 / XXXXX, I don’t think the soure_id = 0 change under the premise of change flow to RTSP: / / 192.168.0.2 / XXXXX, I use the “change” : Keeps returning failed for "camera_streaming "; When I opened the stream with camera_remove first, the stream started successfully, but the source_id changed

The reason I want the source_id to stay the same is because I’m using the nvpreprocess plugin, which requires the source_id parameter, like this:


When my source_id exceeded the number given by src_ids in the configuration file, the newly added source did not perform object detection anymore.
Or is there any way to modify the nvpreprocess configuration file to solve this problem

  1. Please upgrade to the latest DeepStream version.
  2. The source-id is not decided by the camera_id. The nvdsmultiurisrcbin is open source, You can check the code for how the source id is decided. Please check the DeepStream 7.1 source code in /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvmultiurisrcbin and /opt/nvidia/deepstream/deepstream/sources/libs/gstnvdscustomhelper

Can I set these parameters for nvpreprocess in python instead of using a configuration file
[group-0]
src-ids=0;1;2
custom-input-transformation-function=CustomAsyncTransformation
#custom-input-transformation-function=CustomTransformation
process-on-roi=0
roi-params-src-0=1500;1200;1500;1200;
#roi-params-src-1=0;540;900;500;960;0;900;500;0;0;540;900;
#roi-params-src-2=0;540;900;500;960;0;900;500;0;0;540;900;
#roi-params-src-3=0;540;900;500;960;0;900;500;0;0;540;900;

No. These are implemented by gst-nvdspreprocess plugin. The plugin is open source, if you can modify the plugin to accept the settings in some other way E.G. through plugin properties, it may be set through python app directly.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.