Pipeline Crash on Stream Removal with Gst-nvmultiurisrcbin and CapsFilter

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 7.0
• JetPack Version (valid for Jetson only): -
• TensorRT Version: 8.6.1.6-1+cuda12.0
• NVIDIA GPU Driver Version (valid for GPU only): 560.28.03
• Issue Type (questions, new requirements, bugs): questions, bugs
• How to reproduce the issue? (This is for bugs. Including which sample app is used, the configuration files content, the command line used, and other details for reproducing): Customized version of runtime_source_add_delete
• Requirement details (This is for the new requirement. Including the module name which plugin or for which sample application, and the function description): nvmultiurisrcbin → nvinfer-server → nvinfer-server → nvtracker → nvvideoconvert → capsfilter → nvmsgconv → nvmsgbroker

I followed the suggestion to upgrade to DeepStream 7.0 and used Gst-nvmultiurisrcbin element to dynamically add/remove streams via a REST API. However, I encountered a new issue when removing a stream through the /api/v1/stream/remove endpoint. The pipeline crashes under the following conditions:

  • Max Batch Size: 1
  • Stream Source: MP4 sample video

The pipeline includes capsfilter for converting the NVMM format to RGB; this element seems problematic. Here’s a snippet I used in the probe function to convert buffers to a NumPy array for image storage:

frame_array = pyds.get_nvds_buf_surface(hash(gst_buffer), batch_id)
frame_array = np.ascontiguousarray(frame_array)
frame_array = np.frombuffer(frame_array, dtype=np.uint8)
frame_array = frame_array.reshape(1080, 1920, 3)
frame_array = cv2.cvtColor(frame_array, cv2.COLOR_BGR2RGB)

When I removed the capsfilter from the pipeline, the API call to remove the stream worked without crashing the pipeline. However, the snippet above no longer functions since it expects RGBA/RGB format, leading to the following error:

RuntimeError: get_nvds_buf_surface: Currently we only support RGBA/RGB color Format

Probably, it’s relevant to this topic:

As suggested in the above post, I tried adding a tee element to the pipeline, but it didn’t help.

How can I re-enable the capsfilter without causing the pipeline to crash when removing streams? Are there any alternative approaches or best practices to handle format conversion?

Any suggestions or guidance would be greatly appreciated!

Could you attach your simplified demo code? I can try that on my side.

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.