## vaapimpeg2enc

vaapimpeg2enc — A VA-API based MPEG2 video encoder

## Properties

guint | bitrate | Read / Write
gint | default-roi-delta-qp | Read / Write
guint | keyframe-period | Read / Write
guint | max-bframes | Read / Write
guint | quality-level | Read / Write
guint | quantizer | Read / Write
GstVaapiRateControlMPEG2 | rate-control | Read / Write
GstVaapiEncoderTuneMPEG2 | tune | Read / Write

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstVideoEncoder
                        ╰── GstVaapiEncode
                            ╰── GstVaapiEncodeMpeg2

## Description

Encodes raw video streams into MPEG2 bitstreams.

### Example launch line

    1

    gst-launch-1.0 -ev videotestsrc num-buffers=60 ! timeoverlay ! vaapimpeg2enc ! matroskamux ! filesink location=test.mkv

## Synopsis

### Element Information

plugin | vaapi
author | Guangxin Xu <guangxin.xu@intel.com>
class | Codec/Encoder/Video

### Element Pads

name | sink
direction | sink
presence | always
details | video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive

video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive

name | src
direction | source
presence | always
details | video/mpeg, mpegversion=(int)2, systemstream=(boolean)false

## Functions

## Types and Values

## Property Details

### The `“bitrate”` property

      “bitrate”                  guint

The desired bitrate expressed in kbps (0: auto-calculate).

Flags: Read / Write

Allowed values: <= 102400

Default value: 0

### The `“default-roi-delta-qp”` property

      “default-roi-delta-qp”     gint

The default delta-qp to apply to each Region of Interest(lower value means higher-quality, higher value means lower-quality).

Flags: Read / Write

Allowed values: [-10,10]

Default value: -10

### The `“keyframe-period”` property

      “keyframe-period”          guint

Maximal distance between two keyframes (0: auto-calculate).

Flags: Read / Write

Default value: 30

### The `“max-bframes”` property

      “max-bframes”              guint

Number of B-frames between I and P.

Flags: Read / Write

Allowed values: <= 16

Default value: 0

### The `“quality-level”` property

      “quality-level”            guint

Encoding Quality Level (lower value means higher-quality/slow-encode, higher value means lower-quality/fast-encode).

Flags: Read / Write

Allowed values: [1,7]

Default value: 4

### The `“quantizer”` property

      “quantizer”                guint

Constant quantizer (if rate-control mode is CQP).

Flags: Read / Write

Allowed values: [2,62]

Default value: 8

### The `“rate-control”` property

      “rate-control”             GstVaapiRateControlMPEG2

Rate control mode.

Flags: Read / Write

Default value: Constant QP

### The `“tune”` property

      “tune”                     GstVaapiEncoderTuneMPEG2

Encoder tuning option.

Flags: Read / Write

Default value: None