{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/codecs/audio/alac",
  "collection": "docs",
  "title": "ALAC",
  "description": "ALAC is Apple's lossless audio codec, used for lossless music in Apple devices and iTunes/Music libraries; FLAC is the better choice everywhere else.",
  "canonicalUrl": "https://encode.wiki/codecs/audio/alac/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/codecs/audio/alac.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/codecs/audio/alac.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "Apple Lossless Audio Codec reference implementation",
      "url": "https://github.com/macosforge/alac",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Apple ALAC reference README",
      "url": "https://github.com/macosforge/alac/blob/master/ReadMe.txt",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 ALAC encoder source",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/alacenc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "MDN audio codec guide",
      "url": "https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Audio_codecs",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/audio/ALAC.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/audio/ALAC.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Encoding",
      "anchor": "encoding"
    },
    {
      "depth": 2,
      "text": "Converting to and from FLAC",
      "anchor": "converting-to-and-from-flac"
    },
    {
      "depth": 2,
      "text": "Compatibility",
      "anchor": "compatibility"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/codecs/audio/alac/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/_preamble.md",
      "checksum": "02aa1a8b34f7b27aef06899fd9460fc2b86aba1ccb00381a77d658713831d7af",
      "bytes": 513
    },
    {
      "id": "encoding",
      "title": "Encoding",
      "depth": 2,
      "anchor": "encoding",
      "canonicalUrl": "https://encode.wiki/codecs/audio/alac/#encoding",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/encoding.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/encoding.md",
      "checksum": "0bc6846b7f9f3bf6c26450e283718b8295612e6b97ecaabec55092e4748c3f30",
      "bytes": 506
    },
    {
      "id": "converting-to-and-from-flac",
      "title": "Converting to and from FLAC",
      "depth": 2,
      "anchor": "converting-to-and-from-flac",
      "canonicalUrl": "https://encode.wiki/codecs/audio/alac/#converting-to-and-from-flac",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/converting-to-and-from-flac.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/converting-to-and-from-flac.md",
      "checksum": "6177b1220fc1aeab3821c725136f51479175cc730d6b4696a0ff80655989ab39",
      "bytes": 240
    },
    {
      "id": "compatibility",
      "title": "Compatibility",
      "depth": 2,
      "anchor": "compatibility",
      "canonicalUrl": "https://encode.wiki/codecs/audio/alac/#compatibility",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/compatibility.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/alac/compatibility.md",
      "checksum": "2bdad9fc3521966cd77b5bb09ac12b0d324282ce5fdea56921a8f1509e15c299",
      "bytes": 474
    }
  ],
  "outboundReferences": [
    "/codecs/audio/flac/"
  ],
  "checksum": "7ca856682988da8c455c2b2f2c6384eafe5aa1a4943347cb9dfb9d62f90ae600",
  "contentFormat": "markdown",
  "markdown": "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).\n\nALAC stores integer PCM at 16, 20, 24 or 32 bits with 1–8 channels. It cannot store floating-point audio.\n\n## Encoding\n\n```sh\nffmpeg -i input.flac -c:a alac output.m4a\n```\n\nFFmpeg'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.\n\n`-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.\n\n## Converting to and from FLAC\n\nALAC and FLAC are both lossless, so converting between them loses nothing as long as the bit depth is preserved:\n\n```sh\nffmpeg -i input.m4a -c:a flac output.flac\nffmpeg -i input.flac -c:a alac output.m4a\n```\n\n## Compatibility\n\n- Apple hardware and software play ALAC natively, as does Safari. Chrome, Edge and Firefox do not list ALAC as a supported browser audio format.\n- 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.\n- ALAC also appears in `.caf` files, mainly as an Apple tool format.\n\nFor anything web-facing, publish FLAC (or a lossy codec) instead.\n"
}
