Interface IVideoEncoder
Represents an interface for video encoders, providing properties specific to video encoding such as frame rate, resolution, and pixel format. Inherits from IEncoderContext for general encoding options.
Inherited Members
Namespace: FFmpeg.Codecs
Assembly: FFmpeg.dll
Syntax
public interface IVideoEncoder : IEncoderContext, IDisposable, IOptionQueryable
Properties
View SourceFrameRate
Gets or sets the frame rate (in frames per second) of the video being encoded.
This property signals the constant frame rate (CFR) content to the encoder.
Declaration
Rational FrameRate { get; set; }
Property Value
| Type | Description |
|---|---|
| Rational |
GOPSize
Gets or sets the group of pictures (GOP) size, which defines the number of pictures between keyframes.
A value of 0 indicates intra-only encoding (every frame is a keyframe). This property must be set by the user for encoding.
Declaration
int GOPSize { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Height
Gets or sets the height of the video frame in pixels.
The height (and width) must be set by the user before encoding.
Declaration
int Height { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Pass1StatsOutput
Gets the pass1 encoding statistics output buffer as a read-only span of bytes. This buffer contains encoding statistics collected during the first pass of encoding.
This property is set by libavcodec and cannot be modified by the user.
Declaration
ReadOnlySpan<byte> Pass1StatsOutput { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlySpan<byte> |
Pass2StatsInput
Gets or sets the pass2 encoding statistics input buffer as a read-only span of bytes. This buffer should contain the concatenated statistics from the pass1 output, used for the second pass of encoding.
This property can be set by the user for pass2 encoding.
Declaration
ReadOnlySpan<byte> Pass2StatsInput { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlySpan<byte> |
PixelFormat
Gets or sets the pixel format of the video being encoded.
The pixel format must be set by the user to define how pixels are represented (e.g., YUV, RGB).
Declaration
PixelFormat PixelFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| PixelFormat |
ThreadCount
Gets or sets the number of threads to be used during encoding.
This property defines how many independent tasks should be passed to the encoder to execute in parallel. It must be set by the user for encoding.
Declaration
int ThreadCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Width
Gets or sets the width of the video frame in pixels.
The width (and height) must be set by the user before encoding.
Declaration
int Width { get; set; }
Property Value
| Type | Description |
|---|---|
| int |