{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/codecs/audio/aac",
  "collection": "docs",
  "title": "AAC",
  "description": "AAC is the lossy audio format behind most MP4 files and Apple devices; this page covers its profiles, which encoder to use, and good starting settings.",
  "canonicalUrl": "https://encode.wiki/codecs/audio/aac/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/codecs/audio/aac.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/codecs/audio/aac.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "FFmpeg codec documentation, native aac and libfdk_aac encoders",
      "url": "https://ffmpeg.org/ffmpeg-codecs.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 native AAC encoder source",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/aacenc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 libfdk_aac wrapper source",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/libfdk-aacenc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 configure (libfdk_aac licensing)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/configure",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 AudioToolbox (aac_at) encoder source",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/audiotoolboxenc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "fdkaac 1.0.9 command-line parser and defaults",
      "url": "https://github.com/nu774/fdkaac/blob/v1.0.9/src/main.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FDK-AAC 2.0.3 encoder API",
      "url": "https://github.com/mstorsjo/fdk-aac/blob/v2.0.3/libAACenc/include/aacenc_lib.h",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Fraunhofer xHE-AAC platform support",
      "url": "https://www.iis.fraunhofer.de/en/ff/amm/broadcast-streaming/xheaac.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "MDN WebCodecs codec strings for AAC",
      "url": "https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API/Codec_selection",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/audio/AAC.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/audio/AAC.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Profiles",
      "anchor": "profiles"
    },
    {
      "depth": 3,
      "text": "xHE-AAC",
      "anchor": "xhe-aac"
    },
    {
      "depth": 2,
      "text": "Which encoder to use",
      "anchor": "which-encoder-to-use"
    },
    {
      "depth": 2,
      "text": "Starting points",
      "anchor": "starting-points"
    },
    {
      "depth": 2,
      "text": "Containers and files",
      "anchor": "containers-and-files"
    },
    {
      "depth": 2,
      "text": "Pitfalls",
      "anchor": "pitfalls"
    },
    {
      "depth": 2,
      "text": "Related",
      "anchor": "related"
    },
    {
      "depth": 2,
      "text": "Full option reference",
      "anchor": "full-option-reference"
    },
    {
      "depth": 2,
      "text": "FFmpeg native AAC parameter reference",
      "anchor": "ffmpeg-native-aac-parameter-reference"
    },
    {
      "depth": 3,
      "text": "Generic audio controls used by AAC encoders",
      "anchor": "generic-audio-controls-used-by-aac-encoders"
    },
    {
      "depth": 2,
      "text": "FFmpeg libfdkaac parameter reference",
      "anchor": "ffmpeg-libfdkaac-parameter-reference"
    },
    {
      "depth": 2,
      "text": "Standalone fdkaac 1.0.9 parameter reference",
      "anchor": "standalone-fdkaac-109-parameter-reference"
    },
    {
      "depth": 3,
      "text": "Coding and transport",
      "anchor": "coding-and-transport"
    },
    {
      "depth": 3,
      "text": "Input and reporting",
      "anchor": "input-and-reporting"
    },
    {
      "depth": 3,
      "text": "Metadata",
      "anchor": "metadata"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/_preamble.md",
      "checksum": "ecb3891597b92b7e3a37905a5dbc3c40c9f18c85a6fe53839885f68207e2cc47",
      "bytes": 375
    },
    {
      "id": "profiles",
      "title": "Profiles",
      "depth": 2,
      "anchor": "profiles",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#profiles",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/profiles.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/profiles.md",
      "checksum": "b3ca2c038a288c5de22590e2bfb9de732437ea3e0c5cecb538461eb40099e49b",
      "bytes": 1577
    },
    {
      "id": "xhe-aac",
      "title": "xHE-AAC",
      "depth": 3,
      "anchor": "xhe-aac",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#xhe-aac",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/xhe-aac.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/xhe-aac.md",
      "checksum": "d1e8a3c04d748d1de271f1ac7ff9b2580059ce399bc79a76ec8ff312d6c156dd",
      "bytes": 586
    },
    {
      "id": "which-encoder-to-use",
      "title": "Which encoder to use",
      "depth": 2,
      "anchor": "which-encoder-to-use",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#which-encoder-to-use",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/which-encoder-to-use.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/which-encoder-to-use.md",
      "checksum": "fbb285b55121a38f6373d0c6e3a79c32bb419cb2b84d50142527778791c5f494",
      "bytes": 1207
    },
    {
      "id": "starting-points",
      "title": "Starting points",
      "depth": 2,
      "anchor": "starting-points",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#starting-points",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/starting-points.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/starting-points.md",
      "checksum": "1eb57e2725ecf2acfd0f302396a44e0837bbe894709bebc757b679cd35a229f8",
      "bytes": 1310
    },
    {
      "id": "containers-and-files",
      "title": "Containers and files",
      "depth": 2,
      "anchor": "containers-and-files",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#containers-and-files",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/containers-and-files.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/containers-and-files.md",
      "checksum": "b42ca8dc89dd6e5e7d9367563b5f7521d33e6c51e7ade48c294ced254e0fd51f",
      "bytes": 812
    },
    {
      "id": "pitfalls",
      "title": "Pitfalls",
      "depth": 2,
      "anchor": "pitfalls",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#pitfalls",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/pitfalls.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/pitfalls.md",
      "checksum": "bd03bf6c9af8542c4c5f8614ae44599caffdfadf59687dae18e672eae9206ba3",
      "bytes": 204
    },
    {
      "id": "related",
      "title": "Related",
      "depth": 2,
      "anchor": "related",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#related",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/related.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/related.md",
      "checksum": "4ea23c1c0054db3a01d475b934f8ce1aa5b4b44bdb2832f176eb95ecb15abea8",
      "bytes": 179
    },
    {
      "id": "full-option-reference",
      "title": "Full option reference",
      "depth": 2,
      "anchor": "full-option-reference",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#full-option-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/full-option-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/full-option-reference.md",
      "checksum": "d43dc1ff20870865012767ac84034dbc1a48ec181f1a5e28b503de3b6635a5bf",
      "bytes": 172
    },
    {
      "id": "ffmpeg-native-aac-parameter-reference",
      "title": "FFmpeg native AAC parameter reference",
      "depth": 2,
      "anchor": "ffmpeg-native-aac-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#ffmpeg-native-aac-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/ffmpeg-native-aac-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/ffmpeg-native-aac-parameter-reference.md",
      "checksum": "a0c9ad0127419e335221a6d274300e98e747986228a30666bec48ba2444a3ce4",
      "bytes": 2121
    },
    {
      "id": "generic-audio-controls-used-by-aac-encoders",
      "title": "Generic audio controls used by AAC encoders",
      "depth": 3,
      "anchor": "generic-audio-controls-used-by-aac-encoders",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#generic-audio-controls-used-by-aac-encoders",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/generic-audio-controls-used-by-aac-encoders.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/generic-audio-controls-used-by-aac-encoders.md",
      "checksum": "6cb6e8c1f598e86b2c4e98399f2e6907dd1b2d0edd93c55b55e381470100de20",
      "bytes": 964
    },
    {
      "id": "ffmpeg-libfdkaac-parameter-reference",
      "title": "FFmpeg libfdkaac parameter reference",
      "depth": 2,
      "anchor": "ffmpeg-libfdkaac-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#ffmpeg-libfdkaac-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/ffmpeg-libfdkaac-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/ffmpeg-libfdkaac-parameter-reference.md",
      "checksum": "b3a4a52abdf6b423c2ddc24bfc6b45c0a11e3c5d16d72df26bd48f10caa0fc1d",
      "bytes": 2318
    },
    {
      "id": "standalone-fdkaac-109-parameter-reference",
      "title": "Standalone fdkaac 1.0.9 parameter reference",
      "depth": 2,
      "anchor": "standalone-fdkaac-109-parameter-reference",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#standalone-fdkaac-109-parameter-reference",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/standalone-fdkaac-109-parameter-reference.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/standalone-fdkaac-109-parameter-reference.md",
      "checksum": "090c8e8c2f59500e4e16ad6da667ab07240cfe4facc9f536029875b058c4bef0",
      "bytes": 4573
    },
    {
      "id": "coding-and-transport",
      "title": "Coding and transport",
      "depth": 3,
      "anchor": "coding-and-transport",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#coding-and-transport",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/coding-and-transport.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/coding-and-transport.md",
      "checksum": "1044cfb7fff3d43b1774d4801a434d059069301cf932c894ade7301e3df1c186",
      "bytes": 2221
    },
    {
      "id": "input-and-reporting",
      "title": "Input and reporting",
      "depth": 3,
      "anchor": "input-and-reporting",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#input-and-reporting",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/input-and-reporting.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/input-and-reporting.md",
      "checksum": "0e85b31d6ad6b1385abf00b7b4970ca27d26b285caf8168d39709d350ce096d5",
      "bytes": 780
    },
    {
      "id": "metadata",
      "title": "Metadata",
      "depth": 3,
      "anchor": "metadata",
      "canonicalUrl": "https://encode.wiki/codecs/audio/aac/#metadata",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/metadata.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/aac/metadata.md",
      "checksum": "b9265c8b7228db734a98d80845307004b452b2ae78a6679c12a80a13612470ff",
      "bytes": 1255
    }
  ],
  "outboundReferences": [
    "/codecs/audio/flac/",
    "/codecs/audio/opus/",
    "/codecs/audio/vorbis/",
    "/tools/software-encoders/exhale/",
    "/tools/software-encoders/exhale/#decoding-in-ffmpeg",
    "/tools/software-encoders/qaac/",
    "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/aacenc.c",
    "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/libfdk-aacenc.c",
    "https://github.com/nu774/fdkaac",
    "https://github.com/nu774/fdkaac/blob/v1.0.9/src/main.c"
  ],
  "checksum": "1229335095fdc1dbb2e05df9d5a84114ed04375f79dd322e0249be13267a5a56",
  "contentFormat": "markdown",
  "markdown": "AAC is a family of lossy MPEG audio profiles. \"AAC\" on its own almost always means **AAC-LC**, the profile every phone, player, TV and browser can decode. It is the right default whenever the file has to play everywhere: MP4 video, iTunes/Apple Music, Bluetooth, broadcast. If compatibility is not a constraint, [Opus](/codecs/audio/opus/) is usually the better lossy codec.\n\n## Profiles\n\n| Profile | What it is | When to use it |\n| --- | --- | --- |\n| **AAC-LC** | The standard profile. | Default for everything from about 96 kbit/s stereo up. |\n| **HE-AAC (v1)** | LC core at half the sample rate plus Spectral Band Replication (SBR), which rebuilds the high frequencies from side data. | Stereo below roughly 64 kbit/s, e.g. streaming and spoken word. Above ~96 kbit/s, plain LC is as good or better. |\n| **HE-AAC v2** | HE-AAC plus Parametric Stereo (PS), which codes stereo as a mono downmix plus spatial parameters. | Stereo at 32 kbit/s and below. Stereo only. |\n| **AAC-LD / AAC-ELD** | Low-delay variants for conferencing. | Real-time use. Almost no file or player support; encoded by FDK-AAC and Apple's encoder. |\n| **xHE-AAC (USAC)** | MPEG-D USAC with MPEG-D DRC loudness metadata; handles speech and music well at very low rates. | Low-rate streaming where you control the player. [exhale](/tools/software-encoders/exhale/) is the only free encoder. |\n\n### xHE-AAC\n\nxHE-AAC is natively decodable on current Android, Apple (iOS, macOS, tvOS, watchOS) and Windows 11 platforms, but not in most other players, and FFmpeg's decoder does not handle every stream (see [exhale](/tools/software-encoders/exhale/#decoding-in-ffmpeg)). Keep an AAC-LC version if you cannot control the player.\n\nIn MP4, the profile is signalled by the codec string: `mp4a.40.2` (LC), `mp4a.40.5` (HE-AAC), `mp4a.40.29` (HE-AAC v2), `mp4a.40.42` (xHE-AAC). HE-AAC decoders output at double the core sample rate, which matters if you handle the decoded audio yourself.\n\n## Which encoder to use\n\n| Encoder | Profiles | Notes |\n| --- | --- | --- |\n| **Apple Core Audio** | LC, HE-AAC, LD, ELD (FFmpeg's `aac_at` also requests HE-AAC v2; qaac has no v2 mode) | Generally regarded by the Hydrogenaudio community as the best AAC encoder. Use [qaac](/tools/software-encoders/qaac/) on Windows, `afconvert` or FFmpeg's `aac_at` on macOS. |\n| **FDK-AAC** (`fdkaac`, `libfdk_aac`) | LC, HE-AAC, HE-AAC v2, LD, ELD | Close to Apple at typical rates and available everywhere. Its license is GPL-incompatible: an FFmpeg build that also uses `--enable-gpl` (as any build with x264 or x265 does) needs `--enable-nonfree` and cannot be redistributed, so most downloadable builds leave it out. The standalone [`fdkaac`](https://github.com/nu774/fdkaac) tool avoids building FFmpeg yourself. |\n| **FFmpeg native `aac`** | LC | Free and built into every FFmpeg. Behind Apple and FDK, most noticeably at low bitrates; give it more bitrate (160–192 kbit/s stereo) to compensate. Use `-b:a`: its `-q:a` VBR mode works but has no calibrated scale. |\n| **exhale** | xHE-AAC | See above. |\n\nFAAC and the discontinued Nero encoder still turn up in old guides; there is no reason to use either today.\n\n## Starting points\n\nFor stereo music the usual targets are 128 kbit/s for small files, 160–192 kbit/s for a comfortable margin, and 256 kbit/s as overkill insurance. Bitrate is the total for all channels.\n\n```sh\n# FFmpeg native encoder\nffmpeg -i input.flac -c:a aac -b:a 192k output.m4a\n\n# FDK-AAC through the standalone tool: VBR 4 is roughly 150 kbit/s for stereo\nfdkaac -m 4 -o output.m4a input.wav\n\n# FDK-AAC through an FFmpeg build that includes libfdk_aac\nffmpeg -i input.flac -c:a libfdk_aac -vbr 4 output.m4a\n\n# Apple encoder through qaac (Windows), true VBR around 190 kbit/s\nqaac64 --tvbr 91 -o output.m4a input.wav\n```\n\nFDK's VBR modes 1–5 target roughly 32, 40, 48–56, 64 and 80–96 kbit/s per channel; FFmpeg documents its `libfdk_aac` VBR as experimental, and it is only dependable with AAC-LC. For HE-AAC, use a plain bitrate:\n\n```sh\nfdkaac -p 5 -b 64000 -o he-aac.m4a input.wav\nfdkaac -p 29 -b 32000 -o he-aac-v2.m4a input.wav\n```\n\n`fdkaac` reads WAV or raw PCM (`-R`), not FLAC; pipe from FFmpeg with `ffmpeg -i input.flac -f wav - | fdkaac -m 4 -o output.m4a -`. Its `-b` takes bit/s, and `-m 1`–`5` selects VBR and overrides `-b`.\n\n> **Caution.**\n>\n> FFmpeg's native encoder only makes AAC-LC. Passing `-profile:a aac_he` to it fails; HE-AAC needs `libfdk_aac` or an Apple encoder.\n## Containers and files\n\n| Container | Notes |\n| --- | --- |\n| **MP4/M4A** | The normal choice. Stores the profile and encoder delay, so gapless playback works. Add `-movflags +faststart` for web delivery. |\n| **ADTS (`.aac`)** | Raw frames with a header on each. Needed by some hardware and streaming tools; carries no tags or gapless information. `fdkaac -f 2` writes it. |\n| **LATM/LOAS** | Broadcast transport (`fdkaac -f 10`, `libfdk_aac -latm 1`). |\n| **MPEG-TS, Matroska** | Fine for video; check the player. |\n\nNeither `.aac` nor `.m4a` tells you the profile. Run `ffprobe` on the file if you need to know.\n\nFor gapless playback in iTunes-style players, keep the encoder-delay metadata (`fdkaac -G 2` writes both the iTunes and ISO forms; qaac does this by default). Do not trim decoded samples by hand.\n\n## Pitfalls\n\n- Re-encoding an AAC (or any lossy) source stacks artefacts. Encode from the lossless original.\n- Downmixing with `-ac 1` or `-ac 2` can cause phase cancellation on some mixes; check by ear.\n\n## Related\n\n[Opus](/codecs/audio/opus/) for open, royalty-free lossy audio. [FLAC](/codecs/audio/flac/) for lossless. [Vorbis](/codecs/audio/vorbis/) in older Ogg/WebM workflows.\n\n## Full option reference\n\nEvery option of the encoders above in FFmpeg 9.0.2 and `fdkaac` 1.0.9 (with FDK-AAC 2.0.3). Defaults are what you get when the option is omitted.\n\n## FFmpeg native AAC parameter reference\n\nPrivate options of the native [`aac` encoder](https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/aacenc.c). The `anmr` coder and the `aac_pred`/`aac_ltp` options in older guides no longer exist.\n\n| Parameter | Default | Values / units | Effect |\n| --- | --- | --- | --- |\n| `-aac_coder` | `twoloop` | `twoloop`, `fast` | Quantizer search. `twoloop` gives the best quality; `fast` is quicker and worse. |\n| `-aac_ms` | `auto` | `auto`, `0`, `1` | Mid/side stereo. `auto` decides per band, `1` forces M/S on every band, `0` disables it. Always off for more than three channels. |\n| `-aac_is` | `1` | `0`/`1` | Intensity stereo: codes some high bands as one channel plus a position. Saves bits at low bitrates. |\n| `-aac_pns` | `1` | `0`/`1` | Perceptual noise substitution: replaces noise-like bands with synthesized noise. Turned off for `-profile:a mpeg2_aac_low`. |\n| `-aac_tns` | `1` | `0`/`1` | Temporal noise shaping; reduces pre-echo on transients. |\n| `-aac_pce` | `0` | `0`/`1` | Signal the channel layout with a Program Config Element even for standard layouts. Non-standard layouts always get one. |\n\n### Generic audio controls used by AAC encoders\n\n| Parameter | Native `aac` | `libfdk_aac` | Notes |\n| --- | --- | --- | --- |\n| `-profile:a` | `aac_low` (default), `mpeg2_aac_low` | `aac_low` (default), `aac_he`, `aac_he_v2`, `aac_ld`, `aac_eld`, `mpeg2_aac_low`, `mpeg2_aac_he` | The native encoder can't do HE-AAC or xHE-AAC. |\n| `-b:a` | 128k per channel pair, 69k per single channel, 16k per LFE (128k stereo) | About 96k mono or 128k stereo at 44.1 kHz, scaled with sample rate; halved for HE-AAC | Total bitrate for all channels. |\n| `-q:a` | Constant quality: fixed quantizer, no rate control | `1`–`5`, same as `-vbr` | Selects VBR instead of `-b:a`. Higher means more bits. |\n| `-cutoff` | Encoder chooses | Library chooses; at most 20000 Hz | Low-pass in Hz. |\n| `-ar` | 7350–96000 Hz (the 13 AAC rates) | Depends on profile | FFmpeg resamples to a supported rate. |\n| `-sample_fmt` | `fltp` | `s16` | Input format; FFmpeg converts automatically. |\n\n## FFmpeg `libfdk_aac` parameter reference\n\nPrivate options of the [FFmpeg 9.0.2 `libfdk_aac` wrapper](https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/libfdk-aacenc.c). It needs FFmpeg built with `--enable-libfdk-aac` (non-free, so not in most distributed builds).\n\n| Parameter | Default | Values / units | Effect |\n| --- | --- | --- | --- |\n| `-afterburner` | `1` | `0`/`1` | Extra analysis for better quality at some CPU cost. Leave it on. |\n| `-eld_sbr` | `0` | `0`/`1` | Enable SBR with `-profile:a aac_eld`. HE-AAC gets SBR from `-profile:a aac_he`/`aac_he_v2`. |\n| `-eld_v2` | `0` | `0`/`1` | ELDv2 (LD-MPS) for stereo AAC-ELD. Only present when FFmpeg is built against fdk-aac 2.0 or later. |\n| `-signaling` | `default` | `default`, `implicit`, `explicit_sbr`, `explicit_hierarchical` | How SBR/PS are signalled. `default` uses `explicit_hierarchical` when the muxer stores a global header (MP4, Matroska) and `implicit` for ADTS/LATM. |\n| `-latm` | `0` | `0`/`1` | Write LOAS/LATM instead of ADTS when the muxer doesn't use a global header. No effect for MP4 or Matroska. |\n| `-header_period` | `0` | `0`–`65535` frames | With `-latm 1`, repeat the StreamMuxConfig/PCE every N frames. `0` keeps the library default. |\n| `-vbr` | `0` | `0`–`5` | `0` uses `-b:a`. `1`–`5` are FDK's VBR modes; its documented stereo averages are about 32 (HE-AAC v2), 72 (HE-AAC), 112, 148 and 228 kbit/s. FFmpeg warns that VBR only works with some parameter combinations. |\n| `-drc_profile` | `0` | `0` none, `1` film standard, `2` film light, `3` music standard, `4` music light, `5` speech | MPEG-4 DRC profile written as metadata for the decoder; the encoded audio is unchanged. |\n| `-drc_target_ref` | `0` | Integer dB, `-31`–`0` | Target reference level for `-drc_profile`. |\n| `-comp_profile` | `0` | Same as `-drc_profile` | ETSI heavy-compression profile; only written when `-drc_profile` is non-zero. |\n| `-comp_target_ref` | `0` | Integer dB, `-31`–`0` | Target reference level for `-comp_profile`. |\n| `-prog_ref` | `0` | Integer dB, `-31`–`0` | Programme (dialogue) reference level metadata. `0` means it is not written. |\n| `-frame_length` | `-1` | `1024` (LC, HE), `512`/`480` (LD, ELD), `256`/`240`/`128`/`120` (downscaled ELD) | Core frame length in samples. `-1` keeps the profile default. |\n\n## Standalone `fdkaac` 1.0.9 parameter reference\n\n[`fdkaac`](https://github.com/nu774/fdkaac/blob/v1.0.9/src/main.c) is a separate command-line frontend to FDK-AAC; its options and units differ from FFmpeg's wrapper. Its help lists `--header-period` as `-h`, but the working short form is `-P` (`-h` prints help).\n\n### Coding and transport\n\n| Parameter | Default | Values / units | Effect |\n| --- | --- | --- | --- |\n| `-p`, `--profile N` | `2` | `2` AAC-LC, `5` HE-AAC, `29` HE-AAC v2, `23` AAC-LD, `39` AAC-ELD | Audio object type. |\n| `-b`, `--bitrate N` | None; required unless `-m` is 1–5 | bit/s; values below 10000 are read as kbit/s | CBR target. `-b 128` and `-b 128000` are the same. |\n| `-m`, `--bitrate-mode N` | `0` | `0` CBR, `1`–`5` VBR | VBR modes ignore `-b`. Mode 1 is tuned for HE-AAC v2, 2 for HE-AAC, 3–5 for AAC-LC; FDK's documented stereo averages are about 32, 72, 112, 148 and 228 kbit/s. |\n| `-w`, `--bandwidth N` | `0` (auto) | Hz | Low-pass frequency, AAC-LC only. At most 20 kHz or half the sample rate; the automatic choice is usually better. |\n| `-a`, `--afterburner N` | `1` | `0`/`1` | Extra analysis for better quality. Leave it on. |\n| `-L`, `--lowdelay-sbr N` | `0` | `-1` auto, `0` off, `1` on | SBR for AAC-ELD. |\n| `-s`, `--sbr-ratio N` | `0` (library default) | `0`, `1` downsampled, `2` dual-rate | SBR sampling ratio. The library defaults to downsampled SBR for ELD+SBR and dual-rate for HE-AAC. |\n| `-f`, `--transport-format N` | `0` (M4A) | `0` M4A, `1` ADIF, `2` ADTS, `6` LATM MCP=1, `7` LATM MCP=0, `10` LOAS/LATM | Anything other than `0` writes a raw AAC stream (default extension `.aac`) instead of M4A. |\n| `-C`, `--adts-crc-check` | Off | Flag | Add CRC protection to ADTS headers. |\n| `-P`, `--header-period N` | `0` (library default) | Frames | StreamMuxConfig/PCE repetition period for LATM/LOAS. |\n| `-o FILE` | Input name with `.m4a`, or `.aac` if `-f` is not `0` | Filename; `-` (stdout) only when `-f` is not `0` | Output file. M4A output must be seekable. |\n| `-G`, `--gapless-mode N` | `0` | `0` iTunSMPB, `1` ISO (`edts` + `sgpd`), `2` both | How encoder delay and padding are signalled in M4A. |\n| `--include-sbr-delay` | Off | Flag | Count the SBR decoder delay in the signalled encoder delay. This is FDK's own convention but is not iTunes-compatible. |\n| `--moov-before-mdat` | Off | Flag | Put the `moov` index before the audio data, for progressive playback. |\n| `--no-timestamp` | Off | Flag | Write zero creation/modification times, for reproducible output. |\n\n### Input and reporting\n\n| Parameter | Default | Values / units | Effect |\n| --- | --- | --- | --- |\n| `-h`, `--help` | — | Flag | Print the version and help, then exit. |\n| `-I`, `--ignorelength` | Off | Flag | Ignore the WAV data-chunk length, for WAV piped from tools that write a placeholder length. |\n| `-S`, `--silent` | Off | Flag | No progress output. |\n| `-R`, `--raw` | Off | Flag | Read headerless PCM described by the `--raw-*` options instead of WAV or CAF. |\n| `--raw-channels N` | `2` | Channel count | Raw channel count. |\n| `--raw-rate N` | `44100` | Hz | Raw sample rate. |\n| `--raw-format SPEC` | `S16L` | `S` or `U` with 8–32 bits, or `F` with 32/64; then `L` or `B` | Raw sample format, case-insensitive (`S24L`, `F32L`). Endianness defaults to little. |\n\n### Metadata\n\nM4A tags. Tags from the input file are copied; these options set or override them.\n\n| Parameter | Default | Values / syntax | Effect |\n| --- | --- | --- | --- |\n| `--title TEXT` | — | Text | Title. |\n| `--artist TEXT` | — | Text | Artist. |\n| `--album TEXT` | — | Text | Album. |\n| `--genre TEXT` | — | Text | Genre. |\n| `--date TEXT` | — | Text | Date. |\n| `--composer TEXT` | — | Text | Composer. |\n| `--grouping TEXT` | — | Text | Grouping. |\n| `--comment TEXT` | — | Text | Comment. |\n| `--album-artist TEXT` | — | Text | Album artist. |\n| `--track N[/TOTAL]` | — | `N` or `N/TOTAL` | Track number. |\n| `--disk N[/TOTAL]` | — | `N` or `N/TOTAL` | Disc number. |\n| `--tempo N` | — | Integer | Tempo (BPM). |\n| `--tag FCC:VALUE` | — | `FCC:VALUE` | Set an iTunes atom by four-character code; a three-character code gets the `©` prefix (`day` → `©day`). |\n| `--tag-from-file FCC:FILE` | — | `FCC:FILE` | As `--tag`, with the value read from a file. |\n| `--long-tag NAME:VALUE` | — | `NAME:VALUE` | Custom iTunes (`----`) tag. |\n| `--tag-from-json FILE[?PATH]` | — | `FILE` or `FILE?dotted.path` | Read tags from a JSON object, e.g. `ffprobe -print_format json -show_format` output with `?format.tags`. |\n"
}
