ALAC
37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0ALAC (Apple Lossless Audio Codec) is Apple’s lossless format. It compresses about as well as FLAC and decodes back to identical samples, but it lives in MP4/.m4a files that iPhones, iPods, Macs, Apple TV and iTunes/Music play natively. Use ALAC when the destination is an Apple library; use FLAC for everything else. Apple’s reference implementation is open source (Apache 2.0).
ALAC stores integer PCM at 16, 20, 24 or 32 bits with 1–8 channels. It cannot store floating-point audio.
Encoding
Section titled “Encoding”ffmpeg -i input.flac -c:a alac output.m4aFFmpeg’s alac encoder is the usual route off a Mac. It writes 16-bit or 24-bit ALAC only: a 32-bit integer source is stored as 24-bit, so the lowest eight bits are lost. Apple’s reference encoder handles all four bit depths.
-compression_level only goes 0–2 (default 2) and the result changes size, not fidelity. The extra -min_prediction_order and -max_prediction_order options (defaults 4 and 6) are rarely worth touching.
Converting to and from FLAC
Section titled “Converting to and from FLAC”ALAC and FLAC are both lossless, so converting between them loses nothing as long as the bit depth is preserved:
ffmpeg -i input.m4a -c:a flac output.flacffmpeg -i input.flac -c:a alac output.m4aCompatibility
Section titled “Compatibility”- Apple hardware and software play ALAC natively, as does Safari. Chrome, Edge and Firefox do not list ALAC as a supported browser audio format.
- Outside Apple’s ecosystem, support is software-only (FFmpeg-based players such as mpv and VLC); hardware players and car stereos are far less likely to handle it than FLAC.
- ALAC also appears in
.caffiles, mainly as an Apple tool format.
For anything web-facing, publish FLAC (or a lossy codec) instead.