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