Multiple detectors multiple sinks

the scenario is :

  1. multiple independent detectors have to run simultaneously on full frame (should multiple primary gie’s be used or primary and multiple secondary gie’s)
  2. each detector should produce separate output file ( eg: out1.mp4 and out2.mp4, input is the same source .mp4 file). how to modify sink or source to point each detector and produce separate output file.

I have tried back to back detectors, but it does not produce separate output file for each detector and also the secondary gie doesn’t work on full frame.

Is this scenario possible? If so, could you please say what changes to be made to config file for the scenario.

you can add a “tee” plugin between nvstreammux and pgie to branch the data of nvstreammux

got it. Thank you.
could I please know how would the solution be:
If both the detections (of 2 models) have to be produced as combined in one output mp4 file? (with the same pgie and sgie1 on full frame working simultaneously)

Hi @bd95,
Sorry for delay!
Do you mean you want a mux their outputs with a “mux” plugin like below?


Thank you for your time. Yes that’s the idea, both the detectors work on full frame simultaneously.

  1. Is it possible to combine both the detector’s tracking results together into a single output mp4 video. can this be done through mux plugin?
  2. Is it possible to produce separate tracking result videos, simultaneously on full frame? And tee plugin could be used for it?

is it possible for you to draw a simple graph like mine to illustrate what you want?

Sure, could you please check your messages, sorry for inconvenience.

Hi @bd95,
Sorry for delay!
For your pipeline architecture, I think the main issue is the implementation of the mux plugin with at least two difficulty

  1. merge the meta data from the two streams
  2. synchronize the outputs from the two streams.
    i would think it’s very very … difficult to mux them.

Got it, thank you.
could I get any sample or example code for this .
could you please tell me which files would be edited to merge data from two streams and synchronize the outputs?

we don’t have sample code or mux plugin for such case.

I saw you filed another topic - Deepstream run multiple model engines concurrently , please close of these two.

got it. thank you.
another question is it possible to run secondary detector on full frame in back to back detectors?

yes. that’s back to back sample to demonstrate.
Comparing to run the models in two seperate pipeline and mux them at last, maybe running them in one pipeline is easier.

Got it, will try it with one pipeline. Thank you for explaining.