I am running a pipeline on multiple streams. I need to run a certain secondary model on some of the streams, and another secondary model on the remains part of the streams.
So far I tried two approach.
** First approach **
First approach, described here Python3 core dumped
seems to crash randomly after a while resulting in a core dumped. The approach is based on manually change the pgie of each object using a probe. That means editing obj_meta.unique_component_id. By changing the pgie I can enable/disable the secondary models. This works but result in core dumped error.
I’d like to use this approach because it is rather simple. However, since at the moment I couldn’t find any solution, I am trying the second approach.
** Second approach **
The second approach was proposed to me by Nvidia here Run secondary models only on certain streams - #7 by kesong
It consists in using multiple nvstreammux and nvstreamdemux elements to demux and remux sources and connect only the appropriate sources to the desired models.
I tried this approach. But every time I connect pads from a nvstreamdemux to a nvstreammux element, I get the error:
MainThread 2022-07-13 17:26:33,516 - pipeline.bus_call - ERROR - Bus call: Error: gst-stream-error-quark: NvBufSurfTransform failed with error -3 while converting buffer (1): gstnvinfer.cpp(1376): convert_batch_and_push_to_input_thread (): /GstPipeline:pipeline0/GstNvInfer:vehicles-make-nvinference-engine
I am wondering if it is even possible to connect output of nvstreamdemux element to nvstreammux element. According to this post Stream muxing after demuxing - #9 by Amycao it is not possible. I wanted to double check with you if it is possible or not.
The pipeline I built seems correct (see attached pdf). However, it reports the error above.
The pipeline attached has many pads (to support 64 streams) but only 5 streams connected. That’s why you’ll see a lot of pads.
pipeline.pdf (75.3 KB)
I am willing to try other approaches. As of now I am really confused as to why the first approach does not work.