C.W.K.
Stream
Lesson 01 of 10 · published

Audio Codecs — AAC vs Opus vs MP3

~10 min · aac, opus, mp3, codec

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Three codecs, three jobs

  • AAC — the universal codec. Plays on every device. Lives in MP4 containers. Default for YouTube uploads. -c:a aac -b:a 192k is the safe daily choice.
  • Opus — the modern royalty-free codec. ~25% smaller than AAC at the same perceptual quality. Lives in WebM/Matroska. Used by Discord, WhatsApp, modern browsers. -c:a libopus -b:a 128k.
  • MP3 — legacy. Use only when you must hand a file to someone whose pipeline doesn't accept AAC/Opus (rare in 2026).

Bitrate ranges

AAC: 128 kbps stereo for casual listening, 192 kbps for music, 256–320 kbps for archive. Opus: same purpose at ~⅔ the bitrate (96/128/160 kbps). MP3: 192–320 kbps to match the same perceptual level (less efficient).

Lossless audio

For working files / DAW imports use pcm_s16le (WAV) or flac. PCM = uncompressed, FLAC = compressed lossless. Both round-trip perfectly through any pipeline.

Code

Daily audio choices·bash
# AAC — universal
ffmpeg -i in.wav -c:a aac -b:a 192k out.m4a

# Opus — smaller, royalty-free
ffmpeg -i in.wav -c:a libopus -b:a 128k out.opus

# MP3 — legacy
ffmpeg -i in.wav -c:a libmp3lame -q:a 2 out.mp3

# Lossless WAV (working file)
ffmpeg -i in.mp3 -c:a pcm_s16le out.wav

# FLAC (compressed lossless)
ffmpeg -i in.wav -c:a flac out.flac
Audio-only pipelines·bash
# Pull audio out, re-encode in one step
ffmpeg -i video.mp4 -vn -c:a aac -b:a 192k podcast.m4a

# Same source, two bitrate masters in one pass (for adaptive delivery)
ffmpeg -i video.mp4 \
  -vn -map 0:a -c:a aac -b:a 96k  audio_low.m4a \
  -vn -map 0:a -c:a aac -b:a 192k audio_hi.m4a

External links

Exercise

Take one source WAV. Encode three versions: AAC at 96 kbps, Opus at 64 kbps, MP3 at 192 kbps. Listen on headphones — which lowest-bitrate file sounds the cleanest? File size winner? Quality-per-byte winner?

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.