Class MFVideoEncoderSettings
- Namespace
- VisioForge.Core.Types.Output
- Assembly
- VisioForge.Core.dll
Media Foundation encoders settings.
public class MFVideoEncoderSettingsInheritance
Inherited Members
Constructors
MFVideoEncoderSettings()
Initializes a new instance of the VisioForge.Core.Types.Output.MFVideoEncoderSettings class.
public MFVideoEncoderSettings()Properties
AvgBitrate
Gets or sets the average encoded bit rate, in bits per second. This property applies only to constant bit rate (CBR) and variable bit rate (VBR) encoding modes.
public int AvgBitrate { get; set; }Property Value
CABAC
Gets or sets a value indicating whether CABAC (context-adaptive binary arithmetic coding) for H.264 entropy coding is enabled.
public bool CABAC { get; set; }Property Value
Codec
Gets or sets codec.
public MFVideoEncoder Codec { get; set; }Property Value
CustomAspectRatioX
Gets or sets custom aspect ratio X.
public int CustomAspectRatioX { get; set; }Property Value
CustomAspectRatioY
Gets or sets custom aspect ratio Y.
public int CustomAspectRatioY { get; set; }Property Value
CustomVideoFrameRate
Gets or sets the custom video frame rate.
public VideoFrameRate CustomVideoFrameRate { get; set; }Property Value
DefaultBPictureCount
Gets or sets the maximum number of consecutive B frames in the output bitstream. Valid values are: 0: Do not use B frames(default). 1 : Use one B frame. 2 : Use two B frames.
public int DefaultBPictureCount { get; set; }Property Value
FrameTypeQP
Gets or sets the frame types (I, P, or B) that the quantization parameter (QP) is applied to. Range for I, P, B frames is [0, 51].
public MFH264QP FrameTypeQP { get; set; }Property Value
InterlaceMode
Gets or sets interlace mode. Not available for Intel QSV and Nvidia NVENC encoders.
public MFVideoInterlaceMode InterlaceMode { get; set; }Property Value
Level
Gets or sets video level.
public MFH264Level Level { get; set; }Property Value
LowLatencyMode
Gets or sets a value indicating whether latency mode enabled.
public bool LowLatencyMode { get; set; }Property Value
Remarks
Low-latency mode is useful for real-time communications or live capture, when latency should be minimized. However, low-latency mode might also reduce the decoding or encoding quality. The encoder is expected to not add any sample delay due to frame reordering in encoding process, and one input sample shall produce one output sample.B slices / frames can be present as long as they do not introduce any frame re - ordering in the encoder.
MPVGOPSize
Gets or sets the maximum number of pictures from one group-of-pictures (GOP) header to the next GOP header. Default is 50.
public int MPVGOPSize { get; set; }Property Value
MaxBitrate
Gets or sets the maximum bit rate, in bits per second. This property applies only to constant bit rate (CBR) and variable bit rate (VBR) encoding modes.
public int MaxBitrate { get; set; }Property Value
MaxKeyFrameSpacing
Gets or sets max key frame spacing.
public int MaxKeyFrameSpacing { get; set; }Property Value
MaxNumRefFrame
Gets or sets the maximum reference frames supported by the encoder. Default is 2, range is [0, 16].
public int MaxNumRefFrame { get; set; }Property Value
MaxQP
Gets or sets the maximum QP supported by the encoder. Default is 51, range is [0, 51].
public int MaxQP { get; set; }Property Value
MinQP
Gets or sets the minimum quantization parameter(QP) for video encoding in variable-QP mode. Default is 0, range is [0, 51].
public int MinQP { get; set; }Property Value
Profile
Gets or sets video profile.
public MFH264Profile Profile { get; set; }Property Value
QP
Gets or sets the quantization parameter (QP) for video encoding.
public MFH264QP QP { get; set; }Property Value
QPUsed
Gets or sets a value indicating whether QP is enabled.
public bool QPUsed { get; set; }Property Value
Quality
Gets or sets the quality level for encoding. This property controls the quality level when the encoder is not using a constrained bit rate. Default is 65, range is [0, 100].
public int Quality { get; set; }Property Value
QualityVsSpeed
Gets or sets the tradeoff between encoding quality and speed. This property is valid in all rate control modes. Default is 33, range is [0, 100].
public int QualityVsSpeed { get; set; }Property Value
RateControl
Gets or sets rate control.
public MFCommonRateControlMode RateControl { get; set; }Property Value
Video_Crop
Gets or sets video crop settings.
public VideoCropSettings Video_Crop { get; set; }Property Value
Video_Resize
Gets or sets video resize settings.
public VideoResizeSettings Video_Resize { get; set; }Property Value
Methods
Load(string)
Loads from JSON.
public static MFVideoEncoderSettings Load(string json)Parameters
jsonstring-
JSON string.
Returns
Save()
Saves to JSON.
public string Save()