Gstreamer tee element branching shows output of both branches on one of the sink output

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU RTX 2060
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.1
• NVIDIA GPU Driver Version (valid for GPU only) 470
• Issue Type( questions, new requirements, bugs) bugs
• 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)

I have used tee element to branch gstreamer pipeline in deepstream-test3.cpp example
only difference from existing pipeline is that after nvstreammux, there is a tee element which sprouts two branches with two sink elements
1.streammux->queue->tee
2.BranchQueue1->pgie1- > queue2 - > tiler1 - > queue3 - > nvvidconv1 - > queue4 - > nvosd1 - > queue5 - > sink1
3.BranchQueue2->pgie2 - > queue6 - > tiler2 - > queue7 - > nvvidconv2 - > queue8 - > nvosd2 - > queue9 - > sink2

BranchPad1 = gst_element_get_request_pad(tee,“src_%u”)
teeQueuePad1= gst_element_get_static_pad (BranchQueue1, “sink”)

BranchPad2 = gst_element_get_request_pad(tee,“src_%u”)
teeQueuePad2= gst_element_get_static_pad (BranchQueue2, “sink”)

gst_pad_link (BranchPad1 , teeQueuePad1)
gst_pad_link (BranchPad2 , teeQueuePad2)

I am getting two output windows properly but one of the outputs show results of both branch 1 and branch 2, Am I missing something?

What do you mean by “one of the outputs show results of both branch 1 and branch 2”? Is there picture or video for that?

BTW, can you upgrade to latest deepstream version?

If you see top output window it shows output only for 1 Detector - SSD
but bottom window it shows output for both Yolov5 Person Detector and SSD
ID is label for SSD
Person for Yolov5

nvinfer for each detectors is different.

The two branches can not share the same nvstreammux. Please branch before nvstreammux.

So If I have single source then I will have to read it 2 times for running with 2 nvinfer elements.

Yes. There is no relationship between these two models, so you need two pipelines.

If we read same rtsp video frames multiple times, it is creating delay and memory issues right ? Is there any way to avoid that?

It is not a issue. Actually you have two pipelines.


@Fiona.Chen I have seen this response in one of your forums it says 2 nvinfer components can be added after a tee element which is preceded by a nvstreammux element but now I have seen you quoting "The two branches can not share the same nvstreammux. Please branch before nvstreammux"which one is correct

There is no relationship between these two models, so you need two pipelines.