# 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

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

### adaptive-mode

    “adaptive-mode” Mfh264enc-adaptive-mode *

Flags : Read / Write

Default value : none (0)

### bframes

    “bframes” guint

Flags : Read / Write

Default value : 0

### bitrate

    “bitrate” guint

Bitrate in kbit/sec

Flags : Read / Write

Default value : 2048

### cabac

    “cabac” gboolean

Flags : Read / Write

Default value : true

### 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

Flags : Read / Write

Default value : -1

### low-latency

    “low-latency” gboolean

Flags : Read / Write

Default value : false

### max-bitrate

    “max-bitrate” guint

Flags : Read / Write

Default value : 0

### max-qp

    “max-qp” guint

Flags : Read / Write

Default value : 51

### min-qp

    “min-qp” guint

Flags : Read / Write

Default value : 0

### qp

    “qp” guint

Flags : Read / Write

Default value : 24

### qp-b

    “qp-b” guint

Flags : Read / Write

Default value : 26

### qp-i

    “qp-i” guint

Flags : Read / Write

Default value : 26

### qp-p

    “qp-p” guint

Flags : Read / Write

Default value : 26

### quality-vs-speed

    “quality-vs-speed” guint

Flags : Read / Write

Default value : 50

### rc-mode

    “rc-mode” Mfh264enc-rcmode *

Flags : Read / Write

Default value : uvbr (2)

### ref

    “ref” guint

Flags : Read / Write

Default value : 2

### vbv-buffer-size

    “vbv-buffer-size” guint

Flags : Read / Write

Default value : 0

## Named constants

### Mfh264enc-adaptive-mode

#### Members

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

### Mfh264enc-rcmode

#### Members

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

The results of the search are