# d3d12h264enc

Direct3D12 H.264 Video Encoder

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──GstD3D12Encoder
                            ╰──d3d12h264enc

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Seungha Yang <seungha></seungha>

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

Rank – none

Plugin – d3d12

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw(memory:D3D12Memory):
             format: NV12
              width: [ 128, 4096 ]
             height: [ 128, 4096 ]
     interlace-mode: progressive
    video/x-raw:
             format: NV12
              width: [ 128, 4096 ]
             height: [ 128, 4096 ]
     interlace-mode: progressive

Presence – always

Direction – sink

Object type – GstPad

### `src`

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

Presence – always

Direction – src

Object type – GstPad

## Properties

### aud

    “aud” gboolean

Use AU delimiter

Flags : Read / Write

Default value : true

### bitrate

    “bitrate” guint

Target bitrate in kbits/second. Used for "cbr", "vbr", and "qvbr" rate control

Flags : Read / Write

Default value : 2000

### cc-insert

    “cc-insert” D3d12encoder-sei-insert-mode *

Closed Caption insert mode

Flags : Read / Write

Default value : insert (0)

### frame-analysis

    “frame-analysis” gboolean

Enable 2 pass encoding if supported by hardware

Flags : Read / Write

Default value : false

### gop-size

    “gop-size” guint

Size of GOP (0 = infinite)

Flags : Read / Write

Default value : 60

### max-bitrate

    “max-bitrate” guint

Peak bitrate in kbits/second. Used for "vbr", and "qvbr" rate control

Flags : Read / Write

Default value : 4000

### qp-b

    “qp-b” guint

Constant QP value for B frames. Used for "cqp" rate control

Flags : Read / Write

Default value : 23

### qp-i

    “qp-i” guint

Constant QP value for I frames. Used for "cqp" rate control

Flags : Read / Write

Default value : 23

### qp-init

    “qp-init” guint

Initial QP value. Used for "cbr", "vbr", and "qvbr" rate control

Flags : Read / Write

Default value : 0

### qp-max

    “qp-max” guint

Maximum QP value for "cbr", "vbr", and "qvbr" rate control. To enable min/max QP setting, "qp-max >= qp-min > 0" condition should be satisfied

Flags : Read / Write

Default value : 0

### qp-min

    “qp-min” guint

Minimum QP value for "cbr", "vbr", and "qvbr" rate control. To enable min/max QP setting, "qp-max >= qp-min > 0" condition should be satisfied

Flags : Read / Write

Default value : 0

### qp-p

    “qp-p” guint

Constant QP value for P frames. Used for "cqp" rate control

Flags : Read / Write

Default value : 23

### qvbr-quality

    “qvbr-quality” guint

Constant quality target value for "qvbr" rate control

Flags : Read / Write

Default value : 23

### rate-control

    “rate-control” D3d12encoder-rate-control *

Rate Control Method

Flags : Read / Write

Default value : vbr (3)

### rate-control-support

    “rate-control-support” D3d12encoder-rate-control-support *

Supported rate control modes

Flags : Read

Default value : (none)

### ref-frames

    “ref-frames” guint

Preferred number of reference frames. Actual number of reference frames can be limited depending on hardware (0 = unspecified)

Flags : Read / Write

Default value : 0

### slice-mode

    “slice-mode” D3d12encoder-subregion-layout *

Slice partiton mode

Flags : Read / Write

Default value : full (0)

### slice-mode-support

    “slice-mode-support” D3d12encoder-subregion-layout-support *

Supported slice partition modes

Flags : Read

Default value : full

### slice-partition

    “slice-partition” guint

Slice partition threshold interpreted depending on "slice-mode". If set zero, full frame encoding will be selected without partitioning regardless of requested "slice-mode"

Flags : Read / Write

Default value : 0

## Named constants

### D3d12encoder-rate-control

#### Members

`cqp` (1) – Constant QP
`cbr` (2) – Constant bitrate
`vbr` (3) – Variable bitrate
`qvbr` (4) – Constant quality variable bitrate

### D3d12encoder-rate-control-support

#### Members

`cqp` (0x00000002) – Constant QP
`cbr` (0x00000004) – Constant bitrate
`vbr` (0x00000008) – Variable bitrate
`qvbr` (0x00000010) – Constant quality variable bitrate

### D3d12encoder-sei-insert-mode

#### Members

`insert` (0) – Insert
`insert-and-drop` (1) – Insert and drop
`disabled` (2) – Disabled

### D3d12encoder-subregion-layout

#### Members

`full` (0) – Full frame without partitioning
`bytes` (1) – Bytes per subregion
`coding-units` (2) – Coding units (e.g., macroblock) per subregion
`rows` (3) – Uniform rows per subregion
`subregions` (4) – Uniform subregions per frame

### D3d12encoder-subregion-layout-support

#### Members

`full` (0x00000001) – Full frame without partitioning
`bytes` (0x00000002) – Bytes per subregion
`coding-units` (0x00000004) – Coding units (e.g., macroblock) per subregion
`rows` (0x00000008) – Uniform rows (in coding-unit) per subregion
`subregions` (0x00000010) – Uniform subregions per frame

The results of the search are