.. _DS_plugin_nvvideo4linux2: Gst-nvvideo4linux2 =================== DeepStream extends the open source V4L2 codec plugins (here called ``Gst-v4l2``) to support hardware-accelerated codecs. .. image:: /content/DS_plugin_gst-nvvideo4linux2.png :align: center :alt: Gst-nvvideo4linux2 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 and uses the NVDEC hardware engine to decode the bitstream. The decoded output can be NV12 or YUV444 format which depends on the encoded stream content. .. note:: When you use the v4l2 decoder 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 * H264 encoded bitstream in 8bit 4:2:0 format. * H265 encoded bitstream in 8/10/12 bit 4:2:0 and 8/10/12 bit 4:4:4 format. * Control Parameters * gpu-id * num-extra-surfaces * skip-frames * cudadec-memtype * drop-frame-interval * low-latency-mode * Output * H264 decoder outputs GstBuffer in 8bit semi-planar(NV12) 4:2:0 format. * H265 decoder outputs GstBuffer in 8/10/12 bit semi-planar(NV12) 4:2:0 format, 8/10/12 bit planar(YUV444) 4:4:4 format. Features ~~~~~~~~~~ The following table summarizes the features of the Gst-nvvideo4linux2 decoder plugin. .. csv-table:: Gst-nvvideo4linux2 plugin decoder features :file: ../text/tables/Gst-nvvideo4linux2 tables/DS_Plugin_gst-nvvideo4linux2_decoder_features.csv :widths: 30, 30 :header-rows: 1 .. note:: * 10/12bit YUV444 format support is applicable only for x86/dGPU platforms. * Also, for 12bit NV12 format, the output caps shows I420_12LE. But the data is handled as semiplanar 12 bit data. This is a workaround since gstreamer v1.16 does not have the particular caps for 12 bit NV12. Downstream component should process it considering as 12bit NV12 only. Gst Properties ~~~~~~~~~~~~~~~ The following table summarizes the Gst properties of the Gst-nvvideo4linux2 decoder plugin. .. csv-table:: Gst-nvvideo4linux2 plugin decoder gst properties :file: ../text/tables/Gst-nvvideo4linux2 tables/DS_Plugin_gst-nvvideo4linux2_decoder_gst-properties.csv :widths: 20, 20, 20, 20, 20 :header-rows: 1 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/NV12 or YUV444 format. It uses the NVENC hardware engine to encode RAW input. Encoded output is in elementary bitstream supported format. To set appropriate tuning-info-id and preset-id properties please refer to Nvidia Video Codec SDK Documentation at https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/index.html Inputs and Outputs ~~~~~~~~~~~~~~~~~~~~ * Inputs * RAW input in I420/NV12 or YUV444 format * 8 bit I420/NV12 and YUV444 raw formats * 8/10 bit I420/NV12 and YUV444 raw formats * Control parameters * gpu-id (dGPU only) * profile * bitrate * control-rate * iframeinterval * preset-id * tuning-info-id * copy-meta * Output * Gst Buffer with encoded output in H264 and H265 format. Features ~~~~~~~~~ The following table summarizes the features of the Gst-nvvideo4linux2 encoder plugin. .. csv-table:: Gst-nvvideo4linux2 plugin encoder features :file: ../text/tables/Gst-nvvideo4linux2 tables/DS_Plugin_gst-nvvideo4linux2_encoder_features.csv :widths: 30, 30 :header-rows: 1 .. note:: * 8/10bit YUV444 format support is applicable only for x86/dGPU platforms. Gst Properties ~~~~~~~~~~~~~~~ The following table summarizes the Gst properties of the Gst-nvvideo4linux2 encoder plugin. .. csv-table:: Gst-nvvideo4linux2 plugin encoder gst properties :file: ../text/tables/Gst-nvvideo4linux2 tables/DS_Plugin_gst-nvvideo4linux2_encoder_gst-properties.csv :widths: 20, 20, 20, 20, 20 :header-rows: 1