Table of Contents

Class NVENCBaseEncoderSettings

Namespace
VisioForge.Core.Types.X.VideoEncoders
Assembly
VisioForge.Core.dll

NVENC base encoder settings. Do not use it directly.

public class NVENCBaseEncoderSettings

Inheritance

Derived

Inherited Members

Properties

AQStrength

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

public uint AQStrength { get; set; }

Property Value

uint

Bitrate

Gets or sets the bitrate (kbit/s) (0 = from NVENC preset).

public uint Bitrate { get; set; }

Property Value

uint

ConstQuality

Gets or sets the target constant quality level for VBR mode (0 = automatic).

public double ConstQuality { get; set; }

Property Value

double

EmitFrameStatistics

Gets or sets a value indicating whether the encoder reports per-frame statistics through VisioForge.Core.Types.X.VideoEncoders.NVENCBaseEncoderSettings.FrameStatistics. Disabled by default.

public bool EmitFrameStatistics { get; set; }

Property Value

bool

Remarks

H.264, HEVC and AV1 NVENC encoders. Requires an NVIDIA GPU with NVENC support and a GStreamer NVENC plugin (nvcodec) built from 1.28 or newer; on older runtimes the underlying element has no such option, so no statistics are reported and the discarded setting is logged as a warning.

Reported by the blocks that own the encoder element - the video encoder blocks, the file and streaming output blocks built on them, and VideoCaptureCoreX. Two paths do not report statistics: the RTSP server output and the VideoEditCoreX render path (the editing pipeline).

Enabling this adds a native signal emission per encoded frame. Enabling it without a VisioForge.Core.Types.X.VideoEncoders.NVENCBaseEncoderSettings.FrameStatistics subscriber only costs that emission.

GOPSize

Gets or sets the number of frames between intra frames (-1 = infinite).

public int GOPSize { get; set; }

Property Value

int

IAdaptive

Gets or sets a value indicating whether adaptive I-frame insert when lookahead is enabled.

public bool IAdaptive { get; set; }

Property Value

bool

MaxBitrate

Gets or sets the maximum bitrate (Kbit/s). Ignored for CBR mode.

public uint MaxBitrate { get; set; }

Property Value

uint

NonRefP

Gets or sets a value indicating whether automatic insertion of non-reference P-frames is enabled.

public bool NonRefP { get; set; }

Property Value

bool

Preset

Gets or sets the preset.

public NVENCPreset Preset { get; set; }

Property Value

NVENCPreset

QPConst

Gets or sets the constant quantizer (-1 = from NVENC preset).

public int QPConst { get; set; }

Property Value

int

QPConstB

Gets or sets the constant QP value for B frame, When >= 0, "QPConstI" and "QPConstP" should be also >= 0. Overwritten by "QPConst" (-1 = from NVENC preset).

public int QPConstB { get; set; }

Property Value

int

QPConstI

Gets or sets the constant QP value for I frame, When >= 0, "QPConstP" and "QPConstB" should be also >= 0. Overwritten by "QPConst" (-1 = from NVENC preset).

public int QPConstI { get; set; }

Property Value

int

QPConstP

Gets or sets the constant QP value for P frame, When >= 0, "QPConstI" and "QPConstB" should be also >= 0. Overwritten by "QPConst" (-1 = from NVENC preset).

public int QPConstP { get; set; }

Property Value

int

QPMax

Gets or sets the maximum quantizer (-1 = from NVENC preset).

public int QPMax { get; set; }

Property Value

int

QPMaxB

Gets or sets the Maximum QP value for B frame, When >= 0, "QPMaxI" and "QPMaxP" should be also >= 0. Overwritten by "QPMax" (-1 = from NVENC preset).

public int QPMaxB { get; set; }

Property Value

int

QPMaxI

Gets or sets the maximum QP value for I frame, When >= 0, "QPMaxP" and "QPMaxB" should be also >= 0. Overwritten by "QPMax" (-1 = from NVENC preset).

public int QPMaxI { get; set; }

Property Value

int

QPMaxP

Gets or sets the maximum QP value for P frame, When >= 0, "QPMaxI" and "QPMaxB" should be also >= 0. Overwritten by "QPMax" (-1 = from NVENC preset).

public int QPMaxP { get; set; }

Property Value

int

QPMin

Gets or sets the minimum quantizer (-1 = from NVENC preset).

public int QPMin { get; set; }

Property Value

int

QPMinB

Gets or sets the minimum QP value for B frame, When >= 0, "QPMinI" and "QPMinP" should be also >= 0. Overwritten by "QPMin" (-1 = from NVENC preset).

public int QPMinB { get; set; }

Property Value

int

QPMinI

Gets or sets the minimum QP value for I frame, When >= 0, "QPMinP" and "QPMinB" should be also >= 0. Overwritten by "QPMin" (-1 = from NVENC preset).

public int QPMinI { get; set; }

Property Value

int

QPMinP

Gets or sets the minimum QP value for P frame, When >= 0, "QPMinI" and "QPMinB" should be also >= 0. Overwritten by "QPMin" (-1 = from NVENC preset).

public int QPMinP { get; set; }

Property Value

int

RateControl

Gets or sets the rate control.

public NVENCRateControl RateControl { get; set; }

Property Value

NVENCRateControl

SpatialAQ

Gets or sets a value indicating whether Spatial Adaptive Quantization is enabled.

public bool SpatialAQ { get; set; }

Property Value

bool

StrictGOP

Gets or sets a value indicating whether strict GOP is enabled. If true - minimize GOP-to-GOP rate fluctuations.

public bool StrictGOP { get; set; }

Property Value

bool

ZeroLatency

Gets or sets a value indicating whether zero latency mode is enabled.

public bool ZeroLatency { get; set; }

Property Value

bool

Methods

GetPresetList()

Gets the preset list.

public static IEnumerable<string> GetPresetList()

Returns

IEnumerable<string>

IEnumerable<System.String>.

GetRateControlList()

Gets the rate control list.

public static IEnumerable<string> GetRateControlList()

Returns

IEnumerable<string>

IEnumerable<System.String>.

FrameStatistics

Occurs once per encoded frame when VisioForge.Core.Types.X.VideoEncoders.NVENCBaseEncoderSettings.EmitFrameStatistics is enabled.

public event EventHandler<NVENCEncoderFrameStatisticsEventArgs> FrameStatistics

Event Type

EventHandler<NVENCEncoderFrameStatisticsEventArgs>

Remarks

H.264, HEVC and AV1 NVENC encoders. The event carries the values copied out of the native structure, so the payload can be read and stored by the handler. The quantization parameter is on the encoder's own scale - 0-51 for H.264 and HEVC, 0-255 for AV1 - and lower means higher quality.

Reported by the blocks that own the encoder element - the video encoder blocks, the file and streaming output blocks built on them, and VideoCaptureCoreX. Two paths do not report statistics: the RTSP server output and the VideoEditCoreX render path (the editing pipeline).

Raised on a native GStreamer encoder thread, synchronously with encoding - not on the thread that started the pipeline. A handler blocks encoding for its duration, so keep it short, and do not call Stop or Dispose from it. An exception thrown by a handler is logged and contained; it does not stop the encoder.

The subscription ends when the encoder is stopped and disposed.