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