Class MFVideoEncoderSettings
Media Foundation encoders settings.
Inherited Members
Namespace: VisioForge.Core.Types.Output
Assembly: VisioForge.Core.dll
Syntax
public class MFVideoEncoderSettings
Constructors
MFVideoEncoderSettings()
Initializes a new instance of the MFVideoEncoderSettings class.
Declaration
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.
Declaration
public int AvgBitrate { get; set; }
Property Value
Type | Description |
---|---|
int |
CABAC
Gets or sets a value indicating whether CABAC (context-adaptive binary arithmetic coding) for H.264 entropy coding is enabled.
Declaration
public bool CABAC { get; set; }
Property Value
Type | Description |
---|---|
bool |
Codec
Gets or sets codec.
Declaration
public MFVideoEncoder Codec { get; set; }
Property Value
Type | Description |
---|---|
MFVideoEncoder |
CustomAspectRatioX
Gets or sets custom aspect ratio X.
Declaration
public int CustomAspectRatioX { get; set; }
Property Value
Type | Description |
---|---|
int |
CustomAspectRatioY
Gets or sets custom aspect ratio Y.
Declaration
public int CustomAspectRatioY { get; set; }
Property Value
Type | Description |
---|---|
int |
CustomVideoFrameRate
Gets or sets the custom video frame rate.
Declaration
public VideoFrameRate CustomVideoFrameRate { get; set; }
Property Value
Type | Description |
---|---|
VideoFrameRate | The custom video frame rate. |
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.
Declaration
public int DefaultBPictureCount { get; set; }
Property Value
Type | Description |
---|---|
int |
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].
Declaration
public MFH264QP FrameTypeQP { get; set; }
Property Value
Type | Description |
---|---|
MFH264QP |
InterlaceMode
Gets or sets interlace mode. Not available for Intel QSV and Nvidia NVENC encoders.
Declaration
public MFVideoInterlaceMode InterlaceMode { get; set; }
Property Value
Type | Description |
---|---|
MFVideoInterlaceMode |
Level
Gets or sets video level.
Declaration
public MFH264Level Level { get; set; }
Property Value
Type | Description |
---|---|
MFH264Level |
LowLatencyMode
Gets or sets a value indicating whether latency mode enabled.
Declaration
public bool LowLatencyMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
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.
Declaration
public int MPVGOPSize { get; set; }
Property Value
Type | Description |
---|---|
int |
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.
Declaration
public int MaxBitrate { get; set; }
Property Value
Type | Description |
---|---|
int |
MaxKeyFrameSpacing
Gets or sets max key frame spacing.
Declaration
public int MaxKeyFrameSpacing { get; set; }
Property Value
Type | Description |
---|---|
int |
MaxNumRefFrame
Gets or sets the maximum reference frames supported by the encoder. Default is 2, range is [0, 16].
Declaration
public int MaxNumRefFrame { get; set; }
Property Value
Type | Description |
---|---|
int |
MaxQP
Gets or sets the maximum QP supported by the encoder. Default is 51, range is [0, 51].
Declaration
public int MaxQP { get; set; }
Property Value
Type | Description |
---|---|
int |
MinQP
Gets or sets the minimum quantization parameter(QP) for video encoding in variable-QP mode. Default is 0, range is [0, 51].
Declaration
public int MinQP { get; set; }
Property Value
Type | Description |
---|---|
int |
Profile
Gets or sets video profile.
Declaration
public MFH264Profile Profile { get; set; }
Property Value
Type | Description |
---|---|
MFH264Profile |
QP
Gets or sets the quantization parameter (QP) for video encoding.
Declaration
public MFH264QP QP { get; set; }
Property Value
Type | Description |
---|---|
MFH264QP |
QPUsed
Gets or sets a value indicating whether QP is enabled.
Declaration
public bool QPUsed { get; set; }
Property Value
Type | Description |
---|---|
bool |
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].
Declaration
public int Quality { get; set; }
Property Value
Type | Description |
---|---|
int |
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].
Declaration
public int QualityVsSpeed { get; set; }
Property Value
Type | Description |
---|---|
int |
RateControl
Gets or sets rate control.
Declaration
public MFCommonRateControlMode RateControl { get; set; }
Property Value
Type | Description |
---|---|
MFCommonRateControlMode |
Video_Crop
Gets or sets video crop settings.
Declaration
public VideoCropSettings Video_Crop { get; set; }
Property Value
Type | Description |
---|---|
VideoCropSettings |
Video_Resize
Gets or sets video resize settings.
Declaration
public VideoResizeSettings Video_Resize { get; set; }
Property Value
Type | Description |
---|---|
VideoResizeSettings |
Methods
Load(string)
Loads from JSON.
Declaration
public static MFVideoEncoderSettings Load(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | JSON string. |
Returns
Type | Description |
---|---|
MFVideoEncoderSettings | The string. |
Save()
Saves to JSON.
Declaration
public string Save()
Returns
Type | Description |
---|---|
string | The string. |