# ALAC

Canonical URL: https://encode.wiki/codecs/audio/alac/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): 7ca856682988da8c455c2b2f2c6384eafe5aa1a4943347cb9dfb9d62f90ae600

ALAC (Apple Lossless Audio Codec) is Apple's lossless format. It compresses about as well as [FLAC](/codecs/audio/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

```sh
ffmpeg -i input.flac -c:a alac output.m4a
```

FFmpeg'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

ALAC and FLAC are both lossless, so converting between them loses nothing as long as the bit depth is preserved:

```sh
ffmpeg -i input.m4a -c:a flac output.flac
ffmpeg -i input.flac -c:a alac output.m4a
```

## 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 `.caf` files, mainly as an Apple tool format.

For anything web-facing, publish FLAC (or a lossy codec) instead.
