Everything you need to know about M4A
ALAC (Apple Lossless Audio Codec, .m4a or .alac) is Apple's answer to FLAC, released in 2004 and open-sourced in 2011. It's lossless, compresses similarly to FLAC, but is the only lossless format that plays natively on every Apple device without third-party software.
How it works under the hood
- Similar approach to FLAC. Linear prediction plus residual encoding. Both algorithms produce ~50-60% compression of CD audio, but they use different prediction models so the bit-for-bit output differs.
- MP4 container. ALAC is wrapped in an MP4 container (.m4a extension), so it shares MP4's metadata and chapter support with iTunes/Apple Music.
- Open source since 2011. Apple released ALAC under the Apache 2.0 license. Today most decoders (including FFmpeg) handle it natively.
- Lossless to AAC compatibility. Inside iTunes, an ALAC track can be transparently transcoded to AAC for syncing to space-constrained devices.
Where you'll actually use it
- Music libraries that sync between Mac, iPhone, and iPod
- Apple Music's lossless tier (ALAC delivery)
- iTunes purchases when the artist released lossless masters
- Archival within the Apple ecosystem
How it compares to alternatives
ALAC vs FLAC: Both lossless, FLAC is more cross-platform, ALAC is Apple-native. Compression rates are within 1-2% of each other. ALAC vs AAC: ALAC is lossless (~3-5x larger), AAC is lossy.
Things that will trip you up
- ALAC inside .m4a looks identical to AAC - use file headers (or `mediainfo`) to tell them apart
- Some non-Apple players (older Sonos, some car stereos) don't support ALAC despite playing AAC fine
- Converting ALAC to FLAC is lossless and trivial - they're both lossless containers wrapping the same PCM data