New upstream version 1.0.0
[fdkaac.git] / README
CommitLineData
c1db2632 1% FDKAAC(1)
2% nu774 <honeycomb77@gmail.com>
3% November, 2013
4
5NAME
6====
7
472e82e4 8fdkaac - command line frontend for libfdk-aac encoder
c1db2632 9
10SYNOPSIS
11========
12
13**fdkaac** [OPTIONS] [FILE]
14
15DESCRIPTION
16===========
17
18**fdkaac** reads linear PCM audio in either WAV, raw PCM, or CAF format,
19and encodes it into either M4A / AAC file.
20
21If the input file is "-", data is read from stdin. Likewise, if the
22output file is "-", data is written to stdout if one of streamable AAC
a26e3cf3 23transport formats are selected by **-f**.
c1db2632 24
25When CAF input and M4A output is used, tags in CAF file are copied into
472e82e4 26the resulting M4A.
c1db2632 27
28OPTIONS
29=======
30
31-h, --help
32: Show command help
33
34-o \<FILE\>
35: Output filename.
36
37-p, --profile \<n\>
38: Target profile (MPEG4 audio object type, AOT)
39
40 2
41 : MPEG-4 AAC LC (default)
42
43 5
44 : MPEG-4 HE-AAC (SBR)
45
46 29
47 : MPEG-4 HE-AAC v2 (SBR+PS)
48
49 23
50 : MPEG-4 AAC LD
51
52 39
53 : MPEG-4 AAC ELD
54
c1db2632 55-b, --bitrate \<n\>
56: Target bitrate (for CBR)
57
58-m, --bitrate-mode \<n\>
59: Bitrate configuration mode. Available VBR quality value depends on
60 other parameters such as profile, sample rate, or number of
61 channels.
62
63 0
64 : CBR (default)
65
66 1-5
67 : VBR (higher value -\> higher bitrate)
68
ce0833f8
RB
69-w, --bandwidth \<n\>
70: Frequency bandwidth (lowpass cut-off frequency) in Hz. Available on
c1db2632 71 AAC LC only.
72
73-a, --afterburner \<n\>
74: Configure afterburner mode. When enabled, quality is increased at
75 the expense of additional computational workload.
76
77 0
78 : Off
79
80 1
81 : On (default)
82
83-L, --lowdelay-sbr \<n\>
84: Configure SBR activity on AAC ELD.
85
86 -1
87 : Use ELD SBR auto configuration
88
89 0
90 : Disable SBR on ELD (default)
91
92 1
93 : Enable SBR on ELD
94
95-s, --sbr-ratio \<n\>
96: Controls activation of downsampled SBR.
97
98 0
99 : Use lib default (default)
100
101 1
102 : Use downsampled SBR (default for ELD+SBR)
103
104 2
105 : Use dual-rate SBR (default for HE-AAC)
106
107 Dual-rate SBR is what is normally used for HE-AAC, where AAC is
108 encoded at half the sample rate of SBR, hence "dual rate". On the
109 other hand, downsampled SBR uses same sample rate for both of AAC
110 and SBR (single rate), therefore downsampled SBR typically consumes
111 more bitrate.
112
113 Downsampled SBR is newly introduced feature in FDK encoder library
114 version 3.4.12. When libfdk-aac in the system doesn't support this,
115 dual-rate SBR will be used. When available, dual-rate SBR is the
116 default for HE-AAC and downsampled SBR is the default for ELD+SBR.
117
118 Note that downsampled HE-AAC is not so common as dual-rate one. When
119 downsampled HE-AAC is selected, **fdkaac** is forced to choose
120 explicit hierarchical SBR signaling, which (at least) iTunes doesn't
121 accept.
122
123-f, --transport-format \<n\>
124: Transport format. Tagging and gapless playback is only available on
125 M4A. Streaming to stdout is only available on others.
126
127 0
128 : M4A (default)
129
130 1
131 : ADIF
132
133 2
134 : ADTS
135
136 6
137 : LATM MCP=1
138
139 7
140 : LATM MCP=0
141
142 10
143 : LOAS/LATM (LATM within LOAS)
144
145-C, --adts-crc-check
146: Add CRC protection on ADTS header.
147
148-h, --header-period \<n\>
a26e3cf3 149: StreamMuxConfig/PCE repetition period in the transport layer.
c1db2632 150
151-G, --gapless-mode \<n\>
152: Method to declare amount of encoder delay (and padding) in M4A
153 container. These values are mandatory for proper gapless playback on
154 player side.
155
156 0
157 : iTunSMPB (default)
158
159 1
160 : ISO standard (edts and sgpd)
161
162 2
163 : Both
164
165--include-sbr-delay
166: When specified, count SBR decoder delay in encoder delay.
167
168 This is not iTunes compatible and will lead to gapless playback
169 issue on LC only decoder, but this is the default behavior of FDK
170 library.
171
172 Whether counting SBR decoder delay in encoder delay or not result in
173 incompatibility in gapless playback. You should pick which one will
174 work for your favorite player.
175
176 However, it's better not to choose SBR at all if you want gapless
177 playback. LC doesn't have such issues.
178
179-I, --ignorelength
180: Ignore length field of data chunk in input WAV file.
181
182-S, --silent
183: Don't print progress messages.
184
185--moov-before-mdat
186: Place moov box before mdat box in M4A container. This option might
187 be important for some hardware players, that are known to refuse
188 moov box placed after mdat box.
189
190-R, --raw
191: Regard input as raw PCM.
192
193--raw-channels \<n\>
194: Specify number of channels of raw input (default: 2)
195
196--raw-rate \<n\>
197: Specify sample rate of raw input (default: 44100)
198
199--raw-format \<spec\>
200: Specify sample format of raw input (default: "S16L"). **Spec** is as
201 the following (case insensitive):
202
203 1st char -- type of sample
204 : **S** (igned) | **U** (nsigned) | **F** (loat)
205
206 2nd part (in digits)
207 : bits per channel
208
a26e3cf3 209 Last char -- endianness (can be omitted)
c1db2632 210 : **L** (ittle, default) | **B** (ig)
211
212--title \<string\>
213: Set title tag.
214
215--artist \<string\>
216: Set artist tag.
217
218--album \<string\>
219: Set album tag.
220
221--genre \<string\>
222: Set genre tag.
223
224--date \<string\>
225: Set date tag.
226
227--composer \<string\>
228: Set composer tag.
229
230--grouping \<string\>
231: Set grouping tag.
232
233--comment \<string\>
234: Set comment tag.
235
236--album-artist \<string\>
237: Set album artist tag.
238
239--track \<number[/total]\>
240: Set track tag, with or without number of total tracks.
241
242--disk \<number[/total]\>
243: Set disk tag, with or without number of total discs.
244
245--tempo \<n\>
246: Set tempo (BPM) tag.
247
248--tag \<fcc\>:\<value\>
249: Set iTunes predefined tag with explicit fourcc key and value. See
250 [https://code.google.com/p/mp4v2/wiki/iTunesMetadata](https://code.google.com/p/mp4v2/wiki/iTunesMetadata)
251 for known predefined keys. You can omit first char of **fcc** when
252 it is the copyright sign.
253
254--tag-from-file \<fcc\>:\<filename\>
255: Same as --tag, but set content of file as tag value.
256
257--long-tag \<name\>:\<value\>
258: Set arbitrary tag as iTunes custom metadata. Stored in
259 com.apple.iTunes field.
260
261--tag-from-json \<filename[?dot\_notation]\>
262: Read tags from JSON. By default, tags are assumed to be direct
a26e3cf3 263 children of the root object in JSON. Optionally you can specify
c1db2632 264 arbitrary dot notation to locate the object containing tags.
472e82e4 265
c1db2632 266
267EXAMPLES
268========
269
270Encode WAV file into a M4A file. MPEG4 AAC LC, VBR quality 3:
271
272 fdkaac -m3 foo.wav
273
274Encode WAV file into a M4A file. MPEG4 HE-AAC, bitrate 64kbps:
275
276 fdkaac -p5 -b64 foo.wav
277
278Piping from **ffmpeg** (you need version supporting CAF output):
279
280 ffmpeg -i foo.flac -f caf - | fdkaac -b128 - -o foo.m4a
281
282Import tags via json:
283
284 ffprobe -v 0 -of json -show_format foo.flac >foo.json
285
286 flac -dc foo.flac | \
287 fdkaac - -ox.m4a -m2 --import-tag-from-json=foo.json?format.tags
288
289NOTES
290=====
291
292Upto 32bit integer or 64bit floating point format is supported as input.
293However, FDK library is implemented based on fixed point math and only
a26e3cf3 294supports 16bit integer PCM. Therefore, be wary of clipping. You might
c1db2632 295want to dither/noise shape beforehand when your input has higher
296resolution.
297
298Following channel layouts are supported by the encoder.
299
3001ch
301: C
302
3032ch
304: L R
305
3063ch
307: C L R
308
3094ch
310: C L R Cs
311
3125ch
313: C L R Ls Rs
314
3155.1ch
316: C L R Ls Rs LFE
317
3187.1ch (front)
319: C Lc Rc L R Ls Rs LFE
320
3217.1ch (rear)
322: C L R Ls Rs Rls Rrs LFE
323
This page took 0.02783 seconds and 4 git commands to generate.