# Audio Encoding
Audio encoding compresses raw audio data using codecs that exploit psychoacoustic principles—removing frequencies humans can't hear or that are masked by louder sounds. Lossy codecs (MP3, AAC, Opus) achieve dramatic compression with acceptable quality loss; lossless codecs (FLAC, ALAC) preserve all data with less compression.
Key parameters: bitrate (kbps), sample rate (44.1kHz for CD), and bit depth (16-bit, 24-bit). MP3 at 320kbps is near-transparent for most listeners; AAC is more efficient at lower bitrates; Opus excels for voice and streaming. Lossless formats are preferred for archiving and production. Audio encoding pairs with [[Video Encoding]] in container formats.
## Common Codecs
| Codec | Type | Use Case |
|-------|------|----------|
| MP3 | Lossy | Universal compatibility |
| AAC | Lossy | Streaming, Apple |
| Opus | Lossy | VoIP, web, best quality/size |
| FLAC | Lossless | Archiving, audiophile |
| WAV | Uncompressed | Production, editing |
## References
- https://en.wikipedia.org/wiki/Audio_coding_format
## Related
- [[Video Encoding]]
- [[VLC]]
- [[Audio Production]]