# amfh264enc

amfh264enc element encodes raw video stream into compressed H.264 bitstream via AMD AMF API.

## Example launch line

    gst-launch-1.0 videotestsrc num-buffers=100 ! amfh264enc ! h264parse ! mp4mux ! filesink location=encoded.mp4

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──GstAmfEncoder
                            ╰──amfh264enc

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Seungha Yang

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

Rank – primary

Plugin – amfcodec

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

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

Presence – always

Direction – sink

Object type – GstPad

### `src`

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

Presence – always

Direction – src

Object type – GstPad

## Properties

### adapter-luid

    “adapter-luid” gint64

DXGI Adapter LUID (Locally Unique Identifier) of associated GPU

Flags : Read

Default value : 0

### aud

    “aud” gboolean

Use AU (Access Unit) delimiter

Flags : Read / Write

Default value : true

### bitrate

    “bitrate” guint

Target bitrate in kbit/sec (0: USAGE default)

Flags : Read / Write

Default value : 0

### cabac

    “cabac” gboolean

Enable CABAC entropy coding

Flags : Read / Write

Default value : true

### gop-size

    “gop-size” gint

Number of pictures within a GOP (-1: USAGE default)

Flags : Read / Write

Default value : -1

### max-bitrate

    “max-bitrate” guint

Maximum bitrate in kbit/sec (0: USAGE default)

Flags : Read / Write

Default value : 0

### max-qp

    “max-qp” gint

Maximum allowed QP value (-1: USAGE default)

Flags : Read / Write

Default value : -1

### min-qp

    “min-qp” gint

Minimum allowed QP value (-1: USAGE default)

Flags : Read / Write

Default value : -1

### preset

    “preset” Amf-h264enc-preset *

Preset

Flags : Read / Write

Default value : default (-1)

### qp-i

    “qp-i” guint

Constant QP for I frames

Flags : Read / Write

Default value : 22

### qp-p

    “qp-p” guint

Constant QP for P frames

Flags : Read / Write

Default value : 22

### rate-control

    “rate-control” Amf-h264enc-rate-control *

Rate Control Method

Flags : Read / Write

Default value : default (-1)

### ref-frames

    “ref-frames” guint

Number of reference frames

Flags : Read / Write

Default value : 1

### usage

    “usage” Amf-h264enc-usage *

Target usage

Flags : Read / Write

Default value : transcoding (0)

## Named constants

### Amf-h264enc-preset

Encoding quality presets

#### Members

`default` (-1) – Default, depends on USAGE
`balanced` (0) – Balanced
`speed` (1) – Speed
`quality` (2) – Quality

### Amf-h264enc-rate-control

Rate control methods

#### Members

`default` (-1) – Default, depends on Usage
`cqp` (0) – Constant QP
`cbr` (1) – Constant Bitrate
`vbr` (2) – Peak Constrained VBR
`lcvbr` (3) – Latency Constrained VBR

### Amf-h264enc-usage

Encoder usages

#### Members

`transcoding` (0) – Transcoding
`ultra-low-latency` (1) – Ultra Low Latency
`low-latency` (2) – Low Latency
`webcam` (3) – Webcam

The results of the search are