Knowledge Base > OBS Studio > Advanced NVENC Options (31.0)

Advanced NVENC Options (31.0)

Starting with OBS 31.0 the NVENC implemenation provides additional options for adjusting the NVIDIA encoder settings.

New Properties

Rate Control: Variable Bitrate with Target Quality

New mode behaving similarly to CQP, but with the option to set a maximum bitrate to provide a high quality while limiting file size or stream bitrate.

Tuning: Ultra High Quality

New tuning option optimised for live-action with artifacts such as camera sensor noise. Not recommended for gaming content. Significantly reduces throughput.

Adaptive Quantization

Same as "Psycho-Visual Tuning" but now with the proper nomenclature rather than a confusing marketing term.

B-Frame as Reference (HEVC/AV1 only)

Enables using B-Frames as reference frames, can slightly improve quality with no performance impact. Recommended when using multiple B-Frames.

Split Encode (HEVC/AV1 only)

Requires NVIDIA Ada Generation GPU with two or more NVENC engines (4070 Ti or higher).

Splits frame across multiple NVENC engines to achieve higher throughput with near-linear scaling. Automatically used when using fast presets (p1-p2 in high quality, p1-p4 in low latency modes) with resolutions above 2160p (UHD/4K). Manually forcing it to be used may allow using slower presets such as p7 at higher resolutions while maintaining real-time encoding. Note that at low bitrates there may be a visible seam between the two frame halves.

See NVIDIA's developer blog for more details.

Custom Options

Allow specifying additional low-level encoder properties manually in the form of option=value pairs separated by spaces.

General Options
Option Description

keyint

Note: Not a standard NVENC option.

Keyframe interval in frames, supports special value of 1 for intra-only mode.

frameIntervalP

Specifies the GOP pattern as follows:

  1. I
  2. IPP
  3. IBP
  4. IBBP

If goplength is set to NVENC_INFINITE_GOPLENGTH frameIntervalP should be set to 1.

gopLength

Note: Except for the special case of infinite GOP, keyint should be used instead.

Specifies the number of pictures in one GOP. Low latency application client can set goplength to NVENC_INFINITE_GOPLENGTH (4294967295) so that keyframes are not inserted automatically.

Rate Control Options
Option Description

constQP=<N>/constQP=<I>:<P>:<B>

Specifies the initial QP to be used for encoding, these values would be used for all frames if in Constant QP mode.

minQP=<N>/minQP=<I>:<P>:<B>

Specifies the minimum QP used for rate control. Also requires enableMinQP=1 to be set.

maxQP=<N>/maxQP=<I>:<P>:<B>

Specifies the maximum QP used for rate control. Also requires enableMaxQP=1 to be set.

initialRCQP=<N>/initialRCQP=<I>:<P>:<B>

Specifies the initial QP hint used for rate control. The parameter is just used as hint to influence the QP difference between I,P and B frames. Also requires enableInitialRCQP=1 to be set.

averageBitRate

Specifies the average bitrate(in bits/sec) used for encoding.

maxBitRate

Specifies the maximum bitrate for the encoded output. This is used for VBR and ignored for CBR mode.

vbvBufferSize

Specifies the VBV(HRD) buffer size. in bits. Set 0 to use the default VBV buffer size.

vbvInitialDelay

Specifies the VBV(HRD) initial delay in bits. Set 0 to use the default VBV initial delay.

targetQuality

Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic).

enableLookahead

Set this to 1 to enable lookahead.

disableIadapt

Set this to 1 to disable adaptive I-frame insertion at scene cuts (only has an effect when lookahead is enabled)

disableBadapt

Set this to 1 to disable adaptive B-frame decision (only has an effect when lookahead is enabled)

enableAQ

Set this to 1 to enable adaptive quantization (Spatial).

enableTemporalAQ

Set this to 1 to enable temporal AQ.

aqStrength

When AQ (Spatial) is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive). If not set, strength is auto selected by driver.

lookaheadLevel

Specifies the lookahead level. Higher level may improve quality at the expense of performance.

lookaheadDepth

Maximum depth of lookahead with range 0-(31 - number of B frames).

H.264 Options
Option Description

level

Specifies the encoding level. Client is recommended to set this to NV_ENC_LEVEL_AUTOSELECT (0) in order to enable the NVENC interface to select the correct level.
Can be specified as a decimal number, e.g. 4.2

useBFramesAsRef

Specifies the B-Frame as reference mode.

enableFillerDataInsertion

Set to 1 to enable insertion of filler data in the bitstream. This flag will take effect only when CBR rate control mode is in use

HEVC Options
Options Description

level

Specifies the level of the encoded bitstream.
Can be specified as a decimal number, e.g. 4.2

tier

Specifies the level tier of the encoded bitstream.

useBFramesAsRef

Specifies the B-Frame as reference mode.

tfLevel

Specifies the strength of the temporal filtering.
Temporal filter feature is supported only if frameIntervalP >= 5.
Temporal filter is recommended for natural contents.

enableFillerDataInsertion

Set to 1 to enable insertion of filler data in the bitstream. This flag will take effect only when CBR rate control mode is in use

AV1 Options
Option Description

level

Specifies the level of the encoded bitstream.

tier

Specifies the level tier of the encoded bitstream.

numTileColumns

This parameter specifies the way in which the picture is divided into tile columns.
The picture will be uniformly divided into numTileColumns tile columns. If numTileColumns is not a power of 2, it will be rounded down to the next power of 2 value. If numTileColumns=0, the picture will be coded with the smallest number of vertical tiles as allowed by standard.

Note: A larger amount of tiles can help with decoding speed. By default, OBS sets this to 2 for resolutions of 2160p or above.

numTileRows

This parameter specifies the way in which the picture is divided into tiles rows.

The picture will be uniformly divided into numTileRows tile rows. If numTileRows is not a power of 2, it will be rounded down to the next power of 2 value. If numTileRows=0, the picture will be coded with the smallest number of horizontal tiles as allowed by standard.

Note: A larger amount of tiles can help with decoding speed.

useBFramesAsRef

Specifies the B-Frame as reference mode.

enableBitstreamPadding

Set 1 to enable bitstream padding.

See NVIDIA's documentation for more detailed explanations of various options.