# mfh265enc

This element encodes raw video into H265 (HEVC) compressed data.

## Example pipelines

     gst-launch-1.0 -v videotestsrc ! mfh265enc ! h265parse ! qtmux ! filesink location=videotestsrc.mp4

This example pipeline will encode a test video source to H265 using Media Foundation encoder, and muxes it in a mp4 container.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──GstMFVideoEnc
                            ╰──mfh265enc

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Seungha Yang

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

Rank – secondary

Plugin – mediafoundation

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw:
              width: [ 64, 8192 ]
             height: [ 64, 8192 ]
             format: { NV12, P010_10LE }

    video/x-raw(memory:D3D11Memory):
              width: [ 64, 8192 ]
             height: [ 64, 8192 ]
             format: { NV12, P010_10LE }

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-h265:
      stream-format: byte-stream
          alignment: au
            profile: { (string)main, (string)main-10 }
              width: [ 64, 8192 ]
             height: [ 64, 8192 ]

Presence – always

Direction – src

Object type – GstPad

## Properties

### adapter-luid

    “adapter-luid” gint64

DXGI Adapter LUID for this elemenet

Flags : Read

Default value : 86670

### bframes

    “bframes” guint

The maximum number of consecutive B frames

Flags : Read / Write

Default value : 0

### bitrate

    “bitrate” guint

Bitrate in kbit/sec

Flags : Read / Write

Default value : 2048

### d3d11-aware

    “d3d11-aware” gboolean

Whether element supports Direct3D11 texture as an input or not

Flags : Read

Default value : true

### gop-size

    “gop-size” gint

The number of pictures from one GOP header to the next. Depending on GPU vendor implementation, zero gop-size might produce only one keyframe at the beginning (-1 for automatic)

Flags : Read / Write

Default value : -1

### low-latency

    “low-latency” gboolean

Enable low latency encoding

Flags : Read / Write

Default value : false

### max-bitrate

    “max-bitrate” guint

The maximum bitrate applied when rc-mode is "pcvbr" in kbit/sec (0 = MFT default)

Flags : Read / Write

Default value : 0

### qp

    “qp” guint

QP applied when rc-mode is "qvbr"

Flags : Read / Write

Default value : 24

### qp-b

    “qp-b” guint

QP applied to B frames

Flags : Read / Write

Default value : 26

### qp-i

    “qp-i” guint

QP applied to I frames

Flags : Read / Write

Default value : 26

### qp-p

    “qp-p” guint

QP applied to P frames

Flags : Read / Write

Default value : 26

### quality-vs-speed

    “quality-vs-speed” guint

Quality and speed tradeoff, [0, 33]: Low complexity, [34, 66]: Medium complexity, [67, 100]: High complexity

Flags : Read / Write

Default value : 50

### rc-mode

    “rc-mode” Mfh265enc-rcmode *

Rate Control Mode

Flags : Read / Write

Default value : cbr (0)

### vbv-buffer-size

    “vbv-buffer-size” guint

VBV(HRD) Buffer Size in bytes (0 = MFT default)

Flags : Read / Write

Default value : 0

## Named constants

### Mfh265enc-rcmode

#### Members

`cbr` (0) – Constant bitrate
`qvbr` (1) – Quality-based variable bitrate

The results of the search are