Table of Contents

Enum FFMPEGAudioCodec

Namespace
VisioForge.Core.Types.Output
Assembly
VisioForge.Core.dll

Specifies the audio codecs supported by the FFMPEG output engine. This enumeration defines the available audio compression formats that can be used when encoding audio streams through the FFMPEG backend.

public enum FFMPEGAudioCodec

Fields

Auto = 0

Automatic codec selection based on output format and configuration. FFMPEG will choose the most appropriate audio codec automatically.

When Auto is selected, FFMPEG determines the optimal audio codec based on:

  • Target container format (MP4, WebM, etc.)
  • Quality and bitrate settings
  • Platform capabilities and hardware support
  • Compatibility requirements

This is the recommended option for:

  • General-purpose applications
  • When codec-specific optimization is not required
  • Simplifying configuration management
  • Ensuring format compatibility

The automatic selection typically chooses:

  • AAC for MP4 containers
  • Vorbis for WebM containers
  • The most compatible option for other formats
MP2 = 1

MPEG-1 Audio Layer II (MP2) audio codec. A legacy audio compression format primarily used in broadcasting and DVD applications.

Technical characteristics:

  • Bitrates: Typically 128-384 kbps
  • Sample rates: 32, 44.1, 48 kHz
  • Channels: Mono, stereo, or multichannel
  • Compression: Lossy, psychoacoustic model

Use cases:

  • Broadcasting applications (especially in Europe)
  • DVD authoring and legacy media
  • Professional audio equipment compatibility

Considerations:

  • Less efficient compression compared to modern codecs
  • Limited support in consumer devices
  • Consider AAC or MP3 for better compatibility
MP3 = 2

MPEG-1 Audio Layer III (MP3) audio codec. The widely adopted lossy audio compression format with excellent compatibility.

Technical characteristics:

  • Bitrates: 8-320 kbps (typically 128-320 kbps)
  • Sample rates: 8-48 kHz (typically 44.1 kHz)
  • Channels: Mono, stereo, joint stereo
  • Compression: Lossy, perceptual audio coding

Advantages:

  • Universal compatibility across all devices and platforms
  • Mature technology with predictable behavior
  • Extensive software and hardware support
  • Good quality at standard bitrates (192-320 kbps)

Use cases:

  • Legacy system compatibility
  • Consumer media applications
  • Streaming where maximum compatibility is required

Note: Consider AAC for new applications due to better compression efficiency.

AAC = 3

Advanced Audio Coding (AAC) audio codec. Modern, efficient lossy audio compression with excellent quality-to-bitrate ratio.

Technical characteristics:

  • Bitrates: 8-529 kbps (typically 64-256 kbps)
  • Sample rates: 8-96 kHz
  • Channels: Up to 48 channels (typically mono/stereo)
  • Compression: Lossy, advanced psychoacoustic model

Advantages:

  • Superior compression efficiency compared to MP3
  • Better quality at lower bitrates
  • Wide platform support (iOS, Android, browsers)
  • Multiple profiles (LC, HE, HE-v2) for different use cases

Use cases:

  • Modern streaming applications
  • Mobile applications (iOS/Android native support)
  • High-quality audio at moderate bitrates
  • Professional broadcast and production

Recommended settings:

  • 128 kbps for good quality stereo
  • 64 kbps for acceptable quality stereo
  • 32 kbps for speech/mono content
FLAC = 4

Free Lossless Audio Codec (FLAC). Open-source lossless audio compression format preserving original audio quality.

Technical characteristics:

  • Compression: Lossless (perfect reconstruction)
  • Compression ratio: Typically 30-50% of original size
  • Sample rates: Up to 655.35 kHz
  • Bit depths: 4-32 bits per sample
  • Channels: Up to 8 channels

Advantages:

  • Perfect audio quality preservation
  • Open source and royalty-free
  • Fast encoding and decoding
  • Supports metadata and embedded artwork
  • Error detection and correction

Use cases:

  • Archival and master recordings
  • High-fidelity audio applications
  • Professional audio production
  • Applications where file size is less critical than quality

Considerations:

  • Larger file sizes than lossy codecs
  • May not be supported on all consumer devices
  • Higher bandwidth requirements for streaming
Vorbis = 5

Ogg Vorbis audio codec. Open-source lossy audio compression format designed for high-quality audio streaming.

Technical characteristics:

  • Bitrates: Variable bitrate (VBR) optimization
  • Sample rates: Up to 192 kHz
  • Channels: Up to 255 channels
  • Compression: Lossy, advanced psychoacoustic model

Advantages:

  • Completely open source and patent-free
  • Excellent quality at low bitrates
  • Superior VBR implementation
  • No licensing fees or restrictions
  • Optimized for streaming applications

Use cases:

  • Open-source projects and applications
  • WebM containers for web streaming
  • Gaming applications (Ogg Vorbis widely supported)
  • Applications avoiding patent licensing issues

Compatibility:

  • Native support in Firefox, Chrome browsers
  • Supported by many media players and libraries
  • Limited support on iOS devices
  • Standard codec for WebM format
OPUS = 6

Opus audio codec. Modern, versatile lossy audio codec optimized for interactive speech and music transmission.

Technical characteristics:

  • Bitrates: 6-510 kbps (adaptive)
  • Sample rates: 8, 12, 16, 24, 48 kHz
  • Channels: Mono to full surround sound
  • Latency: Extremely low (as low as 5ms)
  • Compression: Hybrid SILK + CELT codec

Advantages:

  • Superior quality at all bitrates, especially low bitrates
  • Very low latency for real-time applications
  • Excellent for both speech and music
  • Royalty-free and open standard (IETF RFC 6716)
  • Dynamic bitrate adaptation

Use cases:

  • VoIP and real-time communication
  • Live streaming with low latency requirements
  • Modern web applications (WebRTC)
  • Gaming voice chat
  • High-quality audio at constrained bandwidths

Compatibility:

  • Native browser support (WebRTC standard)
  • Growing support in media players and devices
  • Standard codec for WebM containers
  • Recommended for new interactive applications

Remarks

Each codec offers different characteristics in terms of:

  • Compression efficiency (file size vs. quality)
  • Computational requirements (encoding speed)
  • Platform compatibility and support
  • Licensing considerations

Codec selection guidelines:

  • Use AAC for broad compatibility and good compression
  • Use MP3 for legacy compatibility
  • Use OPUS for modern applications requiring high quality at low bitrates
  • Use FLAC for lossless compression
  • Use Vorbis for open-source applications

The Auto option allows the FFMPEG engine to select the most appropriate codec based on the output container format and other configuration settings.