Show / Hide Table of Contents

Interface IAudioEncoder

Represents an interface for audio encoders, providing properties specific to audio encoding such as sample rate, format, and channel layout. 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 IAudioEncoder : IEncoderContext, IDisposable, IOptionQueryable

Properties

View Source

AudioServiceType

Gets or sets the audio service type, which indicates the type of audio being encoded (e.g., main audio, commentary, hearing impaired audio).

This is mainly used for broadcasting or streaming services that require different types of audio streams for various audiences.

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

ChannelLayout

Gets or sets the channel layout of the audio being encoded.

The channel layout describes how audio channels (e.g., mono, stereo, surround) are arranged. This is typically set according to the source material (e.g., stereo layout for two channels).

Declaration
ChannelLayout_ref ChannelLayout { get; }
Property Value
Type Description
ChannelLayout_ref
View Source

SampleFormat

Gets or sets the sample format of the audio being encoded.

The sample format defines how each audio sample is represented (e.g., 16-bit integer, floating point). This property must be set based on the audio source's format.

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

SampleRate

Gets or sets the sample rate of the audio being encoded, in samples per second (Hz).

The sample rate defines how many audio samples are taken per second. Common values are 44100 Hz (CD quality) and 48000 Hz (professional audio).

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