# mfh264enc

This element encodes raw video into H264 compressed data.

## Example pipelines

     gst-launch-1.0 -v videotestsrc ! mfh264enc ! h264parse ! qtmux ! filesink location=videotestsrc.mp4

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

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──GstMFVideoEncoder
                            ╰──mfh264enc

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Seungha Yang <seungha.yang@navercorp.com></seungha.yang@navercorp.com>

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

Rank – secondary

Plugin – mediafoundation

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

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

Presence – always

Direction – sink

Object type – GstPad

### `src`

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

Presence – always

Direction – src

Object type – GstPad

## Properties

### adapter-luid

    “adapter-luid” gint64

DXGI Adapter LUID for this elemenet

Flags : Read

Default value : 0

Since : 1.20

### adaptive-mode

    “adaptive-mode” Mfh264enc-adaptive-mode *

Flags : Read / Write

Default value : none (0)

Since : 1.18

### bframes

    “bframes” guint

Flags : Read / Write

Default value : 0

Since : 1.18

### bitrate

    “bitrate” guint

Bitrate in kbit/sec

Flags : Read / Write

Default value : 2048

### cabac

    “cabac” gboolean

Flags : Read / Write

Default value : true

Since : 1.18

### d3d11-aware

    “d3d11-aware” gboolean

Whether element supports Direct3D11 texture as an input or not

Flags : Read

Default value : true

Since : 1.20

### gop-size

    “gop-size” gint

Flags : Read / Write

Default value : -1

Since : 1.18

### low-latency

    “low-latency” gboolean

Flags : Read / Write

Default value : false

Since : 1.18

### max-bitrate

    “max-bitrate” guint

Flags : Read / Write

Default value : 0

Since : 1.18

### max-qp

    “max-qp” guint

Flags : Read / Write

Default value : 51

Since : 1.18

### min-qp

    “min-qp” guint

Flags : Read / Write

Default value : 0

Since : 1.18

### qp

    “qp” guint

Flags : Read / Write

Default value : 24

Since : 1.18

### qp-b

    “qp-b” guint

Flags : Read / Write

Default value : 26

Since : 1.18

### qp-i

    “qp-i” guint

Flags : Read / Write

Default value : 26

Since : 1.18

### qp-p

    “qp-p” guint

Flags : Read / Write

Default value : 26

Since : 1.18

### quality-vs-speed

    “quality-vs-speed” guint

Flags : Read / Write

Default value : 50

Since : 1.18

### rc-mode

    “rc-mode” Mfh264enc-rcmode *

Flags : Read / Write

Default value : uvbr (2)

Since : 1.18

### ref

    “ref” guint

Flags : Read / Write

Default value : 2

Since : 1.18

### vbv-buffer-size

    “vbv-buffer-size” guint

Flags : Read / Write

Default value : 0

Since : 1.18

## Named constants

### Mfh264enc-adaptive-mode

#### Members

`none` (0) – None
`framerate` (1) – Adaptively change the frame rate

Since : 1.18

### Mfh264enc-rcmode

#### Members

`cbr` (0) – Constant bitrate
`pcvbr` (1) – Peak Constrained variable bitrate
`uvbr` (2) – Unconstrained variable bitrate
`qvbr` (3) – Quality-based variable bitrate

Since : 1.18

The results of the search are