Show / Hide Table of Contents

Interface IEncoderContext

Represents the context for encoding operations, including codec information and encoding settings. This interface manages encoding state and allows querying and setting options for the encoder.

Inherited Members
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 IEncoderContext : IDisposable, IOptionQueryable

Properties

View Source

BitRate

Gets or sets the average bit rate for encoding.

The bit rate controls the amount of data processed per second during encoding. This must be set by the user unless a constant quantizer encoding mode is being used.

Declaration
long BitRate { get; set; }
Property Value
Type Description
long
View Source

Codec

Gets the codec that is used for encoding.

Declaration
Codec Codec { get; }
Property Value
Type Description
Codec
View Source

CodecID

Gets the specific codec identifier, which uniquely identifies the codec being used.

Declaration
CodecID CodecID { get; }
Property Value
Type Description
CodecID
View Source

CodecTag

        Gets or sets the FourCC (four-character code) tag for the codec.

        <p>
        The codec tag is used to identify the codec in a container file. 
        For encoding, this is set by the user. If not set, the default based on <xref href="FFmpeg.Codecs.IEncoderContext.CodecID" data-throw-if-not-resolved="false"></xref> will be used.
        </p>
        <p>
        The FourCC tag is stored with the least significant byte (LSB) first, so the string "ABCD" is represented as

        <pre><code class="lang-csharp">('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'</code></pre>

.

Declaration
FourCC CodecTag { get; set; }
Property Value
Type Description
FourCC
View Source

CodecType

Gets the type of media (video, audio, etc.) handled by the codec.

Declaration
MediaType CodecType { get; }
Property Value
Type Description
MediaType
View Source

Flags

Gets or sets the codec flags, which provide additional control over codec behavior.

These flags can adjust how the encoder behaves during the encoding process.

Declaration
CodecFlags Flags { get; set; }
Property Value
Type Description
CodecFlags
View Source

TimeBase

Gets or sets the time base, which is the fundamental unit of time (in seconds) for frame timestamps.

For fixed-frame-rate content, the time base should be set to 1/framerate, and timestamp increments should be exactly 1. This often represents the inverse of the frame rate for video codecs.

The time base must be set by the user during encoding.

Declaration
Rational TimeBase { get; set; }
Property Value
Type Description
Rational
  • View Source
In this article
Back to top Generated by DocFX