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