Show / Hide Table of Contents

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
IEncoderContext.Codec
IEncoderContext.CodecType
IEncoderContext.CodecID
IEncoderContext.CodecTag
IEncoderContext.BitRate
IEncoderContext.Flags
IEncoderContext.TimeBase
IDisposable.Dispose()
IOptionQueryable.FindOption(string, bool)
IOptionQueryable.ResetOptions()
IOptionQueryable.GetOptions(bool)
IOptionQueryable.SetOption(Option, (int Width, int Height), bool)
IOptionQueryable.SetOption(Option, PixelFormat, bool)
IOptionQueryable.SetOption(Option, SampleFormat, bool)
IOptionQueryable.SetOption(Option, bool, bool)
IOptionQueryable.SetOption(Option, double, bool)
IOptionQueryable.SetOption(Option, IDictionary<string, string>, bool)
IOptionQueryable.SetOption(Option, ILookup<string, string>, bool)
IOptionQueryable.SetOption(Option, int, int, bool)
IOptionQueryable.SetOption(Option, long, bool)
IOptionQueryable.SetOption(Option, object, bool)
IOptionQueryable.SetOption(Option, Rational, bool)
IOptionQueryable.SetOption(Option, ReadOnlyMemory<byte>, bool)
IOptionQueryable.SetOption(Option, ReadOnlySpan<byte>, bool)
IOptionQueryable.SetOption(Option, string, bool)
IOptionQueryable.SetOption(IDictionary<string, string>, bool)
IOptionQueryable.SetOption(string, (int Width, int Height), bool)
IOptionQueryable.SetOption(string, PixelFormat, bool)
IOptionQueryable.SetOption(string, SampleFormat, bool)
IOptionQueryable.SetOption(string, bool, bool)
IOptionQueryable.SetOption(string, double, bool)
IOptionQueryable.SetOption(string, IDictionary<string, string>, bool)
IOptionQueryable.SetOption(string, ILookup<string, string>, bool)
IOptionQueryable.SetOption(string, int, int, bool)
IOptionQueryable.SetOption(string, long, bool)
IOptionQueryable.SetOption(string, object, bool)
IOptionQueryable.SetOption(string, Rational, bool)
IOptionQueryable.SetOption(string, ReadOnlyMemory<byte>, bool)
IOptionQueryable.SetOption(string, ReadOnlySpan<byte>, bool)
IOptionQueryable.SetOption(string, ref ILookup<string, string>, bool)
IOptionQueryable.SetOption(string, string, bool)
IOptionQueryable.TryGetOption(Option, out (int Width, int Height), bool)
IOptionQueryable.TryGetOption(Option, out AVDictionary, bool)
IOptionQueryable.TryGetOption(Option, out AVMultiDictionary, bool)
IOptionQueryable.TryGetOption(Option, out PixelFormat, bool)
IOptionQueryable.TryGetOption(Option, out SampleFormat, bool)
IOptionQueryable.TryGetOption(Option, out bool, bool)
IOptionQueryable.TryGetOption(Option, out byte[], bool)
IOptionQueryable.TryGetOption(Option, out Dictionary<string, string>, bool)
IOptionQueryable.TryGetOption(Option, out double, bool)
IOptionQueryable.TryGetOption(Option, out IDictionary<string, string>, bool)
IOptionQueryable.TryGetOption(Option, out ILookup<string, string>, bool)
IOptionQueryable.TryGetOption(Option, out int, bool)
IOptionQueryable.TryGetOption(Option, out int, out int, bool)
IOptionQueryable.TryGetOption(Option, out long, bool)
IOptionQueryable.TryGetOption(Option, out Memory<byte>, bool)
IOptionQueryable.TryGetOption(Option, out object, bool)
IOptionQueryable.TryGetOption(Option, out Rational, bool)
IOptionQueryable.TryGetOption(Option, out ReadOnlyMemory<byte>, bool)
IOptionQueryable.TryGetOption(Option, out string, bool)
IOptionQueryable.TryGetOption(Option, out uint, bool)
IOptionQueryable.TryGetOption(Option, out ulong, bool)
IOptionQueryable.TryGetOption(Option, Span<byte>, bool)
IOptionQueryable.TryGetOption(string, out (int Width, int Height), bool)
IOptionQueryable.TryGetOption(string, out AVDictionary, bool)
IOptionQueryable.TryGetOption(string, out AVMultiDictionary, bool)
IOptionQueryable.TryGetOption(string, out PixelFormat, bool)
IOptionQueryable.TryGetOption(string, out SampleFormat, bool)
IOptionQueryable.TryGetOption(string, out bool, bool)
IOptionQueryable.TryGetOption(string, out byte[], bool)
IOptionQueryable.TryGetOption(string, out Dictionary<string, string>, bool)
IOptionQueryable.TryGetOption(string, out double, bool)
IOptionQueryable.TryGetOption(string, out IDictionary<string, string>, bool)
IOptionQueryable.TryGetOption(string, out ILookup<string, string>, bool)
IOptionQueryable.TryGetOption(string, out int, bool)
IOptionQueryable.TryGetOption(string, out int, out int, bool)
IOptionQueryable.TryGetOption(string, out long, bool)
IOptionQueryable.TryGetOption(string, out Memory<byte>, bool)
IOptionQueryable.TryGetOption(string, out object, bool)
IOptionQueryable.TryGetOption(string, out Rational, bool)
IOptionQueryable.TryGetOption(string, out ReadOnlyMemory<byte>, bool)
IOptionQueryable.TryGetOption(string, out string, bool)
IOptionQueryable.TryGetOption(string, out uint, bool)
IOptionQueryable.TryGetOption(string, out ulong, bool)
IOptionQueryable.TryGetOption(string, Span<byte>, bool)
Namespace: FFmpeg.Codecs
Assembly: FFmpeg.dll
Syntax
public interface IVideoEncoder : IEncoderContext, IDisposable, IOptionQueryable

Properties

View Source

FrameRate

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
View Source

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
View Source

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
View Source

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>
View Source

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>
View Source

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
View Source

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
View Source

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
  • View Source
In this article
Back to top Generated by DocFX