]>
Commit | Line | Data |
---|---|---|
1 | .TH FDKAAC 1 "November, 2013" | |
2 | .SH NAME | |
3 | .PP | |
4 | fdkaac - command line frontend for libfdk-aac encoder \ | |
5 | .SH SYNOPSIS | |
6 | .PP | |
7 | \f[B]fdkaac\f[] [OPTIONS] [FILE] | |
8 | .SH DESCRIPTION | |
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 | |
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 | |
15 | streamable AAC transport formats is selected by \f[B]-f\f[]. | |
16 | .PP | |
17 | When CAF input and M4A output is used, tags in CAF file are copied into | |
18 | the resulting M4A. | |
19 | \ | |
20 | .SH OPTIONS | |
21 | .TP | |
22 | .B -h, --help | |
23 | Show command help | |
24 | .RS | |
25 | .RE | |
26 | .TP | |
27 | .B -o <FILE> | |
28 | Output filename. | |
29 | .RS | |
30 | .RE | |
31 | .TP | |
32 | .B -p, --profile <n> | |
33 | Target profile (MPEG4 audio object type, AOT) | |
34 | .RS | |
35 | .TP | |
36 | .B 2 | |
37 | MPEG-4 AAC LC (default) | |
38 | .RS | |
39 | .RE | |
40 | .TP | |
41 | .B 5 | |
42 | MPEG-4 HE-AAC (SBR) | |
43 | .RS | |
44 | .RE | |
45 | .TP | |
46 | .B 29 | |
47 | MPEG-4 HE-AAC v2 (SBR+PS) | |
48 | .RS | |
49 | .RE | |
50 | .TP | |
51 | .B 23 | |
52 | MPEG-4 AAC LD | |
53 | .RS | |
54 | .RE | |
55 | .TP | |
56 | .B 39 | |
57 | MPEG-4 AAC ELD | |
58 | .RS | |
59 | .RE | |
60 | .TP | |
61 | .B 129 | |
62 | MPEG-2 AAC LC | |
63 | .RS | |
64 | .RE | |
65 | .TP | |
66 | .B 132 | |
67 | MPEG-2 HE-AAC (SBR) | |
68 | .RS | |
69 | .RE | |
70 | .TP | |
71 | .B 156 | |
72 | MPEG-2 HE-AAC v2 (SBR+PS) | |
73 | .RS | |
74 | .RE | |
75 | .RE | |
76 | .TP | |
77 | .B -b, --bitrate <n> | |
78 | Target bitrate (for CBR) | |
79 | .RS | |
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 | |
89 | CBR (default) | |
90 | .RS | |
91 | .RE | |
92 | .TP | |
93 | .B 1-5 | |
94 | VBR (higher value -> higher bitrate) | |
95 | .RS | |
96 | .RE | |
97 | .RE | |
98 | .TP | |
99 | .B -w, --bandwith <n> | |
100 | Frequency bandwith (lowpass cut-off frequency) in Hz. | |
101 | Available on AAC LC only. | |
102 | .RS | |
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 | |
112 | Off | |
113 | .RS | |
114 | .RE | |
115 | .TP | |
116 | .B 1 | |
117 | On (default) | |
118 | .RS | |
119 | .RE | |
120 | .RE | |
121 | .TP | |
122 | .B -L, --lowdelay-sbr <n> | |
123 | Configure SBR activity on AAC ELD. | |
124 | .RS | |
125 | .TP | |
126 | .B -1 | |
127 | Use ELD SBR auto configuration | |
128 | .RS | |
129 | .RE | |
130 | .TP | |
131 | .B 0 | |
132 | Disable SBR on ELD (default) | |
133 | .RS | |
134 | .RE | |
135 | .TP | |
136 | .B 1 | |
137 | Enable SBR on ELD | |
138 | .RS | |
139 | .RE | |
140 | .RE | |
141 | .TP | |
142 | .B -s, --sbr-ratio <n> | |
143 | Controls activation of downsampled SBR. | |
144 | .RS | |
145 | .TP | |
146 | .B 0 | |
147 | Use lib default (default) | |
148 | .RS | |
149 | .RE | |
150 | .TP | |
151 | .B 1 | |
152 | Use downsampled SBR (default for ELD+SBR) | |
153 | .RS | |
154 | .RE | |
155 | .TP | |
156 | .B 2 | |
157 | Use dual-rate SBR (default for HE-AAC) | |
158 | .RS | |
159 | .RE | |
160 | .PP | |
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. | |
166 | .PP | |
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. | |
173 | .PP | |
174 | Note that downsampled HE-AAC is not so common as dual-rate one. | |
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. | |
178 | .RE | |
179 | .TP | |
180 | .B -f, --transport-format <n> | |
181 | Transport format. | |
182 | Tagging and gapless playback is only available on M4A. | |
183 | Streaming to stdout is only available on others. | |
184 | .RS | |
185 | .TP | |
186 | .B 0 | |
187 | M4A (default) | |
188 | .RS | |
189 | .RE | |
190 | .TP | |
191 | .B 1 | |
192 | ADIF | |
193 | .RS | |
194 | .RE | |
195 | .TP | |
196 | .B 2 | |
197 | ADTS | |
198 | .RS | |
199 | .RE | |
200 | .TP | |
201 | .B 6 | |
202 | LATM MCP=1 | |
203 | .RS | |
204 | .RE | |
205 | .TP | |
206 | .B 7 | |
207 | LATM MCP=0 | |
208 | .RS | |
209 | .RE | |
210 | .TP | |
211 | .B 10 | |
212 | LOAS/LATM (LATM within LOAS) | |
213 | .RS | |
214 | .RE | |
215 | .RE | |
216 | .TP | |
217 | .B -C, --adts-crc-check | |
218 | Add CRC protection on ADTS header. | |
219 | .RS | |
220 | .RE | |
221 | .TP | |
222 | .B -h, --header-period <n> | |
223 | StreamMuxConfig/PCE repetition period in transport layer. | |
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. | |
230 | These values are mandatory for proper gapless playback on player side. | |
231 | .RS | |
232 | .TP | |
233 | .B 0 | |
234 | iTunSMPB (default) | |
235 | .RS | |
236 | .RE | |
237 | .TP | |
238 | .B 1 | |
239 | ISO standard (edts and sgpd) | |
240 | .RS | |
241 | .RE | |
242 | .TP | |
243 | .B 2 | |
244 | Both | |
245 | .RS | |
246 | .RE | |
247 | .RE | |
248 | .TP | |
249 | .B --include-sbr-delay | |
250 | When specified, count SBR decoder delay in encoder delay. | |
251 | .RS | |
252 | .PP | |
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. | |
255 | .PP | |
256 | Whether counting SBR decoder delay in encoder delay or not result in | |
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 | |
266 | Ignore length field of data chunk in input WAV file. | |
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 | |
276 | Place moov box before mdat box in M4A container. | |
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 | |
283 | Regard input as raw PCM. | |
284 | .RS | |
285 | .RE | |
286 | .TP | |
287 | .B --raw-channels <n> | |
288 | Specify number of channels of raw input (default: 2) | |
289 | .RS | |
290 | .RE | |
291 | .TP | |
292 | .B --raw-rate <n> | |
293 | Specify sample rate of raw input (default: 44100) | |
294 | .RS | |
295 | .RE | |
296 | .TP | |
297 | .B --raw-format <spec> | |
298 | Specify sample format of raw input (default: "S16L"). | |
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) | |
308 | bits per channel | |
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> | |
319 | Set title tag. | |
320 | .RS | |
321 | .RE | |
322 | .TP | |
323 | .B --artist <string> | |
324 | Set artist tag. | |
325 | .RS | |
326 | .RE | |
327 | .TP | |
328 | .B --album <string> | |
329 | Set album tag. | |
330 | .RS | |
331 | .RE | |
332 | .TP | |
333 | .B --genre <string> | |
334 | Set genre tag. | |
335 | .RS | |
336 | .RE | |
337 | .TP | |
338 | .B --date <string> | |
339 | Set date tag. | |
340 | .RS | |
341 | .RE | |
342 | .TP | |
343 | .B --composer <string> | |
344 | Set composer tag. | |
345 | .RS | |
346 | .RE | |
347 | .TP | |
348 | .B --grouping <string> | |
349 | Set grouping tag. | |
350 | .RS | |
351 | .RE | |
352 | .TP | |
353 | .B --comment <string> | |
354 | Set comment tag. | |
355 | .RS | |
356 | .RE | |
357 | .TP | |
358 | .B --album-artist <string> | |
359 | Set album artist tag. | |
360 | .RS | |
361 | .RE | |
362 | .TP | |
363 | .B --track <number[/total]> | |
364 | Set track tag, with or without number of total tracks. | |
365 | .RS | |
366 | .RE | |
367 | .TP | |
368 | .B --disk <number[/total]> | |
369 | Set disk tag, with or without number of total discs. | |
370 | .RS | |
371 | .RE | |
372 | .TP | |
373 | .B --tempo <n> | |
374 | Set tempo (BPM) tag. | |
375 | .RS | |
376 | .RE | |
377 | .TP | |
378 | .B --tag <fcc>:<value> | |
379 | Set iTunes predefined tag with explicit fourcc key and value. | |
380 | See | |
381 | https://code.google.com/p/mp4v2/wiki/iTunesMetadata (https://code.google.com/p/mp4v2/wiki/iTunesMetadata) | |
382 | for known predefined keys. | |
383 | You can omit first char of \f[B]fcc\f[] when it is the copyright sign. | |
384 | .RS | |
385 | .RE | |
386 | .TP | |
387 | .B --tag-from-file <fcc>:<filename> | |
388 | Same as --tag, but set content of file as tag value. | |
389 | .RS | |
390 | .RE | |
391 | .TP | |
392 | .B --long-tag <name>:<value> | |
393 | Set arbitrary tag as iTunes custom metadata. | |
394 | Stored in com.apple.iTunes field. | |
395 | .RS | |
396 | .RE | |
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. | |
404 | .RS | |
405 | .RE | |
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 | |
446 | .SH NOTES | |
447 | .PP | |
448 | Upto 32bit integer or 64bit floating point format is supported as input. | |
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. | |
454 | .PP | |
455 | Following channel layouts are supported by the encoder. | |
456 | .TP | |
457 | .B 1ch | |
458 | C | |
459 | .RS | |
460 | .RE | |
461 | .TP | |
462 | .B 2ch | |
463 | L R | |
464 | .RS | |
465 | .RE | |
466 | .TP | |
467 | .B 3ch | |
468 | C L R | |
469 | .RS | |
470 | .RE | |
471 | .TP | |
472 | .B 4ch | |
473 | C L R Cs | |
474 | .RS | |
475 | .RE | |
476 | .TP | |
477 | .B 5ch | |
478 | C L R Ls Rs | |
479 | .RS | |
480 | .RE | |
481 | .TP | |
482 | .B 5.1ch | |
483 | C L R Ls Rs LFE | |
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 | |
495 | .RE | |
496 | .SH AUTHORS | |
497 | nu774 <honeycomb77@gmail.com>. |