c1db2632 |
1 | .TH FDKAAC 1 "November, 2013" |
30c77dfb |
2 | .SH NAME |
c1db2632 |
3 | .PP |
4 | fdkaac - command line frontend for libfdk-aac encoder \ |
30c77dfb |
5 | .SH SYNOPSIS |
c1db2632 |
6 | .PP |
7 | \f[B]fdkaac\f[] [OPTIONS] [FILE] |
30c77dfb |
8 | .SH DESCRIPTION |
c1db2632 |
9 | .PP |
10 | \f[B]fdkaac\f[] reads linear PCM audio in either WAV, raw PCM, or CAF |
11 | format, and encodes it into either M4A / AAC file. |
12 | .PP |
30c77dfb |
13 | If the input file is "-", data is read from stdin. |
14 | Likewise, if the output file is "-", data is written to stdout if one of |
c1db2632 |
15 | streamable AAC transport formats is selected by \f[B]-f\f[]. |
16 | .PP |
30c77dfb |
17 | When CAF input and M4A output is used, tags in CAF file are copied into |
18 | the resulting M4A. |
c1db2632 |
19 | \ |
30c77dfb |
20 | .SH OPTIONS |
c1db2632 |
21 | .TP |
22 | .B -h, --help |
30c77dfb |
23 | Show command help |
c1db2632 |
24 | .RS |
25 | .RE |
26 | .TP |
27 | .B -o <FILE> |
30c77dfb |
28 | Output filename. |
c1db2632 |
29 | .RS |
30 | .RE |
31 | .TP |
32 | .B -p, --profile <n> |
30c77dfb |
33 | Target profile (MPEG4 audio object type, AOT) |
34 | .RS |
c1db2632 |
35 | .TP |
36 | .B 2 |
30c77dfb |
37 | MPEG-4 AAC LC (default) |
c1db2632 |
38 | .RS |
39 | .RE |
40 | .TP |
41 | .B 5 |
30c77dfb |
42 | MPEG-4 HE-AAC (SBR) |
c1db2632 |
43 | .RS |
44 | .RE |
45 | .TP |
46 | .B 29 |
30c77dfb |
47 | MPEG-4 HE-AAC v2 (SBR+PS) |
c1db2632 |
48 | .RS |
49 | .RE |
50 | .TP |
51 | .B 23 |
30c77dfb |
52 | MPEG-4 AAC LD |
c1db2632 |
53 | .RS |
54 | .RE |
55 | .TP |
56 | .B 39 |
30c77dfb |
57 | MPEG-4 AAC ELD |
c1db2632 |
58 | .RS |
59 | .RE |
60 | .TP |
61 | .B 129 |
30c77dfb |
62 | MPEG-2 AAC LC |
c1db2632 |
63 | .RS |
64 | .RE |
65 | .TP |
66 | .B 132 |
30c77dfb |
67 | MPEG-2 HE-AAC (SBR) |
c1db2632 |
68 | .RS |
69 | .RE |
70 | .TP |
71 | .B 156 |
30c77dfb |
72 | MPEG-2 HE-AAC v2 (SBR+PS) |
c1db2632 |
73 | .RS |
30c77dfb |
74 | .RE |
c1db2632 |
75 | .RE |
76 | .TP |
77 | .B -b, --bitrate <n> |
30c77dfb |
78 | Target bitrate (for CBR) |
30c77dfb |
79 | .RS |
c1db2632 |
80 | .RE |
81 | .TP |
82 | .B -m, --bitrate-mode <n> |
83 | Bitrate configuration mode. |
84 | Available VBR quality value depends on other parameters such as profile, |
85 | sample rate, or number of channels. |
86 | .RS |
87 | .TP |
88 | .B 0 |
30c77dfb |
89 | CBR (default) |
c1db2632 |
90 | .RS |
91 | .RE |
92 | .TP |
93 | .B 1-5 |
30c77dfb |
94 | VBR (higher value -> higher bitrate) |
c1db2632 |
95 | .RS |
96 | .RE |
30c77dfb |
97 | .RE |
c1db2632 |
98 | .TP |
99 | .B -w, --bandwith <n> |
100 | Frequency bandwith (lowpass cut-off frequency) in Hz. |
101 | Available on AAC LC only. |
30c77dfb |
102 | .RS |
c1db2632 |
103 | .RE |
104 | .TP |
105 | .B -a, --afterburner <n> |
106 | Configure afterburner mode. |
107 | When enabled, quality is increased at the expense of additional |
108 | computational workload. |
109 | .RS |
110 | .TP |
111 | .B 0 |
30c77dfb |
112 | Off |
c1db2632 |
113 | .RS |
114 | .RE |
115 | .TP |
116 | .B 1 |
30c77dfb |
117 | On (default) |
c1db2632 |
118 | .RS |
30c77dfb |
119 | .RE |
c1db2632 |
120 | .RE |
121 | .TP |
122 | .B -L, --lowdelay-sbr <n> |
30c77dfb |
123 | Configure SBR activity on AAC ELD. |
124 | .RS |
c1db2632 |
125 | .TP |
126 | .B -1 |
30c77dfb |
127 | Use ELD SBR auto configuration |
c1db2632 |
128 | .RS |
129 | .RE |
130 | .TP |
131 | .B 0 |
30c77dfb |
132 | Disable SBR on ELD (default) |
c1db2632 |
133 | .RS |
134 | .RE |
135 | .TP |
136 | .B 1 |
30c77dfb |
137 | Enable SBR on ELD |
c1db2632 |
138 | .RS |
139 | .RE |
30c77dfb |
140 | .RE |
c1db2632 |
141 | .TP |
142 | .B -s, --sbr-ratio <n> |
143 | Controls activation of downsampled SBR. |
30c77dfb |
144 | .RS |
c1db2632 |
145 | .TP |
146 | .B 0 |
30c77dfb |
147 | Use lib default (default) |
c1db2632 |
148 | .RS |
149 | .RE |
150 | .TP |
151 | .B 1 |
30c77dfb |
152 | Use downsampled SBR (default for ELD+SBR) |
c1db2632 |
153 | .RS |
30c77dfb |
154 | .RE |
c1db2632 |
155 | .TP |
156 | .B 2 |
157 | Use dual-rate SBR (default for HE-AAC) |
30c77dfb |
158 | .RS |
c1db2632 |
159 | .RE |
30c77dfb |
160 | .PP |
c1db2632 |
161 | Dual-rate SBR is what is normally used for HE-AAC, where AAC is encoded |
162 | at half the sample rate of SBR, hence "dual rate". |
163 | On the other hand, downsampled SBR uses same sample rate for both of AAC |
164 | and SBR (single rate), therefore downsampled SBR typically consumes more |
165 | bitrate. |
30c77dfb |
166 | .PP |
c1db2632 |
167 | Downsampled SBR is newly introduced feature in FDK encoder library |
168 | version 3.4.12. |
169 | When libfdk-aac in the system doesn\[aq]t support this, dual-rate SBR |
170 | will be used. |
171 | When available, dual-rate SBR is the default for HE-AAC and downsampled |
172 | SBR is the default for ELD+SBR. |
30c77dfb |
173 | .PP |
174 | Note that downsampled HE-AAC is not so common as dual-rate one. |
c1db2632 |
175 | When downsampled HE-AAC is selected, \f[B]fdkaac\f[] is forced to choose |
176 | explicit hierarchical SBR signaling, which (at least) iTunes doesn\[aq]t |
177 | accept. |
30c77dfb |
178 | .RE |
c1db2632 |
179 | .TP |
180 | .B -f, --transport-format <n> |
30c77dfb |
181 | Transport format. |
c1db2632 |
182 | Tagging and gapless playback is only available on M4A. |
183 | Streaming to stdout is only available on others. |
30c77dfb |
184 | .RS |
c1db2632 |
185 | .TP |
186 | .B 0 |
30c77dfb |
187 | M4A (default) |
c1db2632 |
188 | .RS |
189 | .RE |
190 | .TP |
191 | .B 1 |
30c77dfb |
192 | ADIF |
c1db2632 |
193 | .RS |
194 | .RE |
195 | .TP |
196 | .B 2 |
30c77dfb |
197 | ADTS |
c1db2632 |
198 | .RS |
199 | .RE |
200 | .TP |
201 | .B 6 |
30c77dfb |
202 | LATM MCP=1 |
c1db2632 |
203 | .RS |
204 | .RE |
205 | .TP |
206 | .B 7 |
30c77dfb |
207 | LATM MCP=0 |
c1db2632 |
208 | .RS |
209 | .RE |
210 | .TP |
211 | .B 10 |
30c77dfb |
212 | LOAS/LATM (LATM within LOAS) |
c1db2632 |
213 | .RS |
30c77dfb |
214 | .RE |
c1db2632 |
215 | .RE |
216 | .TP |
217 | .B -C, --adts-crc-check |
30c77dfb |
218 | Add CRC protection on ADTS header. |
c1db2632 |
219 | .RS |
220 | .RE |
221 | .TP |
222 | .B -h, --header-period <n> |
30c77dfb |
223 | StreamMuxConfig/PCE repetition period in transport layer. |
c1db2632 |
224 | .RS |
225 | .RE |
226 | .TP |
227 | .B -G, --gapless-mode <n> |
228 | Method to declare amount of encoder delay (and padding) in M4A |
229 | container. |
30c77dfb |
230 | These values are mandatory for proper gapless playback on player side. |
231 | .RS |
c1db2632 |
232 | .TP |
233 | .B 0 |
30c77dfb |
234 | iTunSMPB (default) |
c1db2632 |
235 | .RS |
236 | .RE |
237 | .TP |
238 | .B 1 |
30c77dfb |
239 | ISO standard (edts and sgpd) |
c1db2632 |
240 | .RS |
241 | .RE |
242 | .TP |
243 | .B 2 |
30c77dfb |
244 | Both |
c1db2632 |
245 | .RS |
246 | .RE |
30c77dfb |
247 | .RE |
c1db2632 |
248 | .TP |
249 | .B --include-sbr-delay |
30c77dfb |
250 | When specified, count SBR decoder delay in encoder delay. |
c1db2632 |
251 | .RS |
252 | .PP |
30c77dfb |
253 | This is not iTunes compatible and will lead to gapless playback issue on |
254 | LC only decoder, but this is the default behavior of FDK library. |
c1db2632 |
255 | .PP |
30c77dfb |
256 | Whether counting SBR decoder delay in encoder delay or not result in |
c1db2632 |
257 | incompatibility in gapless playback. |
258 | You should pick which one will work for your favorite player. |
259 | .PP |
260 | However, it\[aq]s better not to choose SBR at all if you want gapless |
261 | playback. |
262 | LC doesn\[aq]t have such issues. |
263 | .RE |
264 | .TP |
265 | .B -I, --ignorelength |
30c77dfb |
266 | Ignore length field of data chunk in input WAV file. |
c1db2632 |
267 | .RS |
268 | .RE |
269 | .TP |
270 | .B -S, --silent |
271 | Don\[aq]t print progress messages. |
272 | .RS |
273 | .RE |
274 | .TP |
275 | .B --moov-before-mdat |
30c77dfb |
276 | Place moov box before mdat box in M4A container. |
c1db2632 |
277 | This option might be important for some hardware players, that are known |
278 | to refuse moov box placed after mdat box. |
279 | .RS |
280 | .RE |
281 | .TP |
282 | .B -R, --raw |
30c77dfb |
283 | Regard input as raw PCM. |
c1db2632 |
284 | .RS |
285 | .RE |
286 | .TP |
287 | .B --raw-channels <n> |
30c77dfb |
288 | Specify number of channels of raw input (default: 2) |
c1db2632 |
289 | .RS |
290 | .RE |
291 | .TP |
292 | .B --raw-rate <n> |
30c77dfb |
293 | Specify sample rate of raw input (default: 44100) |
c1db2632 |
294 | .RS |
295 | .RE |
296 | .TP |
297 | .B --raw-format <spec> |
30c77dfb |
298 | Specify sample format of raw input (default: "S16L"). |
c1db2632 |
299 | \f[B]Spec\f[] is as the following (case insensitive): |
300 | .RS |
301 | .TP |
302 | .B 1st char -- type of sample |
303 | \f[B]S\f[] (igned) | \f[B]U\f[] (nsigned) | \f[B]F\f[] (loat) |
304 | .RS |
305 | .RE |
306 | .TP |
307 | .B 2nd part (in digits) |
30c77dfb |
308 | bits per channel |
c1db2632 |
309 | .RS |
310 | .RE |
311 | .TP |
312 | .B Last char -- endianness (can be ommited) |
313 | \f[B]L\f[] (ittle, default) | \f[B]B\f[] (ig) |
314 | .RS |
315 | .RE |
316 | .RE |
317 | .TP |
318 | .B --title <string> |
30c77dfb |
319 | Set title tag. |
c1db2632 |
320 | .RS |
321 | .RE |
322 | .TP |
323 | .B --artist <string> |
30c77dfb |
324 | Set artist tag. |
c1db2632 |
325 | .RS |
326 | .RE |
327 | .TP |
328 | .B --album <string> |
30c77dfb |
329 | Set album tag. |
c1db2632 |
330 | .RS |
331 | .RE |
332 | .TP |
333 | .B --genre <string> |
30c77dfb |
334 | Set genre tag. |
c1db2632 |
335 | .RS |
336 | .RE |
337 | .TP |
338 | .B --date <string> |
30c77dfb |
339 | Set date tag. |
c1db2632 |
340 | .RS |
341 | .RE |
342 | .TP |
343 | .B --composer <string> |
30c77dfb |
344 | Set composer tag. |
c1db2632 |
345 | .RS |
346 | .RE |
347 | .TP |
348 | .B --grouping <string> |
30c77dfb |
349 | Set grouping tag. |
c1db2632 |
350 | .RS |
351 | .RE |
352 | .TP |
353 | .B --comment <string> |
30c77dfb |
354 | Set comment tag. |
c1db2632 |
355 | .RS |
356 | .RE |
357 | .TP |
358 | .B --album-artist <string> |
30c77dfb |
359 | Set album artist tag. |
c1db2632 |
360 | .RS |
361 | .RE |
362 | .TP |
363 | .B --track <number[/total]> |
30c77dfb |
364 | Set track tag, with or without number of total tracks. |
c1db2632 |
365 | .RS |
366 | .RE |
367 | .TP |
368 | .B --disk <number[/total]> |
30c77dfb |
369 | Set disk tag, with or without number of total discs. |
c1db2632 |
370 | .RS |
371 | .RE |
372 | .TP |
373 | .B --tempo <n> |
30c77dfb |
374 | Set tempo (BPM) tag. |
c1db2632 |
375 | .RS |
376 | .RE |
377 | .TP |
378 | .B --tag <fcc>:<value> |
30c77dfb |
379 | Set iTunes predefined tag with explicit fourcc key and value. |
30c77dfb |
380 | See |
c1db2632 |
381 | https://code.google.com/p/mp4v2/wiki/iTunesMetadata (https://code.google.com/p/mp4v2/wiki/iTunesMetadata) |
30c77dfb |
382 | for known predefined keys. |
c1db2632 |
383 | You can omit first char of \f[B]fcc\f[] when it is the copyright sign. |
30c77dfb |
384 | .RS |
30c77dfb |
385 | .RE |
c1db2632 |
386 | .TP |
387 | .B --tag-from-file <fcc>:<filename> |
388 | Same as --tag, but set content of file as tag value. |
30c77dfb |
389 | .RS |
30c77dfb |
390 | .RE |
c1db2632 |
391 | .TP |
392 | .B --long-tag <name>:<value> |
393 | Set arbitrary tag as iTunes custom metadata. |
394 | Stored in com.apple.iTunes field. |
30c77dfb |
395 | .RS |
30c77dfb |
396 | .RE |
c1db2632 |
397 | .TP |
398 | .B --tag-from-json <filename[?dot_notation]> |
399 | Read tags from JSON. |
400 | By default, tags are assumed to be direct children of the root object in |
401 | JSON. |
402 | Optionary you can speficy arbitrary dot notation to locate the object |
403 | containing tags. |
30c77dfb |
404 | .RS |
30c77dfb |
405 | .RE |
c1db2632 |
406 | .PP |
407 | \ |
408 | .SH EXAMPLES |
409 | .PP |
410 | Encode WAV file into a M4A file. |
411 | MPEG4 AAC LC, VBR quality 3: |
412 | .IP |
413 | .nf |
414 | \f[C] |
415 | fdkaac\ -m3\ foo.wav |
416 | \f[] |
417 | .fi |
418 | .PP |
419 | Encode WAV file into a M4A file. |
420 | MPEG4 HE-AAC, bitrate 64kbps: |
421 | .IP |
422 | .nf |
423 | \f[C] |
424 | fdkaac\ -p5\ -b64\ foo.wav |
425 | \f[] |
426 | .fi |
427 | .PP |
428 | Piping from \f[B]ffmpeg\f[] (you need version supporting CAF output): |
429 | .IP |
430 | .nf |
431 | \f[C] |
432 | ffmpeg\ -i\ foo.flac\ -f\ caf\ -\ |\ fdkaac\ -b128\ -\ -o\ foo.m4a |
433 | \f[] |
434 | .fi |
435 | .PP |
436 | Import tags via json: |
437 | .IP |
438 | .nf |
439 | \f[C] |
440 | ffprobe\ -v\ 0\ -of\ json\ -show_format\ foo.flac\ >foo.json |
441 | |
442 | flac\ -dc\ foo.flac\ |\ \\ |
443 | fdkaac\ -\ -ox.m4a\ -m2\ --import-tag-from-json=foo.json?format.tags |
444 | \f[] |
445 | .fi |
30c77dfb |
446 | .SH NOTES |
30c77dfb |
447 | .PP |
448 | Upto 32bit integer or 64bit floating point format is supported as input. |
c1db2632 |
449 | However, FDK library is implemented based on fixed point math and only |
450 | supports 16bit integer PCM. |
451 | Therefore, be careful of clipping. |
452 | You might want to dither/noise shape beforehand when your input has |
453 | higher resolution. |
30c77dfb |
454 | .PP |
455 | Following channel layouts are supported by the encoder. |
c1db2632 |
456 | .TP |
457 | .B 1ch |
30c77dfb |
458 | C |
c1db2632 |
459 | .RS |
460 | .RE |
461 | .TP |
462 | .B 2ch |
30c77dfb |
463 | L R |
c1db2632 |
464 | .RS |
465 | .RE |
466 | .TP |
467 | .B 3ch |
30c77dfb |
468 | C L R |
c1db2632 |
469 | .RS |
470 | .RE |
471 | .TP |
472 | .B 4ch |
30c77dfb |
473 | C L R Cs |
c1db2632 |
474 | .RS |
475 | .RE |
476 | .TP |
477 | .B 5ch |
30c77dfb |
478 | C L R Ls Rs |
c1db2632 |
479 | .RS |
480 | .RE |
481 | .TP |
482 | .B 5.1ch |
30c77dfb |
483 | C L R Ls Rs LFE |
c1db2632 |
484 | .RS |
485 | .RE |
486 | .TP |
487 | .B 7.1ch (front) |
488 | C Lc Rc L R Ls Rs LFE |
489 | .RS |
490 | .RE |
491 | .TP |
492 | .B 7.1ch (rear) |
493 | C L R Ls Rs Rls Rrs LFE |
494 | .RS |
30c77dfb |
495 | .RE |
30c77dfb |
496 | .SH AUTHORS |
c1db2632 |
497 | nu774 <honeycomb77@gmail.com>. |