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