본문으로 건너뛰기
SDK Version: Next

DxVnpuPipeline

DxVnpuPipeline is an all-in-one multi-channel element that performs decode, process, and inference entirely on the VNPU device.
It accepts H.264/H.265 bitstreams and outputs inference tensors via application/x-dxtensor caps.

Build Requirement

This element is only available when built with the --dxvnpu flag: ./build.sh --dxvnpu

Key Features

Multi-Channel Pipeline
Supports multiple input/output channels via request pads (sink_%u / src_%u). Each channel runs an independent decode → process → inference pipeline on the VNPU device.

Device-Side Processing
All processing (decoding, color conversion, resizing, inference) is performed on the VNPU device. The host only receives inference tensor results, minimizing CPU usage and PCIe traffic.

HDMI Video Output (VO Mode)
When use-vnpu-hdmi=true, the VNPU device outputs decoded video directly to HDMI. The channel count for the display grid is automatically determined from the number of connected channels.

Tensor Output
Each channel outputs inference tensors as DXFrameMeta attached to empty GStreamer buffers. Downstream elements like DxPostprocess can process these tensors normally.

Hierarchy

GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstDxVnpuPipeline

Pad Templates

Sink (input) — Request Pads

PropertyValue
Namesink_%u
Formatvideo/x-h264, stream-format=(string)byte-stream, alignment=(string)au
video/x-h265, stream-format=(string)byte-stream, alignment=(string)au

Src (output) — Request Pads

PropertyValue
Namesrc_%u
Formatapplication/x-dxtensor

Properties

NameDescriptionTypeDefault ValueRange
model-pathPath to the .dxnn model file for inference.Stringnull-
inference-idKey for _output_tensors map in DXFrameMeta.Unsigned Integer00 – MAX
keep-ratioMaintain aspect ratio during processor resize.Booleantrue-
use-ortUse ORT runtime for inference.Booleantrue-
device-idVNPU device ID. -1 for auto round-robin.Integer-1-1 – MAX
use-vnpu-hdmiEnable VNPU device HDMI video output (VO mode).Booleanfalse-

Usage Example

Single-channel inference pipeline:

gst-launch-1.0 \
dxvnpupipeline name=vp model-path=yolo26-n_640x640.dxnn inference-id=0 device-id=0 \
filesrc location=input.mp4 ! parsebin ! vp.sink_0 \
vp.src_0 ! dxpostprocess inference-id=0 \
library-file-path=libpostprocess_yolo26od.so function-name=PostProcess ! \
fakesink

Multi-channel with HDMI output and overlay:

gst-launch-1.0 \
dxvnpupipeline name=vp model-path=yolo26-n_640x640.dxnn inference-id=0 \
device-id=0 use-vnpu-hdmi=true \
filesrc location=ch0.mp4 ! parsebin ! vp.sink_0 \
filesrc location=ch1.mp4 ! parsebin ! vp.sink_1 \
vp.src_0 ! queue ! dxpostprocess inference-id=0 \
library-file-path=libpostprocess_yolo26od.so function-name=PostProcess ! \
dxvnpuoverlay model-path=yolo26-n_640x640.dxnn device-id=0 ! fakesink \
vp.src_1 ! queue ! dxpostprocess inference-id=0 \
library-file-path=libpostprocess_yolo26od.so function-name=PostProcess ! \
dxvnpuoverlay model-path=yolo26-n_640x640.dxnn device-id=0 ! fakesink
NOTE
  • The element accepts bitstream input only (H.264/H.265). For raw video input, use DxVnpuDec + DxInfer instead.
  • Output buffers contain only metadata (no video frames). Video is displayed via device HDMI when use-vnpu-hdmi=true.
  • Downstream of DxVnpuPipeline, use DxPostprocess for tensor parsing and DxVnpuOverlay for HDMI bbox rendering.