# nvh264enc

Encode H.264 video streams using NVCODEC API CUDA Mode

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──GstNvEncoder
                            ╰──nvh264enc

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Seungha Yang

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

Rank – primary + 1

Plugin – nvcodec

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw(memory:CUDAMemory):
             format: { NV12, Y444, VUYA, RGBA, RGBx, BGRA, BGRx }
              width: [ 160, 4096 ]
             height: [ 64, 4096 ]
     interlace-mode: progressive

    video/x-raw(memory:D3D12Memory):
             format: { NV12, Y444, VUYA, RGBA, RGBx, BGRA, BGRx }
              width: [ 160, 4096 ]
             height: [ 64, 4096 ]
     interlace-mode: progressive

    video/x-raw(memory:GLMemory):
             format: { NV12, Y444, VUYA, RGBA, RGBx, BGRA, BGRx }
              width: [ 160, 4096 ]
             height: [ 64, 4096 ]
     interlace-mode: progressive
    video/x-raw:
             format: { NV12, Y444, VUYA, RGBA, RGBx, BGRA, BGRx }
              width: [ 160, 4096 ]
             height: [ 64, 4096 ]
     interlace-mode: progressive

Presence – always

Direction – sink

Object type – GstPad

### `src`

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

Presence – always

Direction – src

Object type – GstPad

## Properties

### aq-strength

    “aq-strength” guint

Adaptive Quantization Strength when spatial-aq is enabled from 1 (low) to 15 (aggressive), (0 = autoselect)

Flags : Read / Write

Default value : 0

### aud

    “aud” gboolean

Use AU (Access Unit) delimiter

Flags : Read / Write

Default value : true

### b-adapt

    “b-adapt” gboolean

Enable adaptive B-frame insert when lookahead is enabled

Flags : Read / Write

Default value : false

### bframes

    “bframes” guint

Number of B-frames between I and P

Flags : Read / Write

Default value : 0

### bitrate

    “bitrate” guint

Bitrate in kbit/sec (0 = automatic)

Flags : Read / Write

Default value : 0

### cabac

    “cabac” gboolean

Enable CABAC entropy coding

Flags : Read / Write

Default value : true

### const-quality

    “const-quality” gdouble

Target Constant Quality level for VBR mode (0 = automatic)

Flags : Read / Write

Default value : 0

### cuda-device-id

    “cuda-device-id” guint

CUDA device ID of associated GPU

Flags : Read

Default value : 0

### gop-size

    “gop-size” gint

Number of frames between intra frames (-1 = infinite)

Flags : Read / Write

Default value : 75

### i-adapt

    “i-adapt” gboolean

Enable adaptive I-frame insert when lookahead is enabled

Flags : Read / Write

Default value : false

### max-bitrate

    “max-bitrate” guint

Maximum Bitrate in kbit/sec (ignored in CBR mode)

Flags : Read / Write

Default value : 0

### multi-pass

    “multi-pass” GstNvEncoderMultiPass *

Multi pass encoding

Flags : Read / Write

Default value : default (0)

### nonref-p

    “nonref-p” gboolean

Automatic insertion of non-reference P-frames

Flags : Read / Write

Default value : false

### preset

    “preset” GstNvEncoderPreset *

Encoding Preset

Flags : Read / Write

Default value : default (0)

### qp-const

    “qp-const” gint

DEPRECATED, use qp-const-{i,p,b} properties instead

Flags : Read / Write

Default value : -1

### qp-const-b

    “qp-const-b” gint

Constant QP value for B frame (-1 = default)

Flags : Read / Write

Default value : -1

### qp-const-i

    “qp-const-i” gint

Constant QP value for I frame (-1 = default)

Flags : Read / Write

Default value : -1

### qp-const-p

    “qp-const-p” gint

Constant QP value for P frame (-1 = default)

Flags : Read / Write

Default value : -1

### qp-max

    “qp-max” gint

DEPRECATED, Use qp-max-{i,p,b} properties instead

Flags : Read / Write

Default value : -1

### qp-max-b

    “qp-max-b” gint

Maximum QP value for B frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### qp-max-i

    “qp-max-i” gint

Maximum QP value for I frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### qp-max-p

    “qp-max-p” gint

Maximum QP value for P frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### qp-min

    “qp-min” gint

DEPRECATED, Use qp-min-{i,p,b} properties instead

Flags : Read / Write

Default value : -1

### qp-min-b

    “qp-min-b” gint

Minimum QP value for B frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### qp-min-i

    “qp-min-i” gint

Minimum QP value for I frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### qp-min-p

    “qp-min-p” gint

Minimum QP value for P frame, (-1 = automatic)

Flags : Read / Write

Default value : -1

### rc-lookahead

    “rc-lookahead” guint

Number of frames for frame type lookahead

Flags : Read / Write

Default value : 0

### rc-mode

    “rc-mode” GstNvEncoderRCMode *

Rate Control Mode

Flags : Read / Write

Default value : default (0)

### repeat-sequence-header

    “repeat-sequence-header” gboolean

Insert sequence headers (SPS/PPS) per IDR

Flags : Read / Write

Default value : false

### spatial-aq

    “spatial-aq” gboolean

Spatial Adaptive Quantization

Flags : Read / Write

Default value : false

### strict-gop

    “strict-gop” gboolean

Minimize GOP-to-GOP rate fluctuations

Flags : Read / Write

Default value : false

### temporal-aq

    “temporal-aq” gboolean

Temporal Adaptive Quantization

Flags : Read / Write

Default value : false

### tune

    “tune” GstNvEncoderTune *

Encoding tune

Flags : Read / Write

Default value : default (0)

### vbv-buffer-size

    “vbv-buffer-size” guint

VBV(HRD) Buffer Size in kbits (0 = NVENC default)

Flags : Read / Write

Default value : 0

### weighted-pred

    “weighted-pred” gboolean

Enables Weighted Prediction

Flags : Read / Write

Default value : false

### zerolatency

    “zerolatency” gboolean

Zero latency operation (no reordering delay)

Flags : Read / Write

Default value : false

The results of the search are