Even on top of the same perceptual coding, generations and goals differ. We go through the line from MP3 to AAC to Opus, and HE-AAC's SBR.
Just as video codecs went H.264 → HEVC → AV1, lossy audio codecs have generations too. This lesson compares the three you will meet most often. (AC-3 and FLAC are in the next lesson.)
The table summarizes commonly known specifications. This site does not yet have any audio data it measured itself.
AAC was designed to deliver better quality than MP3 at the same bitrate, and it is used as the default audio in MP4 files. It has several variants, but there are two you need to know.
SBR "reconstructs" the highs rather than "restoring" them, so the result is not exactly identical to the original sound. It is known to have an edge over AAC-LC at low bitrates, but the advantage disappears once the bitrate is high enough. Also, the built-in aac encoder in a default ffmpeg build cannot produce HE-AAC; that is only possible in builds that include a separate library such as libfdk_aac.
Opus is a royalty-free codec standardized by the IETF (RFC 6716). It combines SILK, which is strong on speech, with CELT, which is strong on music, so a single codec covers a wide bitrate range from voice calls to music. Its short frames allow low-delay settings, so it is widely used where delay matters, such as video calls and live streaming. On the video side you meet it as the audio codec paired with WebM (in the VP9/AV1 releases from Chapter 7). Note, though, that Opus processes audio internally at a 48 kHz basis, so a 44.1 kHz source is converted during encoding.
If it has to just play on every device, use AAC-LC. If you are on the web, WebM, calls, or care about royalties, use Opus. There is almost no reason to choose MP3 for new work, but it remains widespread because of compatibility with older devices. As with "a container is not a codec" in Chapter 10, you need to check the codec and the container separately for compatibility problems.
# AAC-LC (ffmpeg built-in encoder)
ffmpeg -i in.wav -c:a aac -b:a 128k out.m4a
# Opus (requires libopus)
ffmpeg -i in.wav -c:a libopus -b:a 96k out.opus
# MP3 (requires libmp3lame)
ffmpeg -i in.wav -c:a libmp3lame -b:a 192k out.mp3AAC's baseline profile. The most widely played form of AAC.
An extension that adds SBR (and PS in v2) to AAC-LC to do well at low bitrates.
A technique where the decoder reconstructs the high-frequency band from the low frequencies.
A royalty-free IETF-standard codec. Handles speech (SILK) and music (CELT) in one.
MPEG-1 Audio Layer III. The long-standing standard format for music distribution.
What is the key technique that makes HE-AAC efficient at low bitrates?