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