Table of Contents

Class IBasicAudioSettings

Namespace
VisioForge.Core.Types.FFMPEGEXE
Assembly
VisioForge.Core.dll

Defines the interface for basic audio encoding settings used by FFMPEG executable operations.

public class IBasicAudioSettings

Inheritance

Derived

Inherited Members

Remarks

This class provides the fundamental audio encoding parameters required for most audio processing and encoding scenarios. It serves as the base configuration for audio streams in video files or standalone audio files.

Audio encoding involves several key parameters: - Sample rate: Frequency of audio samples (Hz) - Bitrate: Data rate for compressed audio (bps) - Channels: Number of audio channels (mono, stereo, surround) - Encoder: Codec used for compression - Mode: Rate control strategy

Properties

Bitrate

Gets or sets the audio bitrate in bits per second (bps).

public int Bitrate { get; set; }

Property Value

int

Remarks

Bitrate directly affects audio quality and file size. Higher bitrates provide better quality but larger files. The optimal bitrate depends on the codec, content type, and target use case.

Common bitrate ranges by codec and use case:

AAC (Modern efficient codec): - 128 kbps: Acceptable for stereo music streaming - 192 kbps: Good quality for music distribution - 256 kbps: High quality for archival and critical listening - 320 kbps: Maximum quality (diminishing returns above this)

MP3 (Legacy but universal): - 128 kbps: Minimum for acceptable music quality - 192 kbps: Standard quality for casual listening - 256 kbps: High quality music - 320 kbps: Maximum MP3 quality

Opus (Best for speech and real-time): - 32 kbps: Good quality speech - 64 kbps: High quality speech, acceptable music - 96 kbps: High quality music - 128 kbps: Transparent for most music

Voice/Speech (AMR-NB, G.711, Opus): - 8-16 kbps: Telephony quality - 16-32 kbps: VoIP and conferencing - 32-64 kbps: High quality voice

Note: When encoding for specific platforms (YouTube, Spotify, etc.), check their recommended audio bitrates for optimal results.

Channels

Gets or sets the number of audio channels.

public int Channels { get; set; }

Property Value

int

Remarks

Specifies the channel layout for the audio stream. Each channel represents an independent audio signal, typically corresponding to a physical speaker position in the playback system.

Standard channel configurations:

1 channel (Mono): - Single audio channel - Voice recordings, podcasts - Phone calls and communication - Minimal file size - No spatial information

2 channels (Stereo - most common): - Left and Right channels - Standard music and video - Headphone and speaker playback - Spatial width and imaging - Universal compatibility

3 channels (2.1): - Left, Right, and Low Frequency Effects (LFE/subwoofer) - Consumer surround sound entry level

4 channels (Quadraphonic or 3.1): - Left, Right, Surround Left, Surround Right - Or: Left, Right, Center, LFE

6 channels (5.1 Surround): - Front: Left, Center, Right - Surround: Left, Right - LFE (subwoofer) - Standard for DVD and Blu-ray - Home theater systems - Cinema audio

8 channels (7.1 Surround): - 5.1 plus Back Left and Back Right - High-end home theater - Blu-ray audio tracks - Enhanced rear sound field

Note: More channels require: - Higher bitrates for quality - Compatible playback equipment - Proper downmixing for stereo playback - Larger file sizes For most applications, stereo (2 channels) provides the best balance of quality, compatibility, and file size.

Encoder

Gets or sets the audio encoder (codec) to use for encoding.

public AudioEncoder Encoder { get; set; }

Property Value

AudioEncoder

Remarks

The encoder determines the compression algorithm used to reduce audio file size. Different encoders offer different trade-offs between quality, compression efficiency, compatibility, and processing requirements.

Selection criteria: - Target platform compatibility - Quality requirements - File size constraints - Processing speed needs - License and patent considerations

See VisioForge.Core.Types.FFMPEGEXE.AudioEncoder for detailed information about available codecs, their characteristics, and recommended use cases.

Mode

Gets or sets the encoding mode (rate control strategy).

public AudioMode Mode { get; set; }

Property Value

AudioMode

Remarks

The mode determines how the encoder controls bitrate allocation during encoding. Different modes offer trade-offs between quality consistency, file size predictability, and encoding efficiency.

Common modes: - CBR (Constant Bitrate): Predictable size, variable quality - ABR (Average Bitrate): Balanced approach - VBR/Quality: Best quality-to-size ratio - Lossless: Perfect quality, large files

Mode availability depends on the selected encoder. Not all encoders support all modes.

See VisioForge.Core.Types.FFMPEGEXE.AudioMode for detailed information about each mode and when to use it.

Quality

Gets or sets the quality level for quality-based encoding modes.

public int Quality { get; set; }

Property Value

int

Remarks

Quality parameter is used when the encoding mode is set to quality-based Variable Bitrate (VBR). The scale and interpretation vary by encoder:

AAC (libfdk_aac): - Range: 1-5 - 1: Lowest quality - 5: Highest quality (VBR mode 5)

MP3 (libmp3lame): - Range: 0-9 (inverted scale) - 0: Best quality (~245 kbps VBR) - 2: High quality (~190 kbps VBR) - 4: Normal quality (~165 kbps VBR) - 6: Acceptable quality (~130 kbps VBR) - 9: Lowest quality (~65 kbps VBR)

Opus: - Typically uses target bitrate directly - Quality scale may not apply

Vorbis: - Range: -1 to 10 - -1: ~45 kbps - 0: ~64 kbps - 3: ~112 kbps (good quality) - 6: ~192 kbps (high quality) - 10: ~500 kbps (maximum)

Note: This parameter is typically ignored when using CBR or ABR modes. Refer to the specific encoder documentation for exact quality scale interpretation.

SampleRate

Gets or sets the audio sample rate in Hertz (Hz).

public int SampleRate { get; set; }

Property Value

int

Remarks

Sample rate determines the frequency range that can be represented in the digital audio. Higher sample rates can capture higher frequencies but result in larger file sizes. The sample rate must be at least twice the highest frequency you want to capture (Nyquist theorem).

Standard sample rates and their use cases:

8000 Hz: - Telephone quality audio - Voice-only applications - Very low bandwidth requirements - Frequency range: 0-4000 Hz

16000 Hz: - Wideband telephony (HD Voice) - VoIP and video conferencing - Speech recognition systems - Frequency range: 0-8000 Hz

22050 Hz: - Web audio and casual multimedia - Lower quality music streaming - Frequency range: 0-11025 Hz

44100 Hz (CD quality - most common): - Music distribution standard - General-purpose audio encoding - Optimal for most applications - Frequency range: 0-22050 Hz (full audible range)

48000 Hz (Professional video standard): - Professional video production - DVD and Blu-ray audio - Broadcast audio - Better for time-stretching operations

96000 Hz and higher (Hi-Res audio): - Professional music production - Mastering and archival - High-resolution audio formats - Provides headroom for processing

Note: When choosing sample rate, consider: - Source material quality - Target playback devices - Processing requirements - Storage and bandwidth constraints Most video applications use 48000 Hz