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