NVIDIA Tegra
NVIDIA DeepStream Plugin Manual

Application Note
4.0.2 Release


 
Gst-nvvideo4linux2
 
Decoder
Inputs and Outputs
Features
Gst Properties
Encoder
Inputs and Outputs
Features
Gst Properties
DeepStream extends the open source V4L2 codec plugins (here called Gst-v4l2) to support hardware-accelerated codecs.
A screenshot of a cell phone Description automatically generated
Decoder
The OSS Gst-nvvideo4linux2 plugin leverages the hardware decoding engines on Jetson and DGPU platforms by interfacing with libv4l2 plugins on those platforms. It supports H.264, H.265, JPEG and MJPEG formats.
The plugin accepts an encoded bitstream & NVDEC h/w engine to decoder the bitstream. The decoded output is in NV12 format.
Note:
When you use the v4l2 decoder use for decoding JPEG images, you must use the open source jpegparse plugin before the decoder to parse encoded JPEG images.
Inputs and Outputs
Inputs
An encoded bitstream. Supported formats are H.264, H.265, JPEG and MJPEG
Control Parameters
gpu-id
num-extra-surfaces
skip-frames
cudadec-memtype
drop-frame-interval
Output
Gst Buffer with decoded output in NV12 format
Features
The following table summarizes the features of the Gst-nvvideo4linux2 decoder plugin.
Features
Feature
Description
Release
Supports H.264 decode
DS 4.0
Supports H.265 decode
DS 4.0
Supports JPEG/MJPEG decode
_
DS 4.0
User-configurable CUDA memory type (Pinned/Device/Unified) for output buffers
DS 4.0
Gst Properties
The following table summarizes the Gst properties of the Gst-nvvideo4linux2 decoder plugin.
Property
Meaning
Type and Range
Example
Notes
Platforms
gpu-id 
Device ID of GPU to use for decoding.
Integer,
0 to 4,294,967,295 
gpu-id=0 
dGPU
num-extra-surfaces 
Number of surfaces in addition to min decode surfaces given by the V4L2 driver.
Integer, 1 to 24
num-decode-surfaces=24
Default: 0
dGPU
Jetson
skip-frames
Type of frames to skip during decoding. Represented internally by enum SkipFrame.
0 (decode_all): decode all frames
1 (decode_non_ref): decode non-ref frames
2 (decode_key): decode key frames
Integer,
0, 1, or 2
skip-frames=0
Default: 0
dGPU
Jetson
drop-frame-interval
Interval to drop the frames, e.g. a value of 5 means the decoder receives every fifth frame, and others are dropped.
Integer,
1 to 30
Default: 0
dGPU
Jetson
cudadec-memtype 
Memory type for CUDA decoder buffers. Represented internally by enum CudaDecMemType.
0 (memtype_device): Device
1 (memtype_pinned): Host Pinned
2 (memtype_unified): Unified
Integer,
0, 1, or 2 
cuda-memory-type=1
Default: 2
dGPU
Encoder
The OSS Gst-nvvideo4linux2 plugin leverages the hardware accelerated encoding engine available on Jetson and dGPU platforms by interfacing with libv4l2 plugins on those platforms. The plugin accepts RAW data in I420 format. It uses the NVENC hardware engine to encode RAW input. Encoded output is elementary bitstream supported formats.
Inputs and Outputs
Inputs
RAW input in I420 format
Control parameters
gpu-id (dGPU only)
profile
bitrate
control-rate
iframeinterval
Output
Gst Buffer with encoded output in H264, H265, VP8 or VP9 format.
Features
The following table summarizes the features of the Gst-nvvideo4linux2 encoder plugin.
Feature
Description
Release
Supports H.264 encode 
— 
DS 4.0 
Supports H.265 encode 
— 
DS 4.0 
Gst Properties
The following table summarizes the Gst properties of the Gst-nvvideo4linux2 encoder plugin.
Property
Meaning
Type and Range
Example
Notes
Platforms
gpu-id 
Device ID of GPU to used.
Integer,
0 to 4,294,967,295 
gpu-id=0 
dGPU
bitrate
Sets bitrate for encoding, in bits/seconds.
Integer,
0 to 4,294,967,295
Default:4000000
dGPU
Jetson
iframeinterval
Encoding intra-frame occurrence frequency.
Unsigned integer,
0 to 4,294,967,295
Default: 30
dGPU
Jetson
Profile
H.264/H.265 encoder profile; represented internally by enum GstV4l2VideoEncProfileType.
For H.264:
0 (GST_V4L2_H264_VIDENC_BASELINE_PROFILE): Baseline
2 (GST_V4L2_H264_VIDENC_MAIN_PROFILE): Main
4 (GST_V4L2_H264_VIDENC_HIGH_PROFILE): High
For H.265:
0 (GST_V4L2_H265_VIDENC_MAIN_PROFILE): Main
1 (GST_V4L2_H265_VIDENC_MAIN10_PROFILE): Main10
Values of enum GstV4l2VideoEncProfileType
Default Baseline
Default: 0
dGPU
Jetson