2 % nu774 <honeycomb77@gmail.com>
8 fdkaac - command line frontend for libfdk-aac encoder
13 **fdkaac** [OPTIONS] [FILE]
18 **fdkaac** reads linear PCM audio in either WAV, raw PCM, or CAF format,
19 and encodes it into either M4A / AAC file.
21 If the input file is "-", data is read from stdin. Likewise, if the
22 output file is "-", data is written to stdout if one of streamable AAC
23 transport formats are selected by **-f**.
25 When CAF input and M4A output is used, tags in CAF file are copied into
38 : Target profile (MPEG4 audio object type, AOT)
41 : MPEG-4 AAC LC (default)
47 : MPEG-4 HE-AAC v2 (SBR+PS)
62 : MPEG-2 HE-AAC v2 (SBR+PS)
65 : Target bitrate (for CBR)
67 -m, --bitrate-mode \<n\>
68 : Bitrate configuration mode. Available VBR quality value depends on
69 other parameters such as profile, sample rate, or number of
76 : VBR (higher value -\> higher bitrate)
79 : Frequency bandwidth (lowpass cut-off frequency) in Hz. Available on
82 -a, --afterburner \<n\>
83 : Configure afterburner mode. When enabled, quality is increased at
84 the expense of additional computational workload.
92 -L, --lowdelay-sbr \<n\>
93 : Configure SBR activity on AAC ELD.
96 : Use ELD SBR auto configuration
99 : Disable SBR on ELD (default)
104 -s, --sbr-ratio \<n\>
105 : Controls activation of downsampled SBR.
108 : Use lib default (default)
111 : Use downsampled SBR (default for ELD+SBR)
114 : Use dual-rate SBR (default for HE-AAC)
116 Dual-rate SBR is what is normally used for HE-AAC, where AAC is
117 encoded at half the sample rate of SBR, hence "dual rate". On the
118 other hand, downsampled SBR uses same sample rate for both of AAC
119 and SBR (single rate), therefore downsampled SBR typically consumes
122 Downsampled SBR is newly introduced feature in FDK encoder library
123 version 3.4.12. When libfdk-aac in the system doesn't support this,
124 dual-rate SBR will be used. When available, dual-rate SBR is the
125 default for HE-AAC and downsampled SBR is the default for ELD+SBR.
127 Note that downsampled HE-AAC is not so common as dual-rate one. When
128 downsampled HE-AAC is selected, **fdkaac** is forced to choose
129 explicit hierarchical SBR signaling, which (at least) iTunes doesn't
132 -f, --transport-format \<n\>
133 : Transport format. Tagging and gapless playback is only available on
134 M4A. Streaming to stdout is only available on others.
152 : LOAS/LATM (LATM within LOAS)
155 : Add CRC protection on ADTS header.
157 -h, --header-period \<n\>
158 : StreamMuxConfig/PCE repetition period in the transport layer.
160 -G, --gapless-mode \<n\>
161 : Method to declare amount of encoder delay (and padding) in M4A
162 container. These values are mandatory for proper gapless playback on
169 : ISO standard (edts and sgpd)
175 : When specified, count SBR decoder delay in encoder delay.
177 This is not iTunes compatible and will lead to gapless playback
178 issue on LC only decoder, but this is the default behavior of FDK
181 Whether counting SBR decoder delay in encoder delay or not result in
182 incompatibility in gapless playback. You should pick which one will
183 work for your favorite player.
185 However, it's better not to choose SBR at all if you want gapless
186 playback. LC doesn't have such issues.
189 : Ignore length field of data chunk in input WAV file.
192 : Don't print progress messages.
195 : Place moov box before mdat box in M4A container. This option might
196 be important for some hardware players, that are known to refuse
197 moov box placed after mdat box.
200 : Regard input as raw PCM.
203 : Specify number of channels of raw input (default: 2)
206 : Specify sample rate of raw input (default: 44100)
208 --raw-format \<spec\>
209 : Specify sample format of raw input (default: "S16L"). **Spec** is as
210 the following (case insensitive):
212 1st char -- type of sample
213 : **S** (igned) | **U** (nsigned) | **F** (loat)
218 Last char -- endianness (can be omitted)
219 : **L** (ittle, default) | **B** (ig)
236 --composer \<string\>
239 --grouping \<string\>
245 --album-artist \<string\>
246 : Set album artist tag.
248 --track \<number[/total]\>
249 : Set track tag, with or without number of total tracks.
251 --disk \<number[/total]\>
252 : Set disk tag, with or without number of total discs.
255 : Set tempo (BPM) tag.
257 --tag \<fcc\>:\<value\>
258 : Set iTunes predefined tag with explicit fourcc key and value. See
259 [https://code.google.com/p/mp4v2/wiki/iTunesMetadata](https://code.google.com/p/mp4v2/wiki/iTunesMetadata)
260 for known predefined keys. You can omit first char of **fcc** when
261 it is the copyright sign.
263 --tag-from-file \<fcc\>:\<filename\>
264 : Same as --tag, but set content of file as tag value.
266 --long-tag \<name\>:\<value\>
267 : Set arbitrary tag as iTunes custom metadata. Stored in
268 com.apple.iTunes field.
270 --tag-from-json \<filename[?dot\_notation]\>
271 : Read tags from JSON. By default, tags are assumed to be direct
272 children of the root object in JSON. Optionally you can specify
273 arbitrary dot notation to locate the object containing tags.
279 Encode WAV file into a M4A file. MPEG4 AAC LC, VBR quality 3:
283 Encode WAV file into a M4A file. MPEG4 HE-AAC, bitrate 64kbps:
285 fdkaac -p5 -b64 foo.wav
287 Piping from **ffmpeg** (you need version supporting CAF output):
289 ffmpeg -i foo.flac -f caf - | fdkaac -b128 - -o foo.m4a
291 Import tags via json:
293 ffprobe -v 0 -of json -show_format foo.flac >foo.json
295 flac -dc foo.flac | \
296 fdkaac - -ox.m4a -m2 --import-tag-from-json=foo.json?format.tags
301 Upto 32bit integer or 64bit floating point format is supported as input.
302 However, FDK library is implemented based on fixed point math and only
303 supports 16bit integer PCM. Therefore, be wary of clipping. You might
304 want to dither/noise shape beforehand when your input has higher
307 Following channel layouts are supported by the encoder.
328 : C Lc Rc L R Ls Rs LFE
331 : C L R Ls Rs Rls Rrs LFE