Debian Codegraph @

man/flac.html

raw
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
3 <head>
4 <meta charset="utf-8" />
5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>flac(1) Version 1.5.0 | Free Lossless Audio Codec conversion tool</title>
8 <style>
9 code{white-space: pre-wrap;}
10 span.smallcaps{font-variant: small-caps;}
11 div.columns{display: flex; gap: min(4vw, 1.5em);}
12 div.column{flex: auto; overflow-x: auto;}
13 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
14
15 ul.task-list[class]{list-style: none;}
16 ul.task-list li input[type="checkbox"] {
17 font-size: inherit;
18 width: 0.8em;
19 margin: 0 0.8em 0.2em -1.6em;
20 vertical-align: middle;
21 }
22 .display.math{display: block; text-align: center; margin: 0.5rem auto;}
23 </style>
24 <style type="text/css">html{background-color: #B3D9B3;}body{position: relative;display: block;background-color: #F2F2DE;color: black;margin: 0 auto;padding: 0 0 10px 0;max-width: 1200px;font-family: lucida, verdana, helvetica, arial, sans-serif;font-weight: normal;font-size: 100%;}div.logo{position: relative;background-color: black;padding: 1px;text-align: center;}div.navbar {font-weight: bold;}@media (min-width: 800px){div.navbar{display: flex;gap: 5px;flex-direction: row;padding: 8px;text-align: center;}div.navbar:before, div.navbar:after{content: "";flex: 1 1;border-bottom: 2px solid;margin: 10px;}div.navbar div:first-child a::after, div.navbar div:last-child a:not(:last-child)::after {content: " - ";}#navbarshow{display: none;}}@media (max-width: 799px){div.navbar div{display: flex;gap: 5px;flex-direction: row;padding: 8px;text-align: center;}div.navbar div:before, div.navbar div:after{content: "";flex: 1 1;flex-grow: 3;border-bottom: 2px solid;margin: 10px;}div.navbar div a:not(:last-child)::after {content: " - ";}#navbarshow{display: none;}}div.navbar a{color: #000;text-decoration: none;}div.content{padding: 0 25px;}div.box_footer{border-width: 0px 0px 1px 0px;border-style: solid;border-color: black;background-color: #EEEED4;padding: 3px;}div.box_body{background-color: #EEEED4;padding: 0px 3px 0px 3px;font-family: lucida, verdana, helvetica, arial, sans-serif;font-weight: normal;font-size: 100%;}#newsbox h3{margin: 5px 0 0 0; font-size: 0.9em; }#newsbox p{margin: 0;}div.smallbox{text-align: left;margin: 0 0 0 8px;background-color: #EEEED4;}div.smallbox_title{text-align: center;border-width: 1px 0px 0px 0px;border-style: solid;border-color: black;background-color: #D3D4C5;padding: 3px;font-family: lucida, verdana, helvetica, arial, sans-serif;font-weight: bold;font-size: 100%;}div.smallbox_header{border-width: 1px 0px 0px 0px;border-style: solid;border-color: black;background-color: #EEEED4;padding: 3px;}div.smallbox_footer{border-width: 0px 0px 1px 0px;border-style: solid;border-color: black;background-color: #EEEED4;padding: 3px;}div.smallbox_body{background-color: #EEEED4;padding: 0px 3px 0px 3px;font-family: lucida, verdana, helvetica, arial, sans-serif;font-weight: normal;font-size: 80%;}div.copyright{text-align: left;padding-bottom: 10px;}div.copyright hr {margin: 20px 0;}span.commandname{font-family: monospace;font-weight: bold;}span.command{font-family: monospace;font-weight: bold;}span.argument{font-family: monospace;}span.code{font-family: monospace;}a:link, a:visited, a:active, a:hover{color:#336699;background-color:transparent;}div.imageflex{display: flex;flex-wrap: wrap;justify-content: center;padding: 0 20px}div.imageflex div{width: 200px;height: 125px;padding: 10px;text-align: center;}div.imageflex div span {display: block;text-align: center;}</style>
25 </head>
26 <body>
27 <div class="logo">
28 <img src="data:image/png;base64,
29 iVBORw0KGgoAAAANSUhEUgAAAKEAAABQBAMAAACDsQg5AAAAMFBMVEUAAABTAgC1AAMkMh/7AABQ
30 UQBbYFklgx8nnieiogCZm5i9wLzIysfY29f5+gD7/vuN5xJAAAAEtklEQVRYw92YP4vbPBjA9SKq
31 wU5I+xX6CQyBDHcX0qEf4F26CwwenJjc1vWFd+n4rt0MhQzOhQsUPLgXEihkSHNcIJAhdyGF7qVQ
32 uOGS4Nd/ZFmyZV+Sc4dWoER6LP2sP8/z6JEBKD69ePG8WOBfr1+/ynoGNVwkEVlr150VSEQez3V/
33 BuWaPlg8mYhufKD7AIB85bPvn0y8DIDuBoBKUHgyUQ6B7q4wIhmi6yqHE4X6KEVAFx9BFKUGJY6O
34 IL58+Zz799OQEmfHryO7nnBNiffFEBEFegpZCDHSHdeyOsUQQ4i7YCrFEJXiiI3IAgsjtiMvISLW
35 tI6aouj+imcmWG2zEI6od8mWsa4YNkOho2QQeyviJVarO4Unxmq1jXtDag+bQPjs/fv/ohy2iNXb
36 3SWIsb2T3pxXIUv/7Pv3r17+5uewhZtNlJlnkVc33IQwRUQ5xBLbG6eae8kUEKUcYoXtPE/Ombzm
37 IGKD7bwRDPFBNOtSDrHNdVdSEs+dCoiVHCI/xb4nueEkfvu09rRziGuu/4zf/NjMsg4tIXHqaPqU
38 euPkpPtC4k02Ed6GFn1CibSxpfXIpKN19HM462pVI55C09SEXSucK7mnO73xdfNkHTZK20zcIdOb
39 SUQmc8peNo8nIiJr8AYJjiE2p1M7JrbZIR5FRJfhqkXEoUhnDiISzdqpRLZmDDxJ/LoPkerzJpQh
40 oRZCz1ai/BiRNzlK3CNYzyAmTI4SwdHEdpIoCYnMOgY5h5gAuvNc4jd2v8VE0n/3ZVAUsUxPEqJE
41 c/HO7E+MpYgn9o8lXkZDjIpz6OZo+B7EYbxoZUJaP2aF+cSg+5aJBOZRvI4zbSayGzGRCQFlcs7w
42 3gwqh2k4ZFSlRIjkJN6Fg2yEHtc7BRQuP0LEcYMZjRaCsEoipwJ89+4fNj8y6+DGTW4ns+gt/plU
43 1ddkrPsT1/R4PKPwy3RIcQAxuiB3unEEUBdEAPsTk67HJyYCqSAU2p9YFhBF096fKImIgsAnQTzP
44 8Y9DATEpxAfoI91iniinouYDToX4kryLifyGBc3evPnbzyDKOWdhK+rYYYiImfcW5+zM7m4cE6NK
45 L+y4RKynRTccUEzcdrQqvchuLVqBgbI8KMi9tTRV4aTei3CmXeckvet0RN/YvBTdPw8k7pF+E+I5
46 m8GvSRotqalC/DEAcbVcIBrTop0q0NSU2ZoRz/rt23M2B1cBW8U1FfhfcW2kAb+o2FBTUCirqUhB
47 QGuioBYKNcN/rpF1/De5M9L46sOnq9pk4hFbXdO5kK25Xe6OnO6p8xmAZU/GDcn5UkF+i089r6Hs
48 rGTns3FhZhBR30EjuYUbHtGGPxZINhW7CxZjWDJVAHH9FDcquFkp4xaAPyTDrBtg0AL2AmUTbWl7
49 bdxdK8Aeg/vWEg1N+3q6aD7AnmfMg4FHrAOPqNQBGoEKLjWBYUyXcwCyiWiEzrAUjPGneaZ7/12g
50 4pIOHCD1y6e4XVHCMaJ4jOoC9bOIpg0mF7WJE67jste0xnbdGjkXTWcM0LKnT4aSdVuWHMdfR23i
51 lJxVyfpodLNmDbEKTlSgezuJUQfUOlDHYSGQ6RrWNe8XBTUUCK0atBTUydKePz79Dy84W9TLWTUv
52 AAAAAElFTkSuQmCC" alt="FLAC Logo" id="logo" />
53 </div>
54
55 <div class="content">
56
57
58 <header id="title-block-header">
59 <h1 class="title">flac(1) Version 1.5.0 | Free Lossless Audio Codec
60 conversion tool</h1>
61 </header>
62 <h1 id="name">NAME</h1>
63 <p>flac - Free Lossless Audio Codec</p>
64 <h1 id="synopsis">SYNOPSIS</h1>
65 <p><strong>flac</strong> [ <em>OPTIONS</em> ] [ <em>infile.wav</em> |
66 <em>infile.rf64</em> | <em>infile.aiff</em> | <em>infile.raw</em> |
67 <em>infile.flac</em> | <em>infile.oga</em> | <em>infile.ogg</em> |
68 <strong>-</strong> <em>…</em> ]</p>
69 <p><strong>flac</strong> [ <strong>-d</strong> |
70 <strong>--decode</strong> | <strong>-t</strong> |
71 <strong>--test</strong> | <strong>-a</strong> |
72 <strong>--analyze</strong> ] [ <em>OPTIONS</em> ] [ <em>infile.flac</em>
73 | <em>infile.oga</em> | <em>infile.ogg</em> | <strong>-</strong>
74 <em>…</em> ]</p>
75 <h1 id="description">DESCRIPTION</h1>
76 <p><strong>flac</strong> is a command-line tool for encoding, decoding,
77 testing and analyzing FLAC streams.</p>
78 <h1 id="general-usage">GENERAL USAGE</h1>
79 <p><strong>flac</strong> supports as input RIFF WAVE, Wave64, RF64,
80 AIFF, FLAC or Ogg FLAC format, or raw interleaved samples. The decoder
81 currently can output to RIFF WAVE, Wave64, RF64, or AIFF format, or raw
82 interleaved samples. flac only supports linear PCM samples (in other
83 words, no A-LAW, uLAW, etc.), and the input must be between 4 and 32
84 bits per sample.</p>
85 <p>flac assumes that files ending in “.wav” or that have the RIFF WAVE
86 header present are WAVE files, files ending in “.w64” or have the Wave64
87 header present are Wave64 files, files ending in “.rf64” or have the
88 RF64 header present are RF64 files, files ending in “.aif” or “.aiff” or
89 have the AIFF header present are AIFF files, files ending in “.flac” or
90 have the FLAC header present are FLAC files and files ending in “.oga”
91 or “.ogg” or have the Ogg FLAC header present are Ogg FLAC files.</p>
92 <p>Other than this, flac makes no assumptions about file extensions,
93 though the convention is that FLAC files have the extension “.flac” (or
94 “.fla” on ancient “8.3” file systems like FAT-16).</p>
95 <p>Before going into the full command-line description, a few other
96 things help to sort it out:</p>
97 <ol type="1">
98 <li>flac encodes by default, so you must use -d to decode</li>
99 <li>Encoding options -0 .. -8 (or --fast and --best) that control the
100 compression level actually are just synonyms for different groups of
101 specific encoding options (described later).<br />
102 </li>
103 <li>The order in which options are specified is generally not important
104 except when they contradict each other, then the latter takes precedence
105 except that compression presets are overridden by any option given
106 before or after. For example, -0M, -M0, -M2 and -2M are all the same as
107 -1, and -l 12 -6 the same as -7.</li>
108 <li>flac behaves similarly to gzip in the way it handles input and
109 output files</li>
110 </ol>
111 <p>Skip to the EXAMPLES section below for examples of some typical
112 tasks.</p>
113 <p>flac will be invoked one of four ways, depending on whether you are
114 encoding, decoding, testing, or analyzing. Encoding is the default
115 invocation, but can be switch to decoding with <strong>-d</strong>,
116 analysis with <strong>-a</strong> or testing with <strong>-t</strong>.
117 Depending on which way is chosen, encoding, decoding, analysis or
118 testing options can be used, see section OPTIONS for details. General
119 options can be used for all.</p>
120 <p>If only one inputfile is specified, it may be “-” for stdin. When
121 stdin is used as input, flac will write to stdout. Otherwise flac will
122 perform the desired operation on each input file to similarly named
123 output files (meaning for encoding, the extension will be replaced with
124 “.flac”, or appended with “.flac” if the input file has no extension,
125 and for decoding, the extension will be “.wav” for WAVE output and
126 “.raw” for raw output). The original file is not deleted unless
127 --delete-input-file is specified.</p>
128 <p>If you are encoding/decoding from stdin to a file, you should use the
129 -o option like so:</p>
130 <pre><code>flac [options] -o outputfile
131 flac -d [options] -o outputfile</code></pre>
132 <p>which are better than:</p>
133 <pre><code>flac [options] &gt; outputfile
134 flac -d [options] &gt; outputfile</code></pre>
135 <p>since the former allows flac to seek backwards to write the
136 STREAMINFO or RIFF WAVE header contents when necessary.</p>
137 <p>Also, you can force output data to go to stdout using -c.</p>
138 <p>To encode or decode files that start with a dash, use -- to signal
139 the end of options, to keep the filenames themselves from being treated
140 as options:</p>
141 <pre><code>flac -V -- -01-filename.wav</code></pre>
142 <p>The encoding options affect the compression ratio and encoding speed.
143 The format options are used to tell flac the arrangement of samples if
144 the input file (or output file when decoding) is a raw file. If it is a
145 RIFF WAVE, Wave64, RF64, or AIFF file the format options are not needed
146 since they are read from the file’s header.</p>
147 <p>In test mode, flac acts just like in decode mode, except no output
148 file is written. Both decode and test modes detect errors in the stream,
149 but they also detect when the MD5 signature of the decoded audio does
150 not match the stored MD5 signature, even when the bitstream is
151 valid.</p>
152 <p>flac can also re-encode FLAC files. In other words, you can specify a
153 FLAC or Ogg FLAC file as an input to the encoder and it will decoder it
154 and re-encode it according to the options you specify. It will also
155 preserve all the metadata unless you override it with other options
156 (e.g. specifying new tags, seekpoints, cuesheet, padding, etc.).</p>
157 <p>flac has been tuned so that the default settings yield a good speed
158 vs. compression tradeoff for many kinds of input. However, if you are
159 looking to maximize the compression rate or speed, or want to use the
160 full power of FLAC’s metadata system, see the page titled ‘About the
161 FLAC Format’ on the FLAC website.</p>
162 <h1 id="examples">EXAMPLES</h1>
163 <p>Some typical encoding and decoding tasks using flac:</p>
164 <h2 id="encoding-examples">Encoding examples</h2>
165 <dl>
166 <dt><code>flac abc.wav</code></dt>
167 <dd>
168 Encode abc.wav to abc.flac using the default compression setting.
169 abc.wav is not deleted.
170 </dd>
171 <dt><code>flac --delete-input-file abc.wav</code></dt>
172 <dd>
173 Like above, except abc.wav is deleted if there were no errors.
174 </dd>
175 <dt><code>flac --delete-input-file -w abc.wav</code></dt>
176 <dd>
177 Like above, except abc.wav is deleted if there were no errors and no
178 warnings.
179 </dd>
180 <dt><code>flac --best abc.wav</code> or
181 <code>flac -8 abc.wav</code></dt>
182 <dd>
183 Encode abc.wav to abc.flac using the highest compression preset.
184 </dd>
185 <dt><code>flac --verify abc.wav</code> or
186 <code>flac -V abc.wav</code></dt>
187 <dd>
188 Encode abc.wav to abc.flac and internally decode abc.flac to make sure
189 it matches abc.wav.
190 </dd>
191 <dt><code>flac -o my.flac abc.wav</code></dt>
192 <dd>
193 Encode abc.wav to my.flac.
194 </dd>
195 <dt><code>flac abc.aiff foo.rf64 bar.w64</code></dt>
196 <dd>
197 Encode abc.aiff to abc.flac, foo.rf64 to foo.flac and bar.w64 to
198 bar.flac
199 </dd>
200 <dt><code>flac *.wav *.aif?</code></dt>
201 <dd>
202 Wildcards are supported. This command will encode all .wav files and all
203 .aif/.aiff/.aifc files (as well as other supported files ending in
204 .aif+one character) in the current directory.
205 </dd>
206 <dt><code>flac abc.flac --force</code> or
207 <code>flac abc.flac -f</code></dt>
208 <dd>
209 Recompresses, keeping metadata like tags. The syntax is a little tricky:
210 this is an <em>encoding</em> command (which is the default: you need to
211 specify -d for decoded output), and will thus want to output the file
212 abc.flac - which already exists. flac will require the --force or
213 shortform -f option to overwrite an existing file. Recompression will
214 first write a temporary file, which afterwards replaces the old abc.flac
215 (provided flac has write access to that file). The above example uses
216 default settings. More often, recompression is combined with a different
217 - usually higher - compression option. Note: If the FLAC file does not
218 end with .flac - say, it is abc.fla - the -f is not needed: A new
219 abc.flac will be created and the old kept, just like for an uncompressed
220 input file.
221 </dd>
222 <dt><code>flac --tag-from-file=&quot;ALBUM=albumtitle.txt&quot; -T &quot;ARTIST=Queen&quot; *.wav</code></dt>
223 <dd>
224 Encode every .wav file in the directory and add some tags. Every file
225 will get the same set of tags. Warning: Will wipe all existing tags,
226 when the input file is (Ogg) FLAC - not just those tags listed in the
227 option. Use the metaflac utility to tag FLAC files.
228 </dd>
229 <dt><code>flac --keep-foreign-metadata-if-present abc.wav</code></dt>
230 <dd>
231 FLAC files can store non-audio chunks of input WAVE/AIFF/RF64/W64 files.
232 The related option --keep-foreign-metadata works the same way, but will
233 instead exit with an error if the input has no such non-audio chunks.
234 The encoder only stores the chunks as they are, it cannot import the
235 content into its own tags (vorbis comments). To transfer such tags from
236 a source file, use tagging software which supports them.
237 </dd>
238 <dt><code>flac -Vj2 -m3fo Track07.flac -- -7.wav</code></dt>
239 <dd>
240 flac employs the commonplace convention that options in a short version
241 - invoked with single dash - can be shortened together until one that
242 takes an argument. Here -j and -o do, and after the “2” a whitespace is
243 needed to start new options with single/double dash. The -m option does
244 not, and the following “3” is the -3 compression setting. The options
245 could equally well have been written out as -V -j 2 -m -3 -f -o
246 Track04.flac , or as -fo Track04.flac -3mVj2. flac also employs the
247 convention that <code>--</code> (with whitespace!) signifies end of
248 options, treating everything to follow as filename. That is needed when
249 an input filenames could otherwise be read as an option, and “-7” is one
250 such. In total, this line takes the input file -7.wav as input; -o will
251 give output filename as Track07.flac, and the -f will overwrite if the
252 file Track04.flac is already present. The encoder will select encoding
253 preset -3 modified with the -m switch, and use two CPU threads.
254 Afterwards, the -V will make it decode the flac file and compare the
255 audio to the input, to ensure they are indeed equal.
256 </dd>
257 </dl>
258 <h2 id="decoding-examples">Decoding examples</h2>
259 <dl>
260 <dt><code>flac --decode abc.flac</code> or
261 <code>flac -d abc.flac</code></dt>
262 <dd>
263 Decode abc.flac to abc.wav. abc.flac is not deleted. If abc.wav is
264 already present, the process will exit with an error instead of
265 overwriting; use –force / -f to force overwrite. NOTE: A mere flac
266 abc.flac <em>without –decode or its shortform -d</em>, would mean to
267 re-encode abc.flac to abc.flac (see above), and that command would err
268 out because abc.flac already exists.
269 </dd>
270 <dt><code>flac -d --force-aiff-format abc.flac</code> or
271 <code>flac -d -o abc.aiff abc.flac</code></dt>
272 <dd>
273 Two different ways of decoding abc.flac to abc.aiff (AIFF format).
274 abc.flac is not deleted. -d -o could be shortened to -do. The decoder
275 can force other output formats, or different versions of the WAVE/AIFF
276 formats, see the options below.
277 </dd>
278 <dt><code>flac -d --keep-foreign-metadata-if-present abc.flac</code></dt>
279 <dd>
280 If the FLAC file has non-audio chunks stored from the original input
281 file, this option will restore both audio and non-audio. The chunks will
282 reveal the original file type, and the decoder will select output format
283 and output file extension accordingly - note that this is not compatible
284 with forcing a particular output format except if it coincides with the
285 original, as the decoder cannot transcode non-audio between formats. If
286 there are no such chunks stored, it will decode to abc.wav. The related
287 option --keep-foreign-metadata will instead exit with an error if no
288 such non-audio chunks are found.
289 </dd>
290 <dt><code>flac -d -F abc.flac</code></dt>
291 <dd>
292 Decode abc.flac to abc.wav and don’t abort if errors are found. This is
293 potentially useful for recovering as much as possible from a corrupted
294 file. Note: Be careful about trying to “repair” files this way. Often it
295 will only conceal an error, and not play any subjectively “better” than
296 the corrupted file. It is a good idea to at least keep it, and possibly
297 try several decoders, including the one that generated the file, and
298 hear if one has less detrimental audible errors than another. Make sure
299 output volume is limited, as corrupted audio can generate loud noises.
300 </dd>
301 </dl>
302 <h1 id="options">OPTIONS</h1>
303 <p>A summary of options is included below. Several of the options can be
304 negated, see the <strong>Negative options</strong> section below.</p>
305 <h2 id="general-options">GENERAL OPTIONS</h2>
306 <dl>
307 <dt><strong>-v</strong>, <strong>--version</strong></dt>
308 <dd>
309 Show the flac version number, and quit.
310 </dd>
311 <dt><strong>-h</strong>, <strong>--help</strong></dt>
312 <dd>
313 Show basic usage and a list of all options, and quit.
314 </dd>
315 <dt><strong>-d</strong>, <strong>--decode</strong></dt>
316 <dd>
317 Decode (the default behavior is to encode)
318 </dd>
319 <dt><strong>-t</strong>, <strong>--test</strong></dt>
320 <dd>
321 Test a flac encoded file. This works the same as -d except no decoded
322 file is written, and with some additional checks like parsing of all
323 metadata blocks.
324 </dd>
325 <dt><strong>-a</strong>, <strong>--analyze</strong></dt>
326 <dd>
327 Analyze a FLAC encoded file. This works the same as -d except the output
328 is an analysis file, not a decoded file.
329 </dd>
330 <dt><strong>-c</strong>, <strong>--stdout</strong></dt>
331 <dd>
332 Write output to stdout
333 </dd>
334 <dt><strong>-f</strong>, <strong>--force</strong></dt>
335 <dd>
336 Force overwriting of output files. By default, flac warns that the
337 output file already exists and continues to the next file.
338 </dd>
339 <dt><strong>--delete-input-file</strong></dt>
340 <dd>
341 Automatically delete the input file after a successful encode or decode.
342 If there was an error (including a verify error) the input file is left
343 intact.
344 </dd>
345 <dt><strong>-o</strong> <em>FILENAME</em>,
346 <strong>--output-name</strong>=<em>FILENAME</em></dt>
347 <dd>
348 Force the output file name (usually flac just changes the extension).
349 May only be used when encoding a single file. May not be used in
350 conjunction with --output-prefix.
351 </dd>
352 <dt><strong>--output-prefix</strong>=<em>STRING</em></dt>
353 <dd>
354 Prefix each output file name with the given string. This can be useful
355 for encoding or decoding files to a different directory. Make sure if
356 your string is a path name that it ends with a trailing `/’ (slash).
357 </dd>
358 <dt><strong>--preserve-modtime</strong></dt>
359 <dd>
360 (Enabled by default.) Output files have their timestamps/permissions set
361 to match those of their inputs. Use --no-preserve-modtime to make output
362 files have the current time and default permissions.
363 </dd>
364 <dt><strong>--keep-foreign-metadata</strong></dt>
365 <dd>
366 If encoding, save WAVE, RF64, or AIFF non-audio chunks in FLAC metadata.
367 If decoding, restore any saved non-audio chunks from FLAC metadata when
368 writing the decoded file. Foreign metadata cannot be transcoded,
369 e.g. WAVE chunks saved in a FLAC file cannot be restored when decoding
370 to AIFF. Input and output must be regular files (not stdin or stdout).
371 With this option, FLAC will pick the right output format on decoding. It
372 will exit with error if no such chunks are found.
373 </dd>
374 <dt><strong>--keep-foreign-metadata-if-present</strong></dt>
375 <dd>
376 Like --keep-foreign-metadata, but without throwing an error if foreign
377 metadata cannot be found or restored. Instead, prints a warning.
378 </dd>
379 <dt><strong>--skip</strong>={#|<em>MM:SS</em>}</dt>
380 <dd>
381 Skip the first number of samples of the input. To skip over a given
382 initial time, specify instead minutes and seconds: there must then be at
383 least one digit on each side of the colon sign. Fractions of a second
384 can be specified, with locale-dependent decimal point, e.g.
385 --skip=123:9,867 if your decimal point is a comma. A --skip option is
386 applied to each input file if more are given. This option cannot be used
387 with -t. When used with -a, the analysis file will enumerate frames from
388 starting point.
389 </dd>
390 <dt><strong>--until</strong>={#|[+|]<em>MM:SS</em>}</dt>
391 <dd>
392 Stop at the given sample number (which is not included). A negative
393 number is taken relative to the end of the audio, a `+’ (plus) sign
394 means that the --until point is taken relative to the --skip point. For
395 other considerations, see --skip.
396 </dd>
397 <dt><strong>--no-utf8-convert</strong></dt>
398 <dd>
399 Do not convert tags from local charset to UTF-8. This is useful for
400 scripts, and setting tags in situations where the locale is wrong. This
401 option must appear before any tag options!
402 </dd>
403 <dt><strong>-s</strong>, <strong>--silent</strong></dt>
404 <dd>
405 Silent mode (do not write runtime encode/decode statistics to stderr)
406 </dd>
407 <dt><strong>--totally-silent</strong></dt>
408 <dd>
409 Do not print anything of any kind, including warnings or errors. The
410 exit code will be the only way to determine successful completion.
411 </dd>
412 <dt><strong>-w</strong>, <strong>--warnings-as-errors</strong></dt>
413 <dd>
414 Treat all warnings as errors (which cause flac to terminate with a
415 non-zero exit code).
416 </dd>
417 </dl>
418 <h2 id="decoding-options">DECODING OPTIONS</h2>
419 <dl>
420 <dt><strong>-F</strong>, <strong>--decode-through-errors</strong></dt>
421 <dd>
422 By default flac stops decoding with an error message and removes the
423 partially decoded file if it encounters a bitstream error. With -F,
424 errors are still printed but flac will continue decoding to completion.
425 Note that errors may cause the decoded audio to be missing some samples
426 or have silent sections.
427 </dd>
428 <dt><strong>--cue</strong>=[#.#][-[#.#]]</dt>
429 <dd>
430 Set the beginning and ending cuepoints to decode. Decimal points are
431 locale-dependent (dot or comma). The optional first #.# is the track and
432 index point at which decoding will start; the default is the beginning
433 of the stream. The optional second #.# is the track and index point at
434 which decoding will end; the default is the end of the stream. If the
435 cuepoint does not exist, the closest one before it (for the start point)
436 or after it (for the end point) will be used. If those don’t exist , the
437 start of the stream (for the start point) or end of the stream (for the
438 end point) will be used. The cuepoints are merely translated into sample
439 numbers then used as --skip and --until. A CD track can always be cued
440 by, for example, --cue=9.1-10.1 for track 9, even if the CD has no 10th
441 track.
442 </dd>
443 <dt><strong>–decode-chained-stream</strong></dt>
444 <dd>
445 Decode all links in a chained Ogg stream, not just the first one.
446 </dd>
447 <dt><strong>--apply-replaygain-which-is-not-lossless</strong>[=<em>SPECIFICATION</em>]</dt>
448 <dd>
449 Applies ReplayGain values while decoding. <strong>WARNING: THIS IS NOT
450 LOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS
451 OPTION.</strong> This option is useful for example in transcoding media
452 servers, where the client does not support ReplayGain. For details on
453 the use of this option, see the section <strong>ReplayGain application
454 specification</strong>.
455 </dd>
456 </dl>
457 <h2 id="encoding-options">ENCODING OPTIONS</h2>
458 <p>Encoding will default to -5, -A “tukey(5e-1)” and one CPU thread.</p>
459 <dl>
460 <dt><strong>-V</strong>, <strong>--verify</strong></dt>
461 <dd>
462 Verify a correct encoding by decoding the output in parallel and
463 comparing to the original.
464 </dd>
465 <dt><strong>-0</strong>, <strong>--compression-level-0</strong>,
466 <strong>--fast</strong></dt>
467 <dd>
468 Fastest compression preset. Currently synonymous with
469 <code>-l 0 -b 1152 -r 3 --no-mid-side</code>
470 </dd>
471 <dt><strong>-1</strong>, <strong>--compression-level-1</strong></dt>
472 <dd>
473 Currently synonymous with <code>-l 0 -b 1152 -M -r 3</code>
474 </dd>
475 <dt><strong>-2</strong>, <strong>--compression-level-2</strong></dt>
476 <dd>
477 Currently synonymous with <code>-l 0 -b 1152 -m -r 3</code>
478 </dd>
479 <dt><strong>-3</strong>, <strong>--compression-level-3</strong></dt>
480 <dd>
481 Currently synonymous with <code>-l 6 -b 4096 -r 4 --no-mid-side</code>
482 </dd>
483 <dt><strong>-4</strong>, <strong>--compression-level-4</strong></dt>
484 <dd>
485 Currently synonymous with <code>-l 8 -b 4096 -M -r 4</code>
486 </dd>
487 <dt><strong>-5</strong>, <strong>--compression-level-5</strong></dt>
488 <dd>
489 Currently synonymous with <code>-l 8 -b 4096 -m -r 5</code>
490 </dd>
491 <dt><strong>-6</strong>, <strong>--compression-level-6</strong></dt>
492 <dd>
493 Currently synonymous with
494 <code>-l 8 -b 4096 -m -r 6 -A &quot;subdivide_tukey(2)&quot;</code>
495 </dd>
496 <dt><strong>-7</strong>, <strong>--compression-level-7</strong></dt>
497 <dd>
498 Currently synonymous with
499 <code>-l 12 -b 4096 -m -r 6 -A &quot;subdivide_tukey(2)&quot;</code>
500 </dd>
501 <dt><strong>-8</strong>, <strong>--compression-level-8</strong>,
502 <strong>--best</strong></dt>
503 <dd>
504 Currently synonymous with
505 <code>-l 12 -b 4096 -m -r 6 -A &quot;subdivide_tukey(3)&quot;</code>
506 </dd>
507 <dt><strong>-l</strong> #, <strong>--max-lpc-order</strong>=#</dt>
508 <dd>
509 Specifies the maximum LPC order. This number must be &lt;= 32. For
510 subset streams, it must be &lt;=12 if the sample rate is &lt;=48kHz. If
511 0, the encoder will not attempt generic linear prediction, and only
512 choose among a set of fixed (hard-coded) predictors. Restricting to
513 fixed predictors only is faster, but compresses weaker - typically five
514 percentage points / ten percent larger files.
515 </dd>
516 <dt><strong>-b</strong> #, <strong>--blocksize</strong>=#</dt>
517 <dd>
518 Specify the blocksize in samples. The current default is 1152 for -l 0,
519 else 4096. Blocksize must be between 16 and 65535 (inclusive). For
520 subset streams it must be &lt;= 4608 if the samplerate is &lt;= 48kHz,
521 for subset streams with higher samplerates it must be &lt;= 16384.
522 </dd>
523 <dt><strong>-m</strong>, <strong>--mid-side</strong></dt>
524 <dd>
525 Try mid-side coding for each frame (stereo only, otherwise ignored).
526 </dd>
527 <dt><strong>-M</strong>, <strong>--adaptive-mid-side</strong></dt>
528 <dd>
529 Adaptive mid-side coding for all frames (stereo only, otherwise
530 ignored).
531 </dd>
532 <dt><strong>-r</strong> [#,]#,
533 <strong>--rice-partition-order</strong>=[#,]#</dt>
534 <dd>
535 Set the [min,]max residual partition order (0..15). For subset streams,
536 max must be &lt;=8. min defaults to 0. Default is -r 5. Actual
537 partitioning will be restricted by block size and prediction order, and
538 the encoder will silently reduce too high values.
539 </dd>
540 <dt><strong>-A</strong> <em>FUNCTION(S)</em>,
541 <strong>--apodization</strong>=<em>FUNCTION(S)</em></dt>
542 <dd>
543 Window audio data with given apodization function. More can be given,
544 comma-separated. See section <strong>Apodization functions</strong> for
545 details.
546 </dd>
547 <dt><strong>-e</strong>, <strong>--exhaustive-model-search</strong></dt>
548 <dd>
549 Do exhaustive model search (expensive!).
550 </dd>
551 <dt><strong>-q</strong> #, <strong>--qlp-coeff-precision</strong>=#</dt>
552 <dd>
553 Precision of the quantized linear-predictor coefficients. This number
554 must be in between 5 and 16, or 0 (the default) to let encoder decide.
555 Does nothing if using -l 0.
556 </dd>
557 <dt><strong>-p</strong>,
558 <strong>--qlp-coeff-precision-search</strong></dt>
559 <dd>
560 Do exhaustive search of LP coefficient quantization (expensive!).
561 Overrides -q; does nothing if using -l 0.
562 </dd>
563 <dt><strong>--lax</strong></dt>
564 <dd>
565 Allow encoder to generate non-Subset files. The resulting FLAC file may
566 not be streamable or might have trouble being played in all players
567 (especially hardware devices), so you should only use this option in
568 combination with custom encoding options meant for archival.
569 </dd>
570 <dt><strong>--limit-min-bitrate</strong></dt>
571 <dd>
572 Limit minimum bitrate by not allowing frames consisting of only constant
573 subframes. This ensures a bitrate of at least 1 bit/sample, for example
574 48kbit/s for 48kHz input. This is mainly useful for internet streaming.
575 </dd>
576 <dt><strong>-j</strong> #, <strong>--threads</strong>=#</dt>
577 <dd>
578 Try to set a maximum number of threads to use for encoding. If
579 multithreading was not enabled on compilation or when setting a number
580 of threads that is too high, this fails with a warning. The value of 0
581 means a default set by the encoder; currently that is 1 thread (i.e. no
582 multithreading), but that could change in the future. Currently, up to
583 128 threads are supported. Using a value higher than the number of
584 available CPU threads harms performance.
585 </dd>
586 <dt><strong>--ignore-chunk-sizes</strong></dt>
587 <dd>
588 When encoding to flac, ignore the file size headers in WAV and AIFF
589 files to attempt to work around problems with over-sized or malformed
590 files. WAV and AIFF files both specifies length of audio data with an
591 unsigned 32-bit number, limiting audio to just over 4 gigabytes. Files
592 larger than this are malformed, but should be read correctly using this
593 option. Beware however, it could misinterpret any data following the
594 audio chunk, as audio.
595 </dd>
596 <dt><strong>--replay-gain</strong></dt>
597 <dd>
598 Calculate ReplayGain values and store them as FLAC tags, similar to
599 vorbisgain. Title gains/peaks will be computed for each input file, and
600 an album gain/peak will be computed for all files. All input files must
601 have the same resolution, sample rate, and number of channels. Only mono
602 and stereo files are allowed, and the sample rate must be 8, 11.025, 12,
603 16, 18.9, 22.05, 24, 28, 32, 36, 37.8, 44.1, 48, 56, 64, 72, 75.6, 88.2,
604 96, 112, 128, 144, 151.2, 176.4, 192, 224, 256, 288, 302.4, 352.8, 384,
605 448, 512, 576, or 604.8 kHz. Also note that this option may leave a few
606 extra bytes in a PADDING block as the exact size of the tags is not
607 known until all files are processed. Note that this option cannot be
608 used when encoding to standard output (stdout).
609 </dd>
610 <dt><strong>--cuesheet</strong>=<em>FILENAME</em></dt>
611 <dd>
612 Import the given cuesheet file and store it in a CUESHEET metadata
613 block. This option may only be used when encoding a single file. A
614 seekpoint will be added for each index point in the cuesheet to the
615 SEEKTABLE unless --no-cued-seekpoints is specified.
616 </dd>
617 <dt><strong>--picture</strong>={<em>FILENAME|SPECIFICATION</em>}</dt>
618 <dd>
619 Import a picture and store it in a PICTURE metadata block. More than one
620 --picture option can be specified. Either a filename for the picture
621 file or a more complete specification form can be used. The
622 <em>SPECIFICATION</em> is a string whose parts are separated by | (pipe)
623 characters. Some parts may be left empty to invoke default values.
624 Specifying only <em>FILENAME</em> is just shorthand for “||||FILENAME”.
625 See the section <strong>Picture specification</strong> for
626 <em>SPECIFICATION</em> format.
627 </dd>
628 <dt><strong>-S</strong> {#|X|#x|#s},
629 <strong>--seekpoint</strong>={#|X|#x|#s}</dt>
630 <dd>
631 Specifies point(s) to include in SEEKTABLE, to override the encoder’s
632 default choice of one per ten seconds (‘-s 10s’). Using #, a seek point
633 at that sample number is added. Using X, a placeholder point is added at
634 the end of a the table. Using #x, # evenly spaced seek points will be
635 added, the first being at sample 0. Using #s, a seekpoint will be added
636 every # seconds, where decimal points are locale-dependent, e.g.  ‘-s
637 9.5s’ or ‘-s 9,5s’. Several -S options may be given; the resulting
638 SEEKTABLE will contain all seekpoints specified (duplicates removed).
639 Note: ‘-S #x’ and ‘-S #s’ will not work if the encoder cannot determine
640 the input size before starting. Note: if you use ‘-S #’ with # being
641 &gt;= the number of samples in the input, there will be either no seek
642 point entered (if the input size is determinable before encoding starts)
643 or a placeholder point (if input size is not determinable). Use
644 --no-seektable for no SEEKTABLE.
645 </dd>
646 <dt><strong>-P</strong> #, <strong>--padding</strong>=#</dt>
647 <dd>
648 (Default: 8192 bytes, although 65536 for input above 20 minutes.) Tell
649 the encoder to write a PADDING metadata block of the given length (in
650 bytes) after the STREAMINFO block. This is useful for later tagging,
651 where one can write over the PADDING block instead of having to rewrite
652 the entire file. Note that a block header of 4 bytes will come on top of
653 the length specified.
654 </dd>
655 <dt><strong>-T</strong> “<em>FIELD=VALUE</em>”<strong>,
656 --tag</strong>=“<em>FIELD=VALUE</em>”</dt>
657 <dd>
658 Add a FLAC tag. The comment must adhere to the Vorbis comment spec;
659 i.e. the FIELD must contain only legal characters, terminated by an
660 ‘equals’ sign. Make sure to quote the content if necessary. This option
661 may appear more than once to add several Vorbis comments. NOTE: all tags
662 will be added to all encoded files.
663 </dd>
664 <dt><strong>--tag-from-file</strong>=“<em>FIELD=FILENAME</em>”</dt>
665 <dd>
666 Like --tag, except FILENAME is a file whose contents will be read
667 verbatim to set the tag value. The contents will be converted to UTF-8
668 from the local charset. This can be used to store a cuesheet in a tag
669 (e.g. --tag-from-file=“CUESHEET=image.cue”). Do not try to store binary
670 data in tag fields! Use APPLICATION blocks for that.
671 </dd>
672 </dl>
673 <h2 id="format-options">FORMAT OPTIONS</h2>
674 <p>Encoding defaults to FLAC and not OGG. Decoding defaults to WAVE
675 (more specifically WAVE_FORMAT_PCM for mono/stereo with 8/16 bits, and
676 to WAVE_FORMAT_EXTENSIBLE otherwise), except: will be overridden by
677 chunks found by --keep-foreign-metadata-if-present or
678 --keep-foreign-metadata</p>
679 <dl>
680 <dt><strong>--ogg</strong></dt>
681 <dd>
682 When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC
683 streams are FLAC streams wrapped in an Ogg transport layer. The
684 resulting file should have an ‘.oga’ extension and will still be
685 decodable by flac. When decoding, force the input to be treated as Ogg
686 FLAC. This is useful when piping input from stdin or when the filename
687 does not end in ‘.oga’ or ‘.ogg’.
688 </dd>
689 <dt><strong>--serial-number</strong>=#</dt>
690 <dd>
691 When used with --ogg, specifies the serial number to use for the first
692 Ogg FLAC stream, which is then incremented for each additional stream.
693 When encoding and no serial number is given, flac uses a random number
694 for the first stream, then increments it for each additional stream.
695 When decoding and no number is given, flac uses the serial number of the
696 first page.
697 </dd>
698 </dl>
699 <p><strong>--force-aiff-format</strong><br />
700 <strong>--force-rf64-format</strong><br />
701 <strong>--force-wave64-format</strong> : For decoding: Override default
702 output format and force output to AIFF/RF64/WAVE64, respectively. This
703 option is not needed if the output filename (as set by -o) ends with
704 <em>.aif</em> or <em>.aiff</em>, <em>.rf64</em> and <em>.w64</em>
705 respectively. The encoder auto-detects format and ignores this
706 option.</p>
707 <p><strong>--force-legacy-wave-format</strong><br />
708 <strong>--force-extensible-wave-format</strong> : Instruct the decoder
709 to output a WAVE file with WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE
710 respectively, overriding default choice.</p>
711 <p><strong>--force-aiff-c-none-format</strong><br />
712 <strong>--force-aiff-c-sowt-format</strong> : Instruct the decoder to
713 output an AIFF-C file with format NONE and sowt respectively.</p>
714 <dl>
715 <dt><strong>--force-raw-format</strong></dt>
716 <dd>
717 Force input (when encoding) or output (when decoding) to be treated as
718 raw samples (even if filename suggests otherwise).
719 </dd>
720 </dl>
721 <h3 id="raw-format-options">raw format options</h3>
722 <p>When encoding from or decoding to raw PCM, format must be
723 specified.</p>
724 <dl>
725 <dt><strong>--sign</strong>={signed|unsigned}</dt>
726 <dd>
727 Specify the sign of samples.
728 </dd>
729 <dt><strong>--endian</strong>={big|little}</dt>
730 <dd>
731 Specify the byte order for samples
732 </dd>
733 <dt><strong>--channels</strong>=#</dt>
734 <dd>
735 (Input only) specify number of channels. The channels must be
736 interleaved, and in the order of the FLAC format (see the format
737 specification); the encoder (/decoder) cannot re-order channels.
738 </dd>
739 <dt><strong>--bps</strong>=#</dt>
740 <dd>
741 (Input only) specify bits per sample (per channel: 16 for CDDA.)
742 </dd>
743 <dt><strong>--sample-rate</strong>=#</dt>
744 <dd>
745 (Input only) specify sample rate (in Hz. Only integers supported.)
746 </dd>
747 <dt><strong>--input-size</strong>=#</dt>
748 <dd>
749 (Input only) specify the size of the raw input in bytes. This option is
750 only compulsory when encoding from stdin and using options that need to
751 know the input size beforehand (like, --skip, --until, --cuesheet ) The
752 encoder will truncate at the specified size if the input stream is
753 bigger. If the input stream is smaller, it will complain about an
754 unexpected end-of-file.
755 </dd>
756 </dl>
757 <h2 id="analysis-options">ANALYSIS OPTIONS</h2>
758 <dl>
759 <dt><strong>--residual-text</strong></dt>
760 <dd>
761 Includes the residual signal in the analysis file. This will make the
762 file very big, much larger than even the decoded file.
763 </dd>
764 <dt><strong>--residual-gnuplot</strong></dt>
765 <dd>
766 Generates a gnuplot file for every subframe; each file will contain the
767 residual distribution of the subframe. This will create a lot of files.
768 gnuplot must be installed separately.
769 </dd>
770 </dl>
771 <h2 id="negative-options">NEGATIVE OPTIONS</h2>
772 <p>The following will negate an option previously given:</p>
773 <p><strong>--no-adaptive-mid-side</strong><br />
774 <strong>--no-cued-seekpoints</strong><br />
775 <strong>--no-decode-through-errors</strong><br />
776 <strong>--no-delete-input-file</strong><br />
777 <strong>--no-preserve-modtime</strong><br />
778 <strong>--no-keep-foreign-metadata</strong><br />
779 <strong>--no-exhaustive-model-search</strong><br />
780 <strong>--no-force</strong><br />
781 <strong>--no-lax</strong><br />
782 <strong>--no-mid-side</strong><br />
783 <strong>--no-ogg</strong><br />
784 <strong>--no-padding</strong><br />
785 <strong>--no-qlp-coeff-prec-search</strong><br />
786 <strong>--no-replay-gain</strong><br />
787 <strong>--no-residual-gnuplot</strong><br />
788 <strong>--no-residual-text</strong><br />
789 <strong>--no-seektable</strong><br />
790 <strong>--no-silent</strong><br />
791 <strong>--no-verify</strong><br />
792 <strong>--no-warnings-as-errors</strong></p>
793 <h2 id="replaygain-application-specification">ReplayGain application
794 specification</h2>
795 <p>The option
796 --apply-replaygain-which-is-not-lossless[=&lt;specification&gt;] applies
797 ReplayGain values while decoding. <strong>WARNING: THIS IS NOT LOSSLESS.
798 DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS
799 OPTION.</strong> This option is useful for example in transcoding media
800 servers, where the client does not support ReplayGain.</p>
801 <p>The &lt;specification&gt; is a shorthand notation for describing how
802 to apply ReplayGain. All elements are optional - defaulting to 0aLn1 -
803 but order is important. The format is:</p>
804 <p>[&lt;preamp&gt;][a|t][l|L][n{0|1|2|3}]</p>
805 <p>In which the following parameters are used:</p>
806 <ul>
807 <li><p><strong>preamp</strong>: A floating point number in dB. This is
808 added to the existing gain value.</p></li>
809 <li><p><strong>a|t</strong>: Specify ‘a’ to use the album gain, or ‘t’
810 to use the track gain. If tags for the preferred kind (album/track) do
811 not exist but tags for the other (track/album) do, those will be used
812 instead.</p></li>
813 <li><p><strong>l|L</strong>: Specify ‘l’ to peak-limit the output, so
814 that the ReplayGain peak value is full-scale. Specify ‘L’ to use a 6dB
815 hard limiter that kicks in when the signal approaches
816 full-scale.</p></li>
817 <li><p><strong>n{0|1|2|3}</strong>: Specify the amount of noise shaping.
818 ReplayGain synthesis happens in floating point; the result is dithered
819 before converting back to integer. This quantization adds noise. Noise
820 shaping tries to move the noise where you won’t hear it as much. 0 means
821 no noise shaping, 1 means ‘low’, 2 means ‘medium’, 3 means
822 ‘high’.</p></li>
823 </ul>
824 <p>For example, the default of 0aLn1 means 0dB preamp, use album gain,
825 6dB hard limit, low noise shaping.
826 --apply-replaygain-which-is-not-lossless=3 means 3dB preamp, use album
827 gain, no limiting, no noise shaping.</p>
828 <p>flac uses the ReplayGain tags for the calculation. If a stream does
829 not have the required tags or they can’t be parsed, decoding will
830 continue with a warning, and no ReplayGain is applied to that
831 stream.</p>
832 <h2 id="picture-specification">Picture specification</h2>
833 <p>This described the specification used for the
834 <strong>--picture</strong> option.
835 [<em>TYPE</em>]|[<em>MIME-TYPE</em>]|[<em>DESCRIPTION</em>]|[<em>WIDTHxHEIGHTxDEPTH</em>[/<em>COLORS</em>]]|<em>FILE</em></p>
836 <p><em>TYPE</em> is optional; it is a number from one of:</p>
837 <ol start="0" type="1">
838 <li>Other</li>
839 <li>32x32 pixels ‘file icon’ (PNG only)</li>
840 <li>Other file icon</li>
841 <li>Cover (front)</li>
842 <li>Cover (back)</li>
843 <li>Leaflet page</li>
844 <li>Media (e.g. label side of CD)</li>
845 <li>Lead artist/lead performer/soloist</li>
846 <li>Artist/performer</li>
847 <li>Conductor</li>
848 <li>Band/Orchestra</li>
849 <li>Composer</li>
850 <li>Lyricist/text writer</li>
851 <li>Recording Location</li>
852 <li>During recording</li>
853 <li>During performance</li>
854 <li>Movie/video screen capture</li>
855 <li>A bright coloured fish</li>
856 <li>Illustration</li>
857 <li>Band/artist logotype</li>
858 <li>Publisher/Studio logotype</li>
859 </ol>
860 <p>The default is 3 (front cover). There may only be one picture each of
861 type 1 and 2 in a file.</p>
862 <p><em>MIME-TYPE</em> is optional; if left blank, it will be detected
863 from the file. For best compatibility with players, use pictures with
864 MIME type image/jpeg or image/png. The MIME type can also be --&gt; to
865 mean that FILE is actually a URL to an image, though this use is
866 discouraged.</p>
867 <p><em>DESCRIPTION</em> is optional; the default is an empty string.</p>
868 <p>The next part specifies the resolution and color information. If the
869 <em>MIME-TYPE</em> is image/jpeg, image/png, or image/gif, you can
870 usually leave this empty and they can be detected from the file.
871 Otherwise, you must specify the width in pixels, height in pixels, and
872 color depth in bits-per-pixel. If the image has indexed colors you
873 should also specify the number of colors used. When manually specified,
874 it is not checked against the file for accuracy.</p>
875 <p><em>FILE</em> is the path to the picture file to be imported, or the
876 URL if MIME type is --&gt;</p>
877 <p><strong>Specification examples:</strong> “|image/jpeg|||../cover.jpg”
878 will embed the JPEG file at ../cover.jpg, defaulting to type 3 (front
879 cover) and an empty description. The resolution and color info will be
880 retrieved from the file itself.
881 “4|--&gt;|CD|320x300x24/173|http://blah.blah/backcover.tiff” will embed
882 the given URL, with type 4 (back cover), description “CD”, and a
883 manually specified resolution of 320x300, 24 bits-per-pixel, and 173
884 colors. The file at the URL will not be fetched; the URL itself is
885 stored in the PICTURE metadata block.</p>
886 <h2 id="apodization-functions">Apodization functions</h2>
887 <p>To improve LPC analysis, the audio data is windowed. An
888 <strong>-A</strong> option applies the specified apodization function(s)
889 instead of the default (which is “tukey(5e-1)”, though different for
890 presets -6 to -8.) Specifying one more function effectively means, for
891 each subframe, to try another weighting of the data and see if it
892 happens to result in a smaller encoded subframe. Specifying several
893 functions is time-expensive, at typically diminishing compression
894 gains.</p>
895 <p>The subdivide_tukey(<em>N</em>) functions (see below) used in presets
896 -6 to -8 were developed to recycle calculations for speed, compared to
897 using a number of independent functions. Even then, a high number like
898 <em>N</em>&gt;4 or 5, will often become less efficient than other
899 options considered expensive, like the slower -p, though results vary
900 with signal.</p>
901 <p>Up to 32 functions can be given as comma-separated list and/or
902 individual <strong>-A</strong> options. Any mis-specified function is
903 silently ignored. Quoting a function which takes options (and has
904 parentheses) may be necessary, depending on shell. Currently the
905 following functions are implemented: bartlett, bartlett_hann, blackman,
906 blackman_harris_4term_92db, connes, flattop, gauss(<em>STDDEV</em>),
907 hamming, hann, kaiser_bessel, nuttall, rectangle, triangle,
908 tukey(<em>P</em>), partial_tukey(<em>N</em>[/<em>OV</em>[/<em>P</em>]]),
909 punchout_tukey(<em>N</em>[/<em>OV</em>[/<em>P</em>]]),
910 subdivide_tukey(<em>N</em>[/<em>P</em>]), welch.</p>
911 <p>For parameters <em>P</em>, <em>STDDEV</em> and <em>OV</em>,
912 scientific notation is supported, e.g.  tukey(5e-1). Otherwise, the
913 decimal point must agree with the locale, e.g. tukey(0.5) or tukey(0,5)
914 depending on your system.</p>
915 <ul>
916 <li><p>For gauss(<em>STDDEV</em>), <em>STDDEV</em> is the standard
917 deviation (0&lt;<em>STDDEV</em>&lt;=5e-1).</p></li>
918 <li><p>For tukey(<em>P</em>), <em>P</em> (between 0 and 1) specifies the
919 fraction of the window that is cosine-tapered; <em>P</em>=0 corresponds
920 to “rectangle” and <em>P</em>=1 to “hann”.</p></li>
921 <li><p>partial_tukey(<em>N</em>) and punchout_tukey(<em>N</em>) are
922 largely obsoleted by the more time-effective
923 subdivide_tukey(<em>N</em>), see next item. They generate <em>N</em>
924 functions each spanning a part of each block. Optional arguments are an
925 overlap <em>OV</em> (&lt;1, may be negative), for example
926 partial_tukey(2/2e-1); and then a taper parameter <em>P</em>, for
927 example partial_tukey(2/2e-1/5e-1).</p></li>
928 <li><p>subdivide_tukey(<em>N</em>) is a more efficient reimplementation
929 of partial_tukey and punchout_tukey taken together, combining the
930 windows they would generate up to the specified <em>N</em>. Specifying
931 subdivide_tukey(3) entails a tukey, a partial_tukey(2), a
932 partial_tukey(3) and a punchout_tukey(3); specifying subdivide_tukey(5)
933 will on top of that add a partial_tukey(4), a punchout_tukey(4), a
934 partial_tukey(5) and a punchout_tukey(5) - but all with tapering chosen
935 to facilitate the re-use of computation. Thus the <em>P</em> parameter
936 (defaulting to 5e-1) is applied for the smallest used window: For
937 example, subdivide_tukey(2/5e-1) results in the same taper as that of
938 tukey(25e-2) and subdivide_tukey(5) in the same taper as of
939 tukey(1e-1).</p></li>
940 </ul>
941 <h1 id="see-also">SEE ALSO</h1>
942 <p><strong>metaflac(1)</strong></p>
943 <h1 id="author">AUTHOR</h1>
944 <p>This manual page was initially written by Matt Zimmerman
945 &lt;[email protected]&gt; for the Debian GNU/Linux system (but may be used
946 by others). It has been kept up-to-date by the Xiph.org Foundation.</p>
947 <div class="copyright">
948 <hr />
949 Copyright (c) 2000-2009 Josh Coalson, 2011-2025 Xiph.Org Foundation
950 </div>
951 </div>
952 </body>
953 </html>