FDKAAC(1)
π FDKAAC β the manual page, but make it make sense π
okay bestie, welcome to fdkaac β it's the command line frontend for the libfdk-aac encoder. yes the whole man page. yes i'm gonna walk you through every single flag. grab a strawberry π and let's go.
β¨ SYNOPSIS β¨
fdkaac [OPTIONS] [FILE]
πΈ DESCRIPTION πΈ
so fdkaac reads linear PCM audio in either WAV, raw PCM, or CAF format, and encodes it into either an M4A / AAC file. that's the whole glow-up pipeline, no cap. π
if the input file is -, data gets read from stdin. same energy on the other side: if the output file is -, data is written to stdout β but only if one of the streamable AAC transport formats is selected with -f. (so like, pick your format first, then stream, mwah π)
and when you're using CAF input with M4A output? the tags in the CAF file get copied straight into the resulting M4A. cute, right? π
π OPTIONS π
so many. all of them. here we go, i'm not skipping a single one, periodt.
-h,--helpβ show command help. the "help me help you" flag π«Ά-o <FILE>β output filename. yes it's just-o, there's no long version, don't come for me.-p,--profile <n>β target profile (MPEG4 audio object type, AOT). this is your whole vibe check for the audio:2β MPEG-4 AAC LC (default) β5β MPEG-4 HE-AAC (SBR)29β MPEG-4 HE-AAC v2 (SBR+PS)23β MPEG-4 AAC LD39β MPEG-4 AAC ELD
-b,--bitrate <n>β target bitrate (for CBR). it's giving "how much data per second, bestie".-m,--bitrate-mode <n>β bitrate configuration mode. heads up: the available VBR quality value depends on other parameters such as profile, sample rate, or number of channels. it's all connected, iykyk.0β CBR (default)1-5β VBR (higher value -> higher bitrate)
-w,--bandwidth <n>β frequency bandwidth (lowpass cut-off frequency) in Hz. and lowkey important: this is available on AAC LC only. π-a,--afterburner <n>β configure afterburner mode. when enabled, quality is increased at the expense of additional computational workload. yes it costs CPU. yes it's worth it. π0β Off1β On (default)
-L,--lowdelay-sbr <n>β configure SBR activity on AAC ELD.-1β Use ELD SBR auto configuration0β Disable SBR on ELD (default)1β Enable SBR on ELD
-s,--sbr-ratio <n>β controls activation of downsampled SBR.0β Use lib default (default)1β Use downsampled SBR (default for ELD+SBR)2β Use dual-rate SBR (default for HE-AAC)
okay so let me explain this because it's a whole thing. Dual-rate SBR is what is normally used for HE-AAC, where AAC is encoded at half the sample rate of SBR, hence "dual rate". on the other hand, downsampled SBR uses same sample rate for both of AAC and SBR (single rate), therefore downsampled SBR typically consumes more bitrate.
downsampled SBR is a newly introduced feature in FDK encoder library version 3.4.12. when libfdk-aac in the system doesn't support this, dual-rate SBR will be used. when available, dual-rate SBR is the default for HE-AAC and downsampled SBR is the default for ELD+SBR.
note that downsampled HE-AAC is not so common as dual-rate one. when downsampled HE-AAC is selected, fdkaac is forced to choose explicit hierarchical SBR signaling, which (at least) iTunes doesn't accept. so likeβ¦ be aware. π
-f,--transport-format <n>β transport format. tagging and gapless playback is only available on M4A. streaming to stdout is only available on others. pick your struggle, bestie.0β M4A (default)1β ADIF2β ADTS6β LATM MCP=17β LATM MCP=010β LOAS/LATM (LATM within LOAS)
-C,--adts-crc-checkβ add CRC protection on ADTS header. protective queen. π‘οΈ-h,--header-period <n>β StreamMuxConfig/PCE repetition period in the transport layer. (yes-hshows up twice in this page. i don't make the rules, i just report them faithfully. π )-G,--gapless-mode <n>β method to declare amount of encoder delay (and padding) in M4A container. these values are mandatory for proper gapless playback on player side. no skipping, no gaps, just vibes.0β iTunSMPB (default)1β ISO standard (edts and sgpd)2β Both
--include-sbr-delayβ when specified, count SBR decoder delay in encoder delay.
this is not iTunes compatible and will lead to gapless playback issue on LC only decoder, but this is the default behavior of FDK library. π¬
whether counting SBR decoder delay in encoder delay or not result in incompatibility in gapless playback. you should pick which one will work for your favorite player.
however, it's better not to choose SBR at all if you want gapless playback. LC doesn't have such issues. LC is the safe bestie. π
-I,--ignorelengthβ ignore length field of data chunk in input WAV file. chaotic but sometimes necessary.-S,--silentβ don't print progress messages. quiet main character energy. π€«--moov-before-mdatβ place moov box before mdat box in M4A container. this option might be important for some hardware players, that are known to refuse moov box placed after mdat box. old hardware is so picky fr fr.-R,--rawβ regard input as raw PCM. no headers, no context, just data.--raw-channels <n>β specify number of channels of raw input (default:2)--raw-rate <n>β specify sample rate of raw input (default:44100)--raw-format <spec>β specify sample format of raw input (default:"S16L"). spec is as the following (case insensitive):- 1st char β type of sample:
S(igned) |U(nsigned) |F(loat) - 2nd part (in digits): bits per channel
- Last char β endianness (can be omitted):
L(ittle, default) |B(ig)
- 1st char β type of sample:
so like, decode the spec like a little puzzle. slay. π§©
--title <string>β set title tag.--artist <string>β set artist tag.--album <string>β set album tag.--genre <string>β set genre tag.--date <string>β set date tag.--composer <string>β set composer tag.--grouping <string>β set grouping tag.--comment <string>β set comment tag.--album-artist <string>β set album artist tag.--track <number[/total]>β set track tag, with or without number of total tracks. the[/total]part is optional, she's flexible. π--disk <number[/total]>β set disk tag, with or without number of total discs.--tempo <n>β set tempo (BPM) tag.--tag <fcc>:<value>β set iTunes predefined tag with explicit fourcc key and value. see <https://code.google.com/p/mp4v2/wiki/iTunesMetadata> for known predefined keys. you can omit first char of fcc when it is the copyright sign.--tag-from-file <fcc>:<filename>β same as--tag, but set content of file as tag value. tag from a whole file, iconic. π--long-tag <name>:<value>β set arbitrary tag as iTunes custom metadata. stored incom.apple.iTunesfield.--tag-from-json <filename[?dot_notation]>β read tags from JSON. by default, tags are assumed to be direct children of the root object in JSON. optionally you can specify arbitrary dot notation to locate the object containing tags.
π¦ EXAMPLES π¦
encode WAV file into a M4A file. MPEG4 AAC LC, VBR quality 3:
fdkaac -m3 foo.wav
encode WAV file into a M4A file. MPEG4 HE-AAC, bitrate 64kbps:
fdkaac -p5 -b64 foo.wav
piping from ffmpeg (you need version supporting CAF output):
ffmpeg -i foo.flac -f caf - | fdkaac -b128 - -o foo.m4a
import tags via json:
ffprobe -v 0 -of json -show_format foo.flac >foo.json
flac -dc foo.flac | \
fdkaac - -ox.m4a -m2 --import-tag-from-json=foo.json?format.tags
π NOTES π
upto 32bit integer or 64bit floating point format is supported as input. however, FDK library is implemented based on fixed point math and only supports 16bit integer PCM. therefore, be wary of clipping. you might want to dither/noise shape beforehand when your input has higher resolution.
translation bestie: your fancy high-res file is gonna get squeezed and it might clip. dither or noise shape first, okay? don't say i didn't warn you. π
following channel layouts are supported by the encoder:
1chβC2chβL R3chβC L R4chβC L R Cs5chβC L R Ls Rs5.1chβC L R Ls Rs LFE7.1ch(front) βC Lc Rc L R Ls Rs LFE7.1ch(rear) βC L R Ls Rs Rls Rrs LFE
π AUTHORS π
nu774 <honeycomb77@gmail.com>. absolute legend, we love her. π
and that's the whole page, bestie β every flag, every default, every little warning, all of it, untouched facts with extra sparkle on top. this one's from November, 2013, and yeah, it's the FDKAAC(1) page. go make some beautiful audio, you got this. π¦β¨π
π¦ where this page comes from
- alpine 3.24: fdkaac-doc 1.0.6-r0 Β· BSD-4-Clause AND MIT AND Zlib
- arch rolling: fdkaac 1.0.9-1 Β· Zlib
- fedora 43: fdkaac 1.0.6-6.fc43 Β· Zlib AND MIT AND TU-Berlin-1.0
- fedora 44: fdkaac 1.0.6-6.fc44 Β· Zlib AND MIT AND TU-Berlin-1.0
- nixos 26.05: fdkaac 1.0.7
- nixpkgs unstable: fdkaac 1.0.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms