Access camera_id string with nvmultisrcbin downstream

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version: 7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
**• Issue Type( questions, new requirements, bugs): DeepStream SDK **
• How to reproduce the issue ?
• Requirement details: nvmultisrcbin

My pipeline has the following critical elements: nvmultisrcbin, nvinfer, tracker and nvmsgconv + nvmsgbroker. My pipeline does inference, tracking and outputs metadata to a Kafka topic only. There’s no display.

I have modified the nvmsgconv to include analytics information such as frame ID, tracking ID, bounding box information etc into a message. In addition to this information, I would also like to include “camera_id” (or “camera_name”) information as supplied to the nvmultisrcbin component when adding a new stream source.

From the nvmultisrcbin documentation, a new stream is added like this:

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

Downstream in the nvmsgconv, I have access to frame_meta->source_id which appears to be an integer. My question is, how can I access camera_id or camera_name? I would like to output this information as part of the message.

please refer to this doc for Payload with Custom Objects. how did you set msg2p-newapi?

In my current configuration, the parameter for nvmsgconv is set as msg2p-newapi=1. This setting is chosen as the nvtracker component produces ReID embeddings and stores them in a way that is easier to recover them later when msg2p-newapi is enabled.

Searching the forums a bit more, I encountered this response encouraging to do message parsing in the bus_call callback function. It is not clear to me however how I can pass the parsed values in the callback back into pipeline and attach my custom message blob (string) to the payload in nvmsgconv using NVDS_CUSTOM_MSG_BLOB type. Any pointers are appreciated.

Sorry for the late reply! If msg2p-newapi is 1, please refer to nvds_add_user_meta_to_frame callin in osd_sink_pad_buffer_image_probe of /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test4/deepstream_test4_app.c. this code save a jpg to meta data when If msg2p-newapi is 1.

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