Three codecs cover ~95% of streamed audio: MP3 (legacy, ubiquitous), AAC (modern default, especially Apple), Opus (open, best for voice). Pick by content type, decoder availability, and licensing.
Quality at the same bitrate
At 128 kbps stereo music: AAC > MP3 (AAC sounds noticeably cleaner). Opus matches AAC at this bitrate, and is much better below 96 kbps. For voice at 32 kbps, Opus is dramatically clearer than either MP3 or AAC.
Decoder support
MP3: every device since 1998. AAC: every device since 2005, native iOS/macOS. Opus: every modern browser, Android 5+, iOS 11+. For maximum reach: MP3 fallback + AAC primary + Opus optional.
Licensing
MP3: patents expired (free). AAC: still patent-encumbered but most encoder/decoder licenses bundled into OS. Opus: royalty-free by design (IETF + Xiph).
Use case matrix
| Use case | Codec | Bitrate |
|---|---|---|
| Music streaming | AAC (or Opus 96+) | 128-256 kbps |
| Podcast | AAC | 64-128 kbps |
| VoIP / WebRTC | Opus | 24-32 kbps |
| Audiobook | AAC mono | 32-64 kbps |
| Voice memo | Opus | 16-24 kbps |
Container choice
Format ≠ codec. AAC inside MP4 container (.m4a/.mp4) for music. AAC inside ADTS for streaming. Opus inside OGG or WebM. MP3 is its own format. Container affects metadata, streamability, and DRM — not audio quality.