Using nvarguscamerasrc without bufapi-version=TRUE for inference

• Jetson TX2
• DeepStream 4.0
• JetPack 4.3


I have created a pipeline using nvarguscamerasrc and object detection and tracking using YoloV3 and KLT respectively. An example of the pipeline using gst-launch can be seen below.

gst-launch-1.0 nvarguscamerasrc maxperf=1 bufapi-version=TRUE ! 'video/x-raw(memory:NVMM), width= 
(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1' ! m.sink_0 nvstreammux name=m 
batch-size=1 live-source=1 width=1280 height=720 ! 
nvinfer config-file-path=/path/to/config_infer_primary_yoloV3.txt interval=4 ! nvtracker 
tracker-width=416 tracker-height=416 ll-lib-file=/path/to/ ! nvvideoconvert ! nvdsosd ! 
nvegltransform ! nveglglessink

The pipeline works as it should, however, when implemented in a tee as a part of a larger system of pipelines, the bufapi-version interferes with the entire system, resulting in a internal data stream error.

My question is, therefore, is there any other way to use nvarguscamerasrc together with nvstreammux without setting bufapi-version=TRUE?

A reproducible pipeline is given below:

gst-launch-1.0 nvarguscamerasrc maxperf=1 bufapi-version=FALSE num-buffers=1 ! m.sink_0 nvstreammux 
name=m batch-size=1 live-source=1 width=1280 height=720 ! nvvideoconvert ! nvdsosd ! nvegltransform ! 

Inference and tracking is removed from the pipeline for reproducibility purposes. When setting * bufapi-version=FALSE* the following error message is produced:

ERROR: from element /GstPipeline:pipeline0/GstNvStreamMux:m: Input buffer number of surfaces (0) must be equal to mux->num_surfaces_per_frame (1)
Set nvstreammux property num-surfaces-per-frame appropriately

So, i was wondering if there is any way to solve this without using bufapi-version?


For linking with plugins in DeepStream SDK, bufapi-version=TRUE has to be set in nvarguscamerasrc. for you rusecase, we can enabl multiple sinks in running deepstream-app. Please check development guide and see if you can leverage existing implementations in sink group.