xref: /aosp_15_r20/external/flac/man/flac.md (revision 600f14f40d737144c998e2ec7a483122d3776fbc)
1*600f14f4SXin Li% flac(1) Version 1.4.3 | Free Lossless Audio Codec conversion tool
2*600f14f4SXin Li
3*600f14f4SXin Li# NAME
4*600f14f4SXin Li
5*600f14f4SXin Liflac - Free Lossless Audio Codec
6*600f14f4SXin Li
7*600f14f4SXin Li# SYNOPSIS
8*600f14f4SXin Li
9*600f14f4SXin Li**flac** \[ *OPTIONS* \] \[ *infile.wav* \| *infile.rf64* \|
10*600f14f4SXin Li*infile.aiff* \| *infile.raw* \| *infile.flac* \| *infile.oga* \|
11*600f14f4SXin Li*infile.ogg* \| **-** *...* \]
12*600f14f4SXin Li
13*600f14f4SXin Li**flac** \[ **-d** \| **\--decode** \| **-t** \| **\--test** \| **-a** \|
14*600f14f4SXin Li**\--analyze** \] \[ *OPTIONS* \] \[ *infile.flac* \| *infile.oga* \|
15*600f14f4SXin Li*infile.ogg* \| **-** *...* \]
16*600f14f4SXin Li
17*600f14f4SXin Li# DESCRIPTION
18*600f14f4SXin Li
19*600f14f4SXin Li**flac** is a command-line tool for encoding, decoding, testing and
20*600f14f4SXin Lianalyzing FLAC streams.
21*600f14f4SXin Li
22*600f14f4SXin Li# GENERAL USAGE
23*600f14f4SXin Li
24*600f14f4SXin Li**flac** supports as input RIFF WAVE, Wave64, RF64, AIFF, FLAC or Ogg
25*600f14f4SXin LiFLAC format, or raw interleaved samples. The decoder currently can output
26*600f14f4SXin Lito RIFF WAVE, Wave64, RF64, or AIFF format, or raw interleaved samples.
27*600f14f4SXin Liflac only supports linear PCM samples (in other words, no A-LAW, uLAW,
28*600f14f4SXin Lietc.), and the input must be between 4 and 32 bits per sample.
29*600f14f4SXin Li
30*600f14f4SXin Liflac assumes that files ending in ".wav" or that have the RIFF WAVE
31*600f14f4SXin Liheader present are WAVE files, files ending in ".w64" or have the Wave64
32*600f14f4SXin Liheader present are Wave64 files, files ending in ".rf64" or have the
33*600f14f4SXin LiRF64 header present are RF64 files, files ending in ".aif" or ".aiff" or
34*600f14f4SXin Lihave the AIFF header present are AIFF files, files ending in ".flac"
35*600f14f4SXin Lior have the FLAC header present are FLAC files and files ending in ".oga"
36*600f14f4SXin Lior ".ogg" or have the Ogg FLAC header present are Ogg FLAC files.
37*600f14f4SXin Li
38*600f14f4SXin LiOther than this, flac makes no assumptions about file extensions, though
39*600f14f4SXin Lithe convention is that FLAC files have the extension ".flac"
40*600f14f4SXin Li(or ".fla" on ancient "8.3" file systems like FAT-16).
41*600f14f4SXin Li
42*600f14f4SXin LiBefore going into the full command-line description, a few other things
43*600f14f4SXin Lihelp to sort it out:
44*600f14f4SXin Li1. flac encodes by default, so you must use -d to decode
45*600f14f4SXin Li2. the options -0 .. -8 (or --fast and --best) that control the
46*600f14f4SXin Li   compression level actually are just synonyms for different groups of
47*600f14f4SXin Li   specific encoding options (described later) and you can get the same
48*600f14f4SXin Li   effect by using the same options. When specific options are specified
49*600f14f4SXin Li   they take priority over the compression level no matter the order
50*600f14f4SXin Li3. flac behaves similarly to gzip in the way it handles input and output
51*600f14f4SXin Li   files
52*600f14f4SXin Li4. the order in which options are specified is generally not important
53*600f14f4SXin Li
54*600f14f4SXin LiSkip to the examples below for examples of some common tasks.
55*600f14f4SXin Li
56*600f14f4SXin Liflac will be invoked one of four ways, depending on whether you are
57*600f14f4SXin Liencoding, decoding, testing, or analyzing. Encoding is the default
58*600f14f4SXin Liinvocation, but can be switch to decoding with **-d**, analysis with
59*600f14f4SXin Li**-a** or testing with **-t**. Depending on which way is chosen,
60*600f14f4SXin Liencoding, decoding, analysis or testing options can be used, see section
61*600f14f4SXin LiOPTIONS for details. General options can be used for all.
62*600f14f4SXin Li
63*600f14f4SXin LiIf only one inputfile is specified, it may be "-" for stdin. When stdin
64*600f14f4SXin Liis used as input, flac will write to stdout. Otherwise flac will perform
65*600f14f4SXin Lithe desired operation on each input file to similarly named output files
66*600f14f4SXin Li(meaning for encoding, the extension will be replaced with ".flac", or
67*600f14f4SXin Liappended with ".flac" if the input file has no extension, and for
68*600f14f4SXin Lidecoding, the extension will be ".wav" for WAVE output and ".raw" for raw
69*600f14f4SXin Lioutput). The original file is not deleted unless --delete-input-file is
70*600f14f4SXin Lispecified.
71*600f14f4SXin Li
72*600f14f4SXin LiIf you are encoding/decoding from stdin to a file, you should use the -o
73*600f14f4SXin Lioption like so:
74*600f14f4SXin Li
75*600f14f4SXin Li    flac [options] -o outputfile
76*600f14f4SXin Li    flac -d [options] -o outputfile
77*600f14f4SXin Li
78*600f14f4SXin Liwhich are better than:
79*600f14f4SXin Li
80*600f14f4SXin Li    flac [options] > outputfile
81*600f14f4SXin Li    flac -d [options] > outputfile
82*600f14f4SXin Li
83*600f14f4SXin Lisince the former allows flac to seek backwards to write the STREAMINFO or
84*600f14f4SXin LiRIFF WAVE header contents when necessary.
85*600f14f4SXin Li
86*600f14f4SXin LiAlso, you can force output data to go to stdout using -c.
87*600f14f4SXin Li
88*600f14f4SXin LiTo encode or decode files that start with a dash, use -- to signal the
89*600f14f4SXin Liend of options, to keep the filenames themselves from being treated as
90*600f14f4SXin Lioptions:
91*600f14f4SXin Li
92*600f14f4SXin Li    flac -V -- -01-filename.wav
93*600f14f4SXin Li
94*600f14f4SXin LiThe encoding options affect the compression ratio and encoding speed. The
95*600f14f4SXin Liformat options are used to tell flac the arrangement of samples if the
96*600f14f4SXin Liinput file (or output file when decoding) is a raw file. If it is a RIFF
97*600f14f4SXin LiWAVE, Wave64, RF64, or AIFF file the format options are not needed since
98*600f14f4SXin Lithey are read from the file's header.
99*600f14f4SXin Li
100*600f14f4SXin LiIn test mode, flac acts just like in decode mode, except no output file
101*600f14f4SXin Liis written. Both decode and test modes detect errors in the stream, but
102*600f14f4SXin Lithey also detect when the MD5 signature of the decoded audio does not
103*600f14f4SXin Limatch the stored MD5 signature, even when the bitstream is valid.
104*600f14f4SXin Li
105*600f14f4SXin Liflac can also re-encode FLAC files. In other words, you can specify a
106*600f14f4SXin LiFLAC or Ogg FLAC file as an input to the encoder and it will decoder it
107*600f14f4SXin Liand re-encode it according to the options you specify. It will also
108*600f14f4SXin Lipreserve all the metadata unless you override it with other options (e.g.
109*600f14f4SXin Lispecifying new tags, seekpoints, cuesheet, padding, etc.).
110*600f14f4SXin Li
111*600f14f4SXin Liflac has been tuned so that the default settings yield a good speed vs.
112*600f14f4SXin Licompression tradeoff for many kinds of input. However, if you are looking
113*600f14f4SXin Lito maximize the compression rate or speed, or want to use the full power
114*600f14f4SXin Liof FLAC's metadata system, see the page titled 'About the FLAC Format' on
115*600f14f4SXin Lithe FLAC website.
116*600f14f4SXin Li
117*600f14f4SXin Li# EXAMPLES
118*600f14f4SXin Li
119*600f14f4SXin LiSome common **encoding** tasks using flac:
120*600f14f4SXin Li
121*600f14f4SXin Li`flac abc.wav`
122*600f14f4SXin Li:	Encode abc.wav to abc.flac using the default compression setting. abc.wav is not deleted.
123*600f14f4SXin Li
124*600f14f4SXin Li`flac --delete-input-file abc.wav`
125*600f14f4SXin Li:	Like above, except abc.wav is deleted if there were no errors.
126*600f14f4SXin Li
127*600f14f4SXin Li`flac --delete-input-file -w abc.wav`
128*600f14f4SXin Li:	Like above, except abc.wav is deleted if there were no errors or warnings.
129*600f14f4SXin Li
130*600f14f4SXin Li`flac --best abc.wav`
131*600f14f4SXin Li:	Encode abc.wav to abc.flac using the highest compression setting.
132*600f14f4SXin Li
133*600f14f4SXin Li`flac --verify abc.wav`
134*600f14f4SXin Li:	Encode abc.wav to abc.flac and internally decode abc.flac to make sure it matches abc.wav.
135*600f14f4SXin Li
136*600f14f4SXin Li`flac -o my.flac abc.wav`
137*600f14f4SXin Li:	Encode abc.wav to my.flac.
138*600f14f4SXin Li
139*600f14f4SXin Li`flac -T "TITLE=Bohemian Rhapsody" -T "ARTIST=Queen" abc.wav`
140*600f14f4SXin Li:	Encode abc.wav and add some tags at the same time to abc.flac.
141*600f14f4SXin Li
142*600f14f4SXin Li`flac *.wav`
143*600f14f4SXin Li:	Encode all .wav files in the current directory.
144*600f14f4SXin Li
145*600f14f4SXin Li`flac abc.aiff`
146*600f14f4SXin Li:	Encode abc.aiff to abc.flac.
147*600f14f4SXin Li
148*600f14f4SXin Li`flac abc.rf64`
149*600f14f4SXin Li:	Encode abc.rf64 to abc.flac.
150*600f14f4SXin Li
151*600f14f4SXin Li`flac abc.w64`
152*600f14f4SXin Li:	Encode abc.w64 to abc.flac.
153*600f14f4SXin Li
154*600f14f4SXin Li`flac abc.flac --force`
155*600f14f4SXin Li:	This one's a little tricky: notice that flac is in encode mode by
156*600f14f4SXin Li	default (you have to specify -d to decode) so this command actually
157*600f14f4SXin Li	recompresses abc.flac back to abc.flac. --force is needed to make
158*600f14f4SXin Li	sure you really want to overwrite abc.flac with a new version. Why
159*600f14f4SXin Li	would you want to do this? It allows you to recompress an existing
160*600f14f4SXin Li	FLAC file with (usually) higher compression options or a newer
161*600f14f4SXin Li	version of FLAC and preserve all the metadata like tags too.
162*600f14f4SXin Li
163*600f14f4SXin LiSome common **decoding** tasks using flac:
164*600f14f4SXin Li
165*600f14f4SXin Li`flac -d abc.flac`
166*600f14f4SXin Li:	Decode abc.flac to abc.wav. abc.flac is not deleted. NOTE: Without
167*600f14f4SXin Li	-d it means re-encode abc.flac to abc.flac (see above).
168*600f14f4SXin Li
169*600f14f4SXin Li`flac -d --force-aiff-format abc.flac`
170*600f14f4SXin Li`flac -d -o abc.aiff abc.flac`
171*600f14f4SXin Li:	Two different ways of decoding abc.flac to abc.aiff (AIFF format).
172*600f14f4SXin Li	abc.flac is not deleted.
173*600f14f4SXin Li
174*600f14f4SXin Li`flac -d --force-rf64-format abc.flac`
175*600f14f4SXin Li`flac -d -o abc.rf64 abc.flac`
176*600f14f4SXin Li:	Two different ways of decoding abc.flac to abc.rf64 (RF64 format).
177*600f14f4SXin Li	abc.flac is not deleted.
178*600f14f4SXin Li
179*600f14f4SXin Li`flac -d --force-wave64-format abc.flac`
180*600f14f4SXin Li`flac -d -o abc.w64 abc.flac`
181*600f14f4SXin Li:	Two different ways of decoding abc.flac to abc.w64 (Wave64 format).
182*600f14f4SXin Li	abc.flac is not deleted.
183*600f14f4SXin Li
184*600f14f4SXin Li`flac -d -F abc.flac`
185*600f14f4SXin Li:	Decode abc.flac to abc.wav and don't abort if errors are found
186*600f14f4SXin Li	(useful for recovering as much as possible from corrupted files).
187*600f14f4SXin Li
188*600f14f4SXin Li
189*600f14f4SXin Li# OPTIONS
190*600f14f4SXin Li
191*600f14f4SXin LiA summary of options is included below. For a complete description, see
192*600f14f4SXin Lithe HTML documentation.
193*600f14f4SXin Li
194*600f14f4SXin Li## GENERAL OPTIONS
195*600f14f4SXin Li
196*600f14f4SXin Li**-v, \--version**
197*600f14f4SXin Li:	Show the flac version number
198*600f14f4SXin Li
199*600f14f4SXin Li**-h, \--help**
200*600f14f4SXin Li:	Show basic usage and a list of all options
201*600f14f4SXin Li
202*600f14f4SXin Li**-H, \--explain**
203*600f14f4SXin Li:	Show detailed explanation of usage and all options
204*600f14f4SXin Li
205*600f14f4SXin Li**-d, \--decode**
206*600f14f4SXin Li:	Decode (the default behavior is to encode)
207*600f14f4SXin Li
208*600f14f4SXin Li**-t, \--test**
209*600f14f4SXin Li:	Test a flac encoded file (same as -d except no decoded file is written)
210*600f14f4SXin Li
211*600f14f4SXin Li**-a, \--analyze**
212*600f14f4SXin Li:	Analyze a FLAC encoded file (same as -d except an analysis file is
213*600f14f4SXin Li	written)
214*600f14f4SXin Li
215*600f14f4SXin Li**-c, \--stdout**
216*600f14f4SXin Li:	Write output to stdout
217*600f14f4SXin Li
218*600f14f4SXin Li**-s, \--silent**
219*600f14f4SXin Li:	Silent mode (do not write runtime encode/decode statistics to stderr)
220*600f14f4SXin Li
221*600f14f4SXin Li**\--totally-silent**
222*600f14f4SXin Li: Do not print anything of any kind, including warnings or errors. The
223*600f14f4SXin Li	exit code will be the only way to determine successful completion.
224*600f14f4SXin Li
225*600f14f4SXin Li**\--no-utf8-convert**
226*600f14f4SXin Li:	Do not convert tags from local charset to UTF-8. This is useful for
227*600f14f4SXin Li	scripts, and setting tags in situations where the locale is wrong.
228*600f14f4SXin Li	This option must appear before any tag options!
229*600f14f4SXin Li
230*600f14f4SXin Li**-w, \--warnings-as-errors**
231*600f14f4SXin Li:	Treat all warnings as errors (which cause flac to terminate with a
232*600f14f4SXin Li	non-zero exit code).
233*600f14f4SXin Li
234*600f14f4SXin Li**-f, \--force**
235*600f14f4SXin Li:	Force overwriting of output files. By default, flac warns that the
236*600f14f4SXin Li	output file already exists and continues to the next file.
237*600f14f4SXin Li
238*600f14f4SXin Li**-o** *filename***, \--output-name=***filename*
239*600f14f4SXin Li:	Force the output file name (usually flac just changes the extension).
240*600f14f4SXin Li	May only be used when encoding a single file. May not be used in
241*600f14f4SXin Li	conjunction with \--output-prefix.
242*600f14f4SXin Li
243*600f14f4SXin Li**\--output-prefix=***string*
244*600f14f4SXin Li:	Prefix each output file name with the given string. This can be
245*600f14f4SXin Li	useful for encoding or decoding files to a different directory. Make
246*600f14f4SXin Li	sure if your string is a path name that it ends with a trailing \`/'
247*600f14f4SXin Li	(slash).
248*600f14f4SXin Li
249*600f14f4SXin Li**\--delete-input-file**
250*600f14f4SXin Li:	Automatically delete the input file after a successful encode or
251*600f14f4SXin Li	decode. If there was an error (including a verify error) the input
252*600f14f4SXin Li	file is left intact.
253*600f14f4SXin Li
254*600f14f4SXin Li**\--preserve-modtime**
255*600f14f4SXin Li:	Output files have their timestamps/permissions set to match those of
256*600f14f4SXin Li	their inputs (this is default). Use \--no-preserve-modtime to make
257*600f14f4SXin Li	output files have the current time and default permissions.
258*600f14f4SXin Li
259*600f14f4SXin Li**\--keep-foreign-metadata**
260*600f14f4SXin Li:	If encoding, save WAVE, RF64, or AIFF non-audio chunks in FLAC
261*600f14f4SXin Li	metadata. If decoding, restore any saved non-audio chunks from FLAC
262*600f14f4SXin Li	metadata when writing the decoded file. Foreign metadata cannot be
263*600f14f4SXin Li	transcoded, e.g. WAVE chunks saved in a FLAC file cannot be restored
264*600f14f4SXin Li	when decoding to AIFF. Input and output must be regular files (not
265*600f14f4SXin Li	stdin or stdout). With this option, FLAC will pick the right output
266*600f14f4SXin Li	format on decoding.
267*600f14f4SXin Li
268*600f14f4SXin Li**\--keep-foreign-metadata-if-present**
269*600f14f4SXin Li:	Like \--keep-foreign-metadata, but without throwing an error if
270*600f14f4SXin Li	foreign metadata cannot be found or restored, instead printing a
271*600f14f4SXin Li	warning.
272*600f14f4SXin Li
273*600f14f4SXin Li**\--skip={***\#***\|***mm:ss.ss***}**
274*600f14f4SXin Li:	Skip over the first number of samples of the input. This works for
275*600f14f4SXin Li	both encoding and decoding, but not testing. The alternative form
276*600f14f4SXin Li	mm:ss.ss can be used to specify minutes, seconds, and fractions of a
277*600f14f4SXin Li	second.
278*600f14f4SXin Li
279*600f14f4SXin Li**\--until={***\#***\|\[***+***\|***-***\]***mm:ss.ss***}**
280*600f14f4SXin Li:	Stop at the given sample number for each input file. This works for
281*600f14f4SXin Li	both encoding and decoding, but not testing. The given sample number
282*600f14f4SXin Li	is not included in the decoded output. The alternative form mm:ss.ss
283*600f14f4SXin Li	can be used to specify minutes, seconds, and fractions of a second.
284*600f14f4SXin Li	If a \`+' (plus) sign is at the beginning, the \--until point is
285*600f14f4SXin Li	relative to the \--skip point. If a \`-' (minus) sign is at the
286*600f14f4SXin Li	beginning, the \--until point is relative to end of the audio.
287*600f14f4SXin Li
288*600f14f4SXin Li**\--ogg**
289*600f14f4SXin Li:	When encoding, generate Ogg FLAC output instead of native FLAC. Ogg
290*600f14f4SXin Li	FLAC streams are FLAC streams wrapped in an Ogg transport layer. The
291*600f14f4SXin Li	resulting file should have an '.oga' extension and will still be
292*600f14f4SXin Li	decodable by flac. When decoding, force the input to be treated as
293*600f14f4SXin Li	Ogg FLAC. This is useful when piping input from stdin or when the
294*600f14f4SXin Li	filename does not end in '.oga' or '.ogg'.
295*600f14f4SXin Li
296*600f14f4SXin Li**\--serial-number=***\#*
297*600f14f4SXin Li:	When used with \--ogg, specifies the serial number to use for the
298*600f14f4SXin Li	first Ogg FLAC stream, which is then incremented for each additional
299*600f14f4SXin Li	stream. When encoding and no serial number is given, flac uses a
300*600f14f4SXin Li	random number for the first stream, then increments it for each
301*600f14f4SXin Li	additional stream. When decoding and no number is given, flac uses
302*600f14f4SXin Li	the serial number of the first page.
303*600f14f4SXin Li
304*600f14f4SXin Li## ANALYSIS OPTIONS
305*600f14f4SXin Li
306*600f14f4SXin Li**\--residual-text**
307*600f14f4SXin Li:	Includes the residual signal in the analysis file. This will make the
308*600f14f4SXin Li	file very big, much larger than even the decoded file.
309*600f14f4SXin Li
310*600f14f4SXin Li**\--residual-gnuplot**
311*600f14f4SXin Li:	Generates a gnuplot file for every subframe; each file will contain
312*600f14f4SXin Li	the residual distribution of the subframe. This will create a lot of
313*600f14f4SXin Li	files.
314*600f14f4SXin Li
315*600f14f4SXin Li## DECODING OPTIONS
316*600f14f4SXin Li
317*600f14f4SXin Li**\--cue=\[***\#.#***\]\[-\[***\#.#***\]\]**
318*600f14f4SXin Li:	Set the beginning and ending cuepoints to decode. The optional first
319*600f14f4SXin Li	\#.# is the track and index point at which decoding will start; the
320*600f14f4SXin Li	default is the beginning of the stream. The optional second \#.# is
321*600f14f4SXin Li	the track and index point at which decoding will end; the default is
322*600f14f4SXin Li	the end of the stream. If the cuepoint does not exist, the closest
323*600f14f4SXin Li	one before it (for the start point) or after it (for the end point)
324*600f14f4SXin Li	will be used. If those don't exist, the start of the stream (for the
325*600f14f4SXin Li	start point) or end of the stream (for the end point) will be used.
326*600f14f4SXin Li	The cuepoints are merely translated into sample numbers then used as
327*600f14f4SXin Li	\--skip and \--until. A CD track can always be cued by, for example,
328*600f14f4SXin Li	\--cue=9.1-10.1 for track 9, even if the CD has no 10th track.
329*600f14f4SXin Li
330*600f14f4SXin Li**-F, \--decode-through-errors**
331*600f14f4SXin Li:	By default flac stops decoding with an error and removes the
332*600f14f4SXin Li	partially decoded file if it encounters a bitstream error. With -F,
333*600f14f4SXin Li	errors are still printed but flac will continue decoding to
334*600f14f4SXin Li	completion. Note that errors may cause the decoded audio to be
335*600f14f4SXin Li	missing some samples or have silent sections.
336*600f14f4SXin Li
337*600f14f4SXin Li**\--apply-replaygain-which-is-not-lossless\[=\<specification\>\]**
338*600f14f4SXin Li:	Applies ReplayGain values while decoding. **WARNING: THIS IS NOT
339*600f14f4SXin Li	LOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH
340*600f14f4SXin Li	THIS OPTION.** This option is useful for example in transcoding
341*600f14f4SXin Li	media servers, where the client does not support ReplayGain. For
342*600f14f4SXin Li	details on the use of this option, see the section **ReplayGain
343*600f14f4SXin Li	application specification**.
344*600f14f4SXin Li
345*600f14f4SXin Li## ENCODING OPTIONS
346*600f14f4SXin Li
347*600f14f4SXin Li**-V, \--verify**
348*600f14f4SXin Li:	Verify a correct encoding by decoding the output in parallel and
349*600f14f4SXin Li	comparing to the original
350*600f14f4SXin Li
351*600f14f4SXin Li**\--lax**
352*600f14f4SXin Li:	Allow encoder to generate non-Subset files. The resulting FLAC file
353*600f14f4SXin Li	may not be streamable or might have trouble being played in all
354*600f14f4SXin Li	players (especially hardware devices), so you should only use this
355*600f14f4SXin Li	option in combination with custom encoding options meant for
356*600f14f4SXin Li	archival.
357*600f14f4SXin Li
358*600f14f4SXin Li**\--replay-gain**
359*600f14f4SXin Li:	Calculate ReplayGain values and store them as FLAC tags, similar to
360*600f14f4SXin Li	vorbisgain. Title gains/peaks will be computed for each input file,
361*600f14f4SXin Li	and an album gain/peak will be computed for all files. All input
362*600f14f4SXin Li	files must have the same resolution, sample rate, and number of
363*600f14f4SXin Li	channels. Only mono and stereo files are allowed, and the sample
364*600f14f4SXin Li	rate must be 8, 11.025, 12, 16, 18.9, 22.05, 24, 28, 32, 36, 37.8,
365*600f14f4SXin Li	44.1, 48, 56, 64, 72, 75.6, 88.2, 96, 112, 128, 144, 151.2, 176.4,
366*600f14f4SXin Li	192, 224, 256, 288, 302.4, 352.8, 384, 448, 512, 576, or 604.8 kHz.
367*600f14f4SXin Li	Also note that this option may leave a few extra bytes in a PADDING
368*600f14f4SXin Li	block as the exact size of the tags is not known until all files
369*600f14f4SXin Li	are processed. Note that this option cannot be used when encoding
370*600f14f4SXin Li	to standard output (stdout).
371*600f14f4SXin Li
372*600f14f4SXin Li**\--cuesheet=***filename*
373*600f14f4SXin Li:	Import the given cuesheet file and store it in a CUESHEET metadata
374*600f14f4SXin Li	block. This option may only be used when encoding a single file. A
375*600f14f4SXin Li	seekpoint will be added for each index point in the cuesheet to the
376*600f14f4SXin Li	SEEKTABLE unless \--no-cued-seekpoints is specified.
377*600f14f4SXin Li
378*600f14f4SXin Li**\--picture={***FILENAME***\|***SPECIFICATION***}**
379*600f14f4SXin Li:	Import a picture and store it in a PICTURE metadata block. More than
380*600f14f4SXin Li	one \--picture option can be specified. Either a filename for the
381*600f14f4SXin Li	picture file or a more complete specification form can be used. The
382*600f14f4SXin Li	SPECIFICATION is a string whose parts are separated by \| (pipe)
383*600f14f4SXin Li	characters. Some parts may be left empty to invoke default values.
384*600f14f4SXin Li	FILENAME is just shorthand for "\|\|\|\|FILENAME". For the format of
385*600f14f4SXin Li	SPECIFICATION, see the section **picture specification**.
386*600f14f4SXin Li
387*600f14f4SXin Li**\--ignore-chunk-sizes**
388*600f14f4SXin Li:	When encoding to flac, ignore the file size headers in WAV and AIFF
389*600f14f4SXin Li	files to attempt to work around problems with over-sized or malformed
390*600f14f4SXin Li	files. WAV and AIFF files both have an unsigned 32 bit numbers in
391*600f14f4SXin Li	the file header which specifes the length of audio data. Since this
392*600f14f4SXin Li	number is unsigned 32 bits, that limits the size of a valid file to
393*600f14f4SXin Li	being just over 4 Gigabytes. Files larger than this are mal-formed,
394*600f14f4SXin Li	but should be read correctly using this option.
395*600f14f4SXin Li
396*600f14f4SXin Li**-S {***\#***\|***X***\|***\#x***\|***\#s***}, \--seekpoint={***\#***\|***X***\|***\#x***\|***\#s***}**
397*600f14f4SXin Li:	Include a point or points in a SEEKTABLE. Using \#, a seek point at
398*600f14f4SXin Li	that sample number is added. Using X, a placeholder point is added at
399*600f14f4SXin Li	the end of a the table. Using \#x, \# evenly spaced seek points will
400*600f14f4SXin Li	be added, the first being at sample 0. Using \#s, a seekpoint will be
401*600f14f4SXin Li	added every \# seconds (# does not have to be a whole number; it can
402*600f14f4SXin Li	be, for example, 9.5, meaning a seekpoint every 9.5 seconds). You may
403*600f14f4SXin Li	use many -S options; the resulting SEEKTABLE will be the unique-ified
404*600f14f4SXin Li	union of all such values. With no -S options, flac defaults to
405*600f14f4SXin Li	'-S 10s'. Use \--no-seektable for no SEEKTABLE. Note: '-S \#x' and
406*600f14f4SXin Li	'-S \#s' will not work if the encoder can't determine the input size
407*600f14f4SXin Li	before starting. Note: if you use '-S \#' and \# is \>= samples in
408*600f14f4SXin Li	the input, there will be either no seek point entered (if the input
409*600f14f4SXin Li	size is determinable before encoding starts) or a placeholder point
410*600f14f4SXin Li	(if input size is not determinable).
411*600f14f4SXin Li
412*600f14f4SXin Li**-P** *\#***, \--padding=***\#*
413*600f14f4SXin Li:	Tell the encoder to write a PADDING metadata block of the given
414*600f14f4SXin Li	length (in bytes) after the STREAMINFO block. This is useful if you
415*600f14f4SXin Li	plan to tag the file later with an APPLICATION block; instead of
416*600f14f4SXin Li	having to rewrite the entire file later just to insert your block,
417*600f14f4SXin Li	you can write directly over the PADDING block. Note that the total
418*600f14f4SXin Li	length of the PADDING block will be 4 bytes longer than the length
419*600f14f4SXin Li	given because of the 4 metadata block header bytes. You can force no
420*600f14f4SXin Li	PADDING block at all to be written with \--no-padding. The encoder
421*600f14f4SXin Li	writes a PADDING block of 8192 bytes by default (or 65536 bytes if
422*600f14f4SXin Li	the input audio stream is more that 20 minutes long).
423*600f14f4SXin Li
424*600f14f4SXin Li**-T** *FIELD=VALUE***, \--tag=***FIELD=VALUE*
425*600f14f4SXin Li:	Add a FLAC tag. The comment must adhere to the Vorbis comment spec;
426*600f14f4SXin Li	i.e. the FIELD must contain only legal characters, terminated by an
427*600f14f4SXin Li	'equals' sign. Make sure to quote the comment if necessary. This
428*600f14f4SXin Li	option may appear more than once to add several comments. NOTE: all
429*600f14f4SXin Li	tags will be added to all encoded files.
430*600f14f4SXin Li
431*600f14f4SXin Li**\--tag-from-file=***FIELD=FILENAME*
432*600f14f4SXin Li:	Like \--tag, except FILENAME is a file whose contents will be read
433*600f14f4SXin Li	verbatim to set the tag value. The contents will be converted to
434*600f14f4SXin Li	UTF-8 from the local charset. This can be used to store a cuesheet
435*600f14f4SXin Li	in a tag (e.g. \--tag-from-file="CUESHEET=image.cue"). Do not try to
436*600f14f4SXin Li	store binary data in tag fields! Use APPLICATION blocks for that.
437*600f14f4SXin Li
438*600f14f4SXin Li**-b** *\#***, \--blocksize=***\#*
439*600f14f4SXin Li:	Specify the blocksize in samples. The default is 1152 for -l 0,
440*600f14f4SXin Li	else 4096. For subset streams this must be \<= 4608 if the samplerate
441*600f14f4SXin Li	\<= 48kHz, for subset streams with higher samplerates it must be \<=
442*600f14f4SXin Li	16384.
443*600f14f4SXin Li
444*600f14f4SXin Li**-m, \--mid-side**
445*600f14f4SXin Li:	Try mid-side coding for each frame (stereo input only)
446*600f14f4SXin Li
447*600f14f4SXin Li**-M, \--adaptive-mid-side**
448*600f14f4SXin Li:	Adaptive mid-side coding for all frames (stereo input only)
449*600f14f4SXin Li
450*600f14f4SXin Li**-0..-8, \--compression-level-0..\--compression-level-8**
451*600f14f4SXin Li:	Fastest compression..highest compression (default is -5). These are
452*600f14f4SXin Li	synonyms for other options:
453*600f14f4SXin Li
454*600f14f4SXin Li**-0, \--compression-level-0**
455*600f14f4SXin Li:	Synonymous with -l 0 -b 1152 -r 3 \--no-mid-side
456*600f14f4SXin Li
457*600f14f4SXin Li**-1, \--compression-level-1**
458*600f14f4SXin Li:	Synonymous with -l 0 -b 1152 -M -r 3
459*600f14f4SXin Li
460*600f14f4SXin Li**-2, \--compression-level-2**
461*600f14f4SXin Li:	Synonymous with -l 0 -b 1152 -m -r 3
462*600f14f4SXin Li
463*600f14f4SXin Li**-3, \--compression-level-3**
464*600f14f4SXin Li:	Synonymous with -l 6 -b 4096 -r 4 \--no-mid-side
465*600f14f4SXin Li
466*600f14f4SXin Li**-4, \--compression-level-4**
467*600f14f4SXin Li:	Synonymous with -l 8 -b 4096 -M -r 4
468*600f14f4SXin Li
469*600f14f4SXin Li**-5, \--compression-level-5**
470*600f14f4SXin Li:	Synonymous with -l 8 -b 4096 -m -r 5
471*600f14f4SXin Li
472*600f14f4SXin Li**-6, \--compression-level-6**
473*600f14f4SXin Li:	Synonymous with -l 8 -b 4096 -m -r 6 -A subdivide_tukey(2)
474*600f14f4SXin Li
475*600f14f4SXin Li**-7, \--compression-level-7**
476*600f14f4SXin Li:	Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(2)
477*600f14f4SXin Li
478*600f14f4SXin Li**-8, \--compression-level-8**
479*600f14f4SXin Li:	Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(3)
480*600f14f4SXin Li
481*600f14f4SXin Li**\--fast**
482*600f14f4SXin Li:	Fastest compression. Currently synonymous with -0.
483*600f14f4SXin Li
484*600f14f4SXin Li**\--best**
485*600f14f4SXin Li:	Highest compression. Currently synonymous with -8.
486*600f14f4SXin Li
487*600f14f4SXin Li**-e, \--exhaustive-model-search**
488*600f14f4SXin Li:	Do exhaustive model search (expensive!)
489*600f14f4SXin Li
490*600f14f4SXin Li**-A** *function***, \--apodization=***function*
491*600f14f4SXin Li:	Window audio data with given the apodization function. See section
492*600f14f4SXin Li	**Apodization functions** for details.
493*600f14f4SXin Li
494*600f14f4SXin Li**-l** *\#***, \--max-lpc-order=***\#*
495*600f14f4SXin Li:	Specifies the maximum LPC order. This number must be \<= 32. For
496*600f14f4SXin Li	subset streams, it must be \<=12 if the sample rate is \<=48kHz. If
497*600f14f4SXin Li	0, the encoder will not attempt generic linear prediction, and use
498*600f14f4SXin Li	only fixed predictors. Using fixed predictors is faster but usually
499*600f14f4SXin Li	results in files being 5-10% larger.
500*600f14f4SXin Li
501*600f14f4SXin Li**-p, \--qlp-coeff-precision-search**
502*600f14f4SXin Li:	Do exhaustive search of LP coefficient quantization (expensive!).
503*600f14f4SXin Li	Overrides -q; does nothing if using -l 0
504*600f14f4SXin Li
505*600f14f4SXin Li**-q** *\#***, \--qlp-coeff-precision=***\#*
506*600f14f4SXin Li:	Precision of the quantized linear-predictor coefficients, 0 =\> let
507*600f14f4SXin Li	encoder decide (min is 5, default is 0)
508*600f14f4SXin Li
509*600f14f4SXin Li**-r \[***\#***,\]***\#***, \--rice-partition-order=\[***\#***,\]***\#*
510*600f14f4SXin Li:	Set the \[min,\]max residual partition order (0..15). min defaults to
511*600f14f4SXin Li	0 if unspecified. Default is -r 5.
512*600f14f4SXin Li
513*600f14f4SXin Li## FORMAT OPTIONS
514*600f14f4SXin Li
515*600f14f4SXin Li**\--endian={***big***\|***little***}**
516*600f14f4SXin Li:	Set the byte order for samples
517*600f14f4SXin Li
518*600f14f4SXin Li**\--channels=***\#*
519*600f14f4SXin Li:	Set number of channels.
520*600f14f4SXin Li
521*600f14f4SXin Li**\--bps=***\#*
522*600f14f4SXin Li:	Set bits per sample.
523*600f14f4SXin Li
524*600f14f4SXin Li**\--sample-rate=***\#*
525*600f14f4SXin Li:	Set sample rate (in Hz).
526*600f14f4SXin Li
527*600f14f4SXin Li**\--sign={***signed***\|***unsigned***}**
528*600f14f4SXin Li:	Set the sign of samples.
529*600f14f4SXin Li
530*600f14f4SXin Li**\--input-size=***\#*
531*600f14f4SXin Li:	Specify the size of the raw input in bytes. If you are encoding raw
532*600f14f4SXin Li	samples from stdin, you must set this option in order to be able to
533*600f14f4SXin Li	use \--skip, \--until, \--cuesheet, or other options that need to
534*600f14f4SXin Li	know the size of the input beforehand. If the size given is greater
535*600f14f4SXin Li	than what is found in the input stream, the encoder will complain
536*600f14f4SXin Li	about an unexpected end-of-file. If the size given is less, samples
537*600f14f4SXin Li	will be truncated.
538*600f14f4SXin Li
539*600f14f4SXin Li**\--force-raw-format**
540*600f14f4SXin Li:	Force input (when encoding) or output (when decoding) to be treated
541*600f14f4SXin Li	as raw samples (even if filename ends in *.wav*).
542*600f14f4SXin Li
543*600f14f4SXin Li**\--force-aiff-format**
544*600f14f4SXin Li**\--force-rf64-format**
545*600f14f4SXin Li**\--force-wave64-format**
546*600f14f4SXin Li:	Force the decoder to output AIFF/RF64/WAVE64 format respectively.
547*600f14f4SXin Li	This option is not needed if the output filename (as set by -o)
548*600f14f4SXin Li	ends with *.aif* or *.aiff*, *.rf64* and *.w64* respectively. Also,
549*600f14f4SXin Li	this option has no effect when encoding since input is
550*600f14f4SXin Li	auto-detected. When none of these options nor
551*600f14f4SXin Li	--keep-foreign-metadata are given and no output filename is set,
552*600f14f4SXin Li	the output format is WAV by default.
553*600f14f4SXin Li
554*600f14f4SXin Li**\--force-legacy-wave-format**
555*600f14f4SXin Li**\--force-extensible-wave-format**
556*600f14f4SXin Li:	Instruct the decoder to output a WAVE file with WAVE_FORMAT_PCM and
557*600f14f4SXin Li	WAVE_FORMAT_EXTENSIBLE respectively. If none of these options nor
558*600f14f4SXin Li	--keep-foreign-metadata are given, FLAC outputs WAVE_FORMAT_PCM
559*600f14f4SXin Li	for mono or stereo with a bit depth of 8 or 16 bits, and
560*600f14f4SXin Li	WAVE_FORMAT_EXTENSIBLE for all other audio formats.
561*600f14f4SXin Li
562*600f14f4SXin Li**\--force-aiff-c-none-format**
563*600f14f4SXin Li**\--force-aiff-c-sowt-format**
564*600f14f4SXin Li:	Instruct the decoder to output an AIFF-C file with format NONE and
565*600f14f4SXin Li	sowt respectively.
566*600f14f4SXin Li
567*600f14f4SXin Li## NEGATIVE OPTIONS
568*600f14f4SXin Li
569*600f14f4SXin Li**\--no-adaptive-mid-side**
570*600f14f4SXin Li**\--no-cued-seekpoints**
571*600f14f4SXin Li**\--no-decode-through-errors**
572*600f14f4SXin Li**\--no-delete-input-file**
573*600f14f4SXin Li**\--no-preserve-modtime**
574*600f14f4SXin Li**\--no-keep-foreign-metadata**
575*600f14f4SXin Li**\--no-exhaustive-model-search**
576*600f14f4SXin Li**\--no-force**
577*600f14f4SXin Li**\--no-lax**
578*600f14f4SXin Li**\--no-mid-side**
579*600f14f4SXin Li**\--no-ogg**
580*600f14f4SXin Li**\--no-padding**
581*600f14f4SXin Li**\--no-qlp-coeff-prec-search**
582*600f14f4SXin Li**\--no-replay-gain**
583*600f14f4SXin Li**\--no-residual-gnuplot**
584*600f14f4SXin Li**\--no-residual-text**
585*600f14f4SXin Li**\--no-seektable**
586*600f14f4SXin Li**\--no-silent**
587*600f14f4SXin Li**\--no-verify**
588*600f14f4SXin Li**\--no-warnings-as-errors**
589*600f14f4SXin Li
590*600f14f4SXin LiThese flags can be used to invert the sense of the corresponding normal
591*600f14f4SXin Lioption.
592*600f14f4SXin Li
593*600f14f4SXin Li## ReplayGain application specification
594*600f14f4SXin LiThe option \--apply-replaygain-which-is-not-lossless\[=\<specification\>\]**
595*600f14f4SXin Liapplies ReplayGain values while decoding. **WARNING: THIS IS NOT
596*600f14f4SXin LiLOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS
597*600f14f4SXin LiOPTION.** This option is useful for example in transcoding media servers,
598*600f14f4SXin Liwhere the client does not support ReplayGain.
599*600f14f4SXin Li
600*600f14f4SXin LiThe equals sign and \<specification\> is optional. If omitted, the
601*600f14f4SXin Lidefault specification is 0aLn1.
602*600f14f4SXin Li
603*600f14f4SXin LiThe \<specification\> is a shorthand notation for describing how to	apply
604*600f14f4SXin LiReplayGain. All components are optional but order is important. '\[\]'
605*600f14f4SXin Limeans 'optional'. '\|' means 'or'. '{}' means required. The format is:
606*600f14f4SXin Li
607*600f14f4SXin Li\[\<preamp\>\]\[a\|t\]\[l\|L\]\[n{0\|1\|2\|3}\]
608*600f14f4SXin Li
609*600f14f4SXin LiIn which the following parameters are used:
610*600f14f4SXin Li
611*600f14f4SXin Li-	**preamp**: A floating point number in dB. This is added to the
612*600f14f4SXin Li	existing gain value.
613*600f14f4SXin Li
614*600f14f4SXin Li-	**a\|t**: Specify 'a' to use the album gain, or 't' to use the track
615*600f14f4SXin Li	gain. If tags for the preferred kind (album/track) do not exist but
616*600f14f4SXin Li	tags for the other (track/album) do, those will be used instead.
617*600f14f4SXin Li
618*600f14f4SXin Li-	**l\|L**: Specify 'l' to peak-limit the output, so that the
619*600f14f4SXin Li	ReplayGain peak value is full-scale. Specify 'L' to use a 6dB hard
620*600f14f4SXin Li	limiter that kicks in when the signal approaches full-scale.
621*600f14f4SXin Li
622*600f14f4SXin Li-	**n{0\|1\|2\|3}**: Specify the amount of noise shaping. ReplayGain
623*600f14f4SXin Li	synthesis happens in floating point; the result is dithered before
624*600f14f4SXin Li	converting back to integer. This quantization adds noise. Noise
625*600f14f4SXin Li	shaping tries to move the noise where you won't hear it as much.
626*600f14f4SXin Li	0 means no noise shaping, 1 means 'low', 2 means 'medium', 3 means
627*600f14f4SXin Li	'high'.
628*600f14f4SXin Li
629*600f14f4SXin LiFor example, the default of 0aLn1 means 0dB preamp, use album gain, 6dB
630*600f14f4SXin Lihard limit, low noise shaping. \--apply-replaygain-which-is-not-lossless=3
631*600f14f4SXin Limeans 3dB preamp, use album gain, no limiting, no noise shaping.
632*600f14f4SXin Li
633*600f14f4SXin Liflac uses the ReplayGain tags for the calculation. If a stream does
634*600f14f4SXin Linot have the required tags or they can't be parsed, decoding will
635*600f14f4SXin Licontinue with a warning, and no ReplayGain is applied to that stream.
636*600f14f4SXin Li
637*600f14f4SXin Li## Picture specification
638*600f14f4SXin LiThis described the specification used for the **\--picture** option.
639*600f14f4SXin Li\[TYPE\]\|\[MIME-TYPE\]\|\[DESCRIPTION\]\|\[WIDTHxHEIGHTxDEPTH\[/COLORS\]\]\|FILE
640*600f14f4SXin Li
641*600f14f4SXin LiTYPE is optional; it is a number from one of:
642*600f14f4SXin Li
643*600f14f4SXin Li0. Other
644*600f14f4SXin Li1. 32x32 pixels 'file icon' (PNG only)
645*600f14f4SXin Li2. Other file icon
646*600f14f4SXin Li3. Cover (front)
647*600f14f4SXin Li4. Cover (back)
648*600f14f4SXin Li5. Leaflet page
649*600f14f4SXin Li6. Media (e.g. label side of CD)
650*600f14f4SXin Li7. Lead artist/lead performer/soloist
651*600f14f4SXin Li8. Artist/performer
652*600f14f4SXin Li9. Conductor
653*600f14f4SXin Li10. Band/Orchestra
654*600f14f4SXin Li11. Composer
655*600f14f4SXin Li12. Lyricist/text writer
656*600f14f4SXin Li13. Recording Location
657*600f14f4SXin Li14. During recording
658*600f14f4SXin Li15. During performance
659*600f14f4SXin Li16. Movie/video screen capture
660*600f14f4SXin Li17. A bright coloured fish
661*600f14f4SXin Li18. Illustration
662*600f14f4SXin Li19. Band/artist logotype
663*600f14f4SXin Li20. Publisher/Studio logotype
664*600f14f4SXin Li
665*600f14f4SXin LiThe default is 3 (front cover). There may only be one picture each of
666*600f14f4SXin Litype 1 and 2 in a file.
667*600f14f4SXin Li
668*600f14f4SXin LiMIME-TYPE is optional; if left blank, it will be detected from the file.
669*600f14f4SXin LiFor best compatibility with players, use pictures with MIME type
670*600f14f4SXin Liimage/jpeg or image/png. The MIME type can also be \--\> to mean that
671*600f14f4SXin LiFILE is actually a URL to an image, though this use is discouraged.
672*600f14f4SXin Li
673*600f14f4SXin LiDESCRIPTION is optional; the default is an empty string.
674*600f14f4SXin Li
675*600f14f4SXin LiThe next part specifies the resolution and color information. If the
676*600f14f4SXin LiMIME-TYPE is image/jpeg, image/png, or image/gif, you can usually leave
677*600f14f4SXin Lithis empty and they can be detected from the file. Otherwise, you must
678*600f14f4SXin Lispecify the width in pixels, height in pixels, and color depth in
679*600f14f4SXin Libits-per-pixel. If the image has indexed colors you should also specify
680*600f14f4SXin Lithe number of colors used. When manually specified, it is not checked
681*600f14f4SXin Liagainst the file for accuracy.
682*600f14f4SXin Li
683*600f14f4SXin LiFILE is the path to the picture file to be imported, or the URL if MIME
684*600f14f4SXin Litype is \--\>
685*600f14f4SXin Li
686*600f14f4SXin LiFor example, "\|image/jpeg\|\|\|../cover.jpg" will embed the JPEG file
687*600f14f4SXin Liat ../cover.jpg, defaulting to type 3 (front cover) and an empty
688*600f14f4SXin Lidescription. The resolution and color info will be retrieved from the
689*600f14f4SXin Lifile itself.
690*600f14f4SXin Li
691*600f14f4SXin LiThe specification
692*600f14f4SXin Li"4\|\--\>\|CD\|320x300x24/173\|http://blah.blah/backcover.tiff" will
693*600f14f4SXin Liembed the given URL, with type 4 (back cover), description "CD", and a
694*600f14f4SXin Limanually specified resolution of 320x300, 24 bits-per-pixel, and 173
695*600f14f4SXin Licolors. The file at the URL will not be fetched; the URL itself is
696*600f14f4SXin Listored in the PICTURE metadata block.
697*600f14f4SXin Li
698*600f14f4SXin Li## Apodization functions
699*600f14f4SXin LiTo improve LPC analysis, audio data is windowed . The window can be
700*600f14f4SXin Liselected with one or more **-A** options. Possible functions are:
701*600f14f4SXin Libartlett, bartlett_hann, blackman, blackman_harris_4term_92db,
702*600f14f4SXin Liconnes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall,
703*600f14f4SXin Lirectangle, triangle, tukey(P), partial_tukey(n\[/ov\[/P\]\]),
704*600f14f4SXin Lipunchout_tukey(n\[/ov\[/P\]\]), subdivide_tukey(n\[/P\]) welch.
705*600f14f4SXin Li
706*600f14f4SXin Li- For gauss(STDDEV), STDDEV is the standard deviation (0\<STDDEV\<=0.5).
707*600f14f4SXin Li
708*600f14f4SXin Li- For tukey(P), P specifies the fraction of the window that is tapered
709*600f14f4SXin Li(0\<=P\<=1; P=0 corresponds to "rectangle" and P=1 corresponds to
710*600f14f4SXin Li"hann").
711*600f14f4SXin Li
712*600f14f4SXin Li- For partial_tukey(n) and punchout_tukey(n), n apodization functions are
713*600f14f4SXin Liadded that span different parts of each block. Values of 2 to 6 seem to
714*600f14f4SXin Liyield sane results. If necessary, an overlap can be specified, as can be
715*600f14f4SXin Lithe taper parameter, for example partial_tukey(2/0.2) or
716*600f14f4SXin Lipartial_tukey(2/0.2/0.5). ov should be smaller than 1 and can be
717*600f14f4SXin Linegative. The use of this is that different parts of a block are ignored
718*600f14f4SXin Lias the might contain transients which are hard to predict anyway. The
719*600f14f4SXin Liencoder will try each different added apodization (each covering a
720*600f14f4SXin Lidifferent part of the block) to see which resulting predictor results in
721*600f14f4SXin Lithe smallest representation.
722*600f14f4SXin Li
723*600f14f4SXin Li- subdivide_tukey(n) is a more efficient reimplementation of partial_tukey
724*600f14f4SXin Liand punchout_tukey taken together, recycling as much data as possible. It
725*600f14f4SXin Licombines all possible non-redundant partial_tukey(n) and punchout_tukey(n)
726*600f14f4SXin Liup to the n specified.  Specifying subdivide_tukey(3) is equivalent to
727*600f14f4SXin Lispecifying tukey, partial_tukey(2), partial_tukey(3) and punchout_tukey(3),
728*600f14f4SXin Lispecifying subdivide_tukey(5) equivalently adds partial_tukey(4),
729*600f14f4SXin Lipunchout_tukey(4), partial_tukey(5) and punchout_tukey(5). To be able to
730*600f14f4SXin Lireuse data as much as possible, the tukey taper is taken equal for all
731*600f14f4SXin Liwindows, and the P specified is applied for the smallest used window.
732*600f14f4SXin LiIn other words, subdivide_tukey(2/0.5) results in a taper equal to that
733*600f14f4SXin Liof tukey(0.25) and subdivide_tukey(5) in a taper equal to that of
734*600f14f4SXin Litukey(0.1). The default P for subdivide_tukey when none is specified is
735*600f14f4SXin Li0.5.
736*600f14f4SXin Li
737*600f14f4SXin LiNote that P, STDDEV and ov are locale specific, so a comma as
738*600f14f4SXin Lidecimal separator might be required instead of a dot. Use scientific
739*600f14f4SXin Linotation for a locale-independent specification, for example
740*600f14f4SXin Litukey(5e-1) instead of tukey(0.5) or tukey(0,5).
741*600f14f4SXin Li
742*600f14f4SXin LiMore than one -A option (up to 32) may be used. Any function that is
743*600f14f4SXin Lispecified erroneously is silently dropped. The encoder chooses suitable
744*600f14f4SXin Lidefaults in the absence of any -A options; any -A option specified
745*600f14f4SXin Lireplaces the default(s).
746*600f14f4SXin Li
747*600f14f4SXin LiWhen more than one function is specified, then for every subframe the
748*600f14f4SXin Liencoder will try each of them separately and choose the window that
749*600f14f4SXin Liresults in the smallest compressed subframe. Multiple functions can
750*600f14f4SXin Ligreatly increase the encoding time.
751*600f14f4SXin Li
752*600f14f4SXin Li# SEE ALSO
753*600f14f4SXin Li
754*600f14f4SXin Li**metaflac(1)**
755*600f14f4SXin Li
756*600f14f4SXin Li# AUTHOR
757*600f14f4SXin Li
758*600f14f4SXin LiThis manual page was initially written by Matt Zimmerman
759*600f14f4SXin Li\<[email protected]\> for the Debian GNU/Linux system (but may be used by
760*600f14f4SXin Liothers). It has been kept up-to-date by the Xiph.org Foundation.
761