Two nvstreammux elements in pipeline

• Issue Type: question

My goal is to have a pipeline, where some sources could go to different parts of pipeline than others. For example, source_0 and source_1 will use primary nvinfer and nvtracker but source_2 and source_3 will use the primary nvinfer with secondary nvinfer.

My idea is to use nvstreamdemux after the nvinfer and then link the nvstreamdemux with a new nvstreammux:

However I got segmentation fault (core dumped) and I can’t figure out why.

If I modify the pipeline like this:


although it’s pointless, it works.

Of course, the usage of nvstreamdemux without the second nvstreammux works fine, but then I can not use nvtracker or nvinfer, because buffers are not batched:

So it seems to me, that the second nvstreammuxes remove/modify metadata and they can not be used in this scenario.

Is it possible to build such pipeline? What is the best way to do this?

In fact, what you want are actually two separated pipelines.

The way you use pgie , sgie, nvstreammux and nvstreamdemux does not match our design.

It is not reasonable to put them in one pipeline.

Thank you for your answer!

Yes, I can create two separated pipelines, but I would like to take advantage of batches.

if I’m not wrong, it is more effective to have only one NN model with larger batch size, than two NN models with half batch size for each of them. If this is true, one complex pipeline with the same pgie would be more effective than two separated pipelines.

That’s the reason why I want to create a pipeline wit 2 nvstreammux elements.

Unfortunately, nvstreammux is not designed to support your case.

1 Like