# vaapih265enc

Encodes raw video streams into HEVC bitstreams.

## Example launch line

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

## Hierarchy

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

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Sreerenj Balachandran

Classification: – `Codec/Encoder/Video/Hardware`

Rank – primary

Plugin – vaapi

Package – gstreamer-vaapi

## Pad Templates

### `sink`

    video/x-raw(memory:VASurface):
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: progressive
    video/x-raw:
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: progressive

    video/x-raw(memory:DMABuf):
             format: { ENCODED, NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y212_LE, Y412_LE, ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: progressive

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-h265:
      stream-format: { (string)hvc1, (string)byte-stream }
          alignment: au

Presence – always

Direction – src

Object type – GstPad

## Properties

### bitrate

    “bitrate” guint

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

Flags : Read / Write

Default value : 0

### cpb-length

    “cpb-length” guint

Length of the CPB buffer in milliseconds

Flags : Read / Write

Default value : 1500

### default-roi-delta-qp

    “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

Default value : -10

### init-qp

    “init-qp” guint

Initial quantizer value

Flags : Read / Write

Default value : 26

### keyframe-period

    “keyframe-period” guint

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

Flags : Read / Write

Default value : 30

### low-delay-b

    “low-delay-b” gboolean

Transforms P frames into predictive B frames. Enable it when P frames are not supported.

Flags : Read / Write

Default value : false

### max-bframes

    “max-bframes” guint

Number of B-frames between I and P

Flags : Read / Write

Default value : 0

### max-qp

    “max-qp” guint

Maximum quantizer value

Flags : Read / Write

Default value : 51

### mbbrc

    “mbbrc” GstVaapiEncoderMbbrc *

Macroblock level Bitrate Control

Flags : Read / Write

Default value : auto (0)

### min-qp

    “min-qp” guint

Minimum quantizer value

Flags : Read / Write

Default value : 1

### num-slices

    “num-slices” guint

Number of slices per frame

Flags : Read / Write

Default value : 1

### num-tile-cols

    “num-tile-cols” guint

the number of columns for tile encoding

Flags : Read / Write

Default value : 1

### num-tile-rows

    “num-tile-rows” guint

the number of rows for tile encoding

Flags : Read / Write

Default value : 1

### qp-ib

    “qp-ib” gint

Difference of QP between I and B frame (available only on CQP)

Flags : Read / Write

Default value : 0

### qp-ip

    “qp-ip” gint

Difference of QP between I and P frame (available only on CQP)

Flags : Read / Write

Default value : 0

### quality-factor

    “quality-factor” guint

quality factor for ICQ/QBVR bitrate control mode (lower value means higher quality, higher value means lower quality)

Flags : Read / Write

Default value : 26

### quality-level

    “quality-level” guint

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

Flags : Read / Write

Default value : 4

### rate-control

    “rate-control” Vaapi-rate-control-h265 *

Rate control mode

Flags : Read / Write

Default value : cqp (1)

### refs

    “refs” guint

Number of reference frames

Flags : Read / Write

Default value : 1

### target-percentage

    “target-percentage” guint

The desired target percentage of bitrate for variable rate controls.

Flags : Read / Write

Default value : 70

### trellis

    “trellis” gboolean

The Trellis Quantization Method of Encoder

Flags : Read / Write

Default value : false

### tune

    “tune” Vaapi-encoder-tune-h265 *

Encoder tuning option

Flags : Read / Write

Default value : none (0)

## Named constants

### GstVaapiEncoderMbbrc

#### Members

`auto` (0) – Auto
`on` (1) – On
`off` (2) – Off

### Vaapi-encoder-tune-h265

#### Members

`none` (0) – None
`low-power` (3) – Low power mode

### Vaapi-rate-control-h265

#### Members

`cqp` (1) – Constant QP
`cbr` (2) – Constant bitrate
`vbr` (4) – Variable bitrate
`icq` (7) – Constant QP - Intelligent
`qvbr` (8) – Variable bitrate - Quality defined

The results of the search are