Skip to main content

Audio Codecs

Frame supports a wide range of audio codecs for different quality requirements and compatibility needs. This guide explains the differences between lossy and lossless codecs, use cases, and optimal settings.

Lossy vs Lossless

Lossy Audio Codecs

Lossy codecs achieve smaller file sizes by discarding audio information that is less perceptible to human hearing.

Characteristics

  • Smaller file sizes: 10-20x smaller than lossless
  • Perceptual quality: Optimized for human hearing
  • Irreversible: Cannot recover original quality
  • Suitable for distribution: Final playback, streaming, sharing

Supported Lossy Codecs

  • AAC - Modern, efficient codec
  • MP3 - Universal compatibility
  • Opus - Best quality/size ratio for web
  • AC3 - Surround sound, home theater
  • Vorbis - Older open-source codec

When to Use Lossy

  • Final distribution and playback
  • Streaming audio/video
  • Portable device playback
  • Web delivery
  • When storage space matters

Supported Audio Codecs

AAC (Advanced Audio Coding)

Modern successor to MP3 with better quality at the same bitrate.Codec ID: aac

Use Cases

  • General-purpose audio encoding
  • Mobile device playback
  • Streaming video/audio
  • Modern applications (2010+)
  • Apple ecosystem compatibility

Quality Settings

Recommended Bitrates:
  • 64 kbps - Minimum for speech/podcasts (mono)
  • 96 kbps - Low quality music (stereo)
  • 128 kbps - Standard quality music (most use cases)
  • 192 kbps - High quality music
  • 256 kbps - Very high quality
  • 320 kbps - Maximum quality (near-transparent)

Channel Configurations

  • Mono (mono): 1 channel - Speech, podcasts
  • Stereo (stereo): 2 channels - Music, most video
  • Original (original): Preserve source channels - Surround sound passthrough

Container Compatibility

Works with: MP4, M4A, MOV, MKV

Example Configuration

{
  "audioCodec": "aac",
  "audioBitrate": "128",
  "audioChannels": "stereo"
}
AAC provides better quality than MP3 at the same bitrate. For modern applications, AAC at 128 kbps is equivalent to MP3 at 160-192 kbps.

Channel Configurations

Frame supports three audio channel configuration modes:

Original Channels

Setting: originalPreserves the source audio channel configuration.

Behavior

  • Mono source → Mono output
  • Stereo source → Stereo output
  • 5.1 source → 5.1 output
  • 7.1 source → 7.1 output

Use Cases

  • Preserving surround sound
  • Maintaining original audio characteristics
  • Multi-channel audio workflows
  • Default for archival presets
This is the recommended setting for most use cases to preserve the original audio experience.

Codec Selection Guide

Use MP3 at 192-320 kbpsWhen you need audio to play on any device:
  • Older devices and car stereos
  • DJ software and music production tools
  • Universal music libraries
  • Legacy system compatibility
Recommended settings:
  • Bitrate: 192 kbps (good), 320 kbps (maximum)
  • Channels: Stereo
  • Container: MP3
Use AAC at 128-256 kbpsFor modern smartphones, tablets, and computers:
  • Mobile device playback
  • Streaming video audio
  • Apple ecosystem
  • General-purpose use (2010+)
Recommended settings:
  • Bitrate: 128 kbps (standard), 192 kbps (high quality)
  • Channels: Stereo
  • Container: M4A (audio-only) or MP4 (with video)
Use Opus at 96-128 kbpsFor web-based audio/video:
  • YouTube uploads
  • Web streaming platforms
  • Browser-based playback
  • Best quality-to-size ratio
Recommended settings:
  • Bitrate: 96 kbps (excellent quality)
  • Channels: Stereo
  • Container: WebM (with VP9 video)
Use FLAC (lossless)When you need perfect audio quality:
  • Music archival and preservation
  • Audiophile listening
  • Source files for future conversions
  • Professional audio work
Recommended settings:
  • No bitrate (lossless)
  • Channels: Original
  • Container: FLAC
Note: 50% smaller than WAV with identical quality
Use ALAC (lossless)For Apple device libraries:
  • iTunes/Music app integration
  • iPhone/iPad/Mac playback
  • AirPlay streaming
  • Lossless within Apple ecosystem
Recommended settings:
  • No bitrate (lossless)
  • Channels: Original
  • Container: M4A
Use AC3 at 384-640 kbpsFor multi-channel audio:
  • 5.1/7.1 surround sound
  • Home theater systems
  • Movie/TV show encoding
  • DVD/Blu-ray compatibility
Recommended settings:
  • Bitrate: 384 kbps (5.1), 640 kbps (7.1)
  • Channels: Original
  • Container: MKV or MP4

Audio Codec Comparison

CodecTypeQuality/SizeCompatibilityBest BitrateUse Case
AACLossyExcellentModern devices128-192 kbpsGeneral purpose
MP3LossyGoodUniversal192-320 kbpsMaximum compatibility
OpusLossyOutstandingWeb/modern96-128 kbpsWeb streaming
FLACLosslessPerfectGoodN/AArchival
ALACLosslessPerfectApple onlyN/AApple ecosystem
AC3LossyGoodExcellent192-640 kbpsSurround sound
PCMUncompressedPerfectUniversalN/AProfessional work

See Also

Build docs developers (and LLMs) love