Global Brand, Local Voices: A Practical Guide
Audio Codecs

Audio Codecs Explained: AAC & Opus

How perceptual audio codecs work, when to choose AAC vs Opus for video delivery and streaming, and how Videospan uses both across its platform.

An audio codec compresses raw digital audio so it can be stored and streamed efficiently, then decompresses it for playback. Uncompressed stereo audio at CD quality (44.1 kHz, 16-bit) runs at about 1.4 Mbps — fine for a studio master, far too heavy for web delivery. Lossy audio codecs solve this by removing information your ears won't miss, typically shrinking audio to 5–10% of its original size with little or no audible difference.

Audio is half the perceived quality of every video Videospan ships — viewers forgive a soft frame long before they forgive muddy speech. Our pipeline is built on the two codecs covered in this section: Opus captures contributors' voices in the browser during recording, and AAC carries every finished video to every device it's played on. We document both openly, because a team evaluating a video platform deserves to know exactly what it's running on.

How perceptual audio coding works

Modern lossy codecs are built on psychoacoustics — the study of how humans actually perceive sound. Two properties of hearing do most of the work:

  • Absolute threshold of hearing. Below a certain loudness at each frequency, sound is simply inaudible. Any signal content under that threshold can be discarded entirely.
  • Masking. A loud sound makes nearby quieter sounds inaudible — both in frequency (a loud 1 kHz tone hides quieter tones at 1.1 kHz) and in time (a loud transient masks what comes just before and after it). A codec can throw away masked content and you will never hear the difference.

A perceptual codec splits the incoming signal into frequency bands, computes the masking thresholds for each band, and allocates its bitrate budget only to what remains audible. Frequency components that fall below the masking threshold get few bits or none at all. Above the codec's bandwidth cutoff — often 15–20 kHz depending on bitrate — content is usually discarded outright, since the highest octave contributes little to perceived quality.

This is why 128 kbps can sound transparent: the codec isn't storing the sound, it's storing a model of everything you can hear in the sound.

The demo below visualizes this on a real audio signal. Watch the frequency spectrum and the cutoff line — everything above the cutoff is information the codec has decided you can't hear and doesn't need to store.

AAC · cutoff 15 kHz
AAC (lossy perceptual coding) discards frequency content above ~15 kHz — the purple line marks the cutoff; bands beyond it carry almost no energy.

AAC vs Opus at a glance

The two codecs that matter most for video today are AAC, the universal delivery standard, and Opus, the modern low-latency codec built for the web. They are also the two codecs our platform runs on — Opus on the way in, AAC on the way out.

AACOpus
Standardized1997 (MPEG-2/MPEG-4)2012 (IETF RFC 6716)
Bitrate range~8–320 kbps per channel pair6–510 kbps
Sample rates8–96 kHz8–48 kHz
ChannelsUp to 48Up to 255
Algorithmic delay~100 ms or moreAs low as 5 ms
EfficiencyGood at 96–128 kbps stereoMatches AAC at 64 kbps, better below
LicensingPatent-licensed (Via LA)Royalty-free
Primary useVideo delivery, HLS, downloadsWebRTC, real-time, low bitrate

Two older codecs are worth a one-line mention for context: MP3 is AAC's predecessor — universal but roughly 30% less efficient, and effectively legacy. FLAC is lossless, so it preserves everything but saves only 40–60%; it's for archiving, not streaming.

AAC

AAC (Advanced Audio Coding) is the default audio codec for video on the internet. It's the required or de facto standard in HLS, MP4, YouTube, iOS, and essentially every device and browser shipped in the last two decades. If you are delivering prerecorded video to a broad audience, AAC at 96–128 kbps stereo is the safe, universal choice.

Read the full guide: What is AAC? Advanced Audio Coding Explained.

Opus

Opus is a royalty-free codec standardized by the IETF in 2012. It combines a speech-optimized core with a low-latency music core, achieves algorithmic delay as low as 5 ms, and outperforms AAC at bitrates below ~64 kbps. It is mandatory-to-implement in WebRTC, which makes it the standard for real-time, interactive audio.

Read the full guide: What is Opus? The Open Audio Codec Explained.

Glossary

Psychoacoustics

The study of how humans perceive sound. Perceptual codecs exploit its findings — especially masking and the absolute threshold of hearing — to discard inaudible information.

Masking

The phenomenon where a loud sound makes quieter sounds at nearby frequencies (or nearby moments in time) inaudible. Codecs remove masked content to save bits.

Bitrate

The number of bits used per second of compressed audio, typically measured in kbps. Higher bitrate means more stored detail and generally better quality.

Sample rate

How many times per second the audio waveform is measured, in kHz. 48 kHz is the standard for video production.

Algorithmic delay

The minimum latency a codec adds purely from its frame structure and analysis window — the floor below which real-time use becomes impossible.

Lossless codec

A codec (like FLAC) that compresses audio without discarding any information, allowing perfect reconstruction of the original.