add more FAQs
[flac.git] / doc / html / documentation.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
2 <!-- Copyright (c)  2000,2001,2002,2003,2004,2005,2006 Josh Coalson -->
3 <!-- Permission is granted to copy, distribute and/or modify this document -->
4 <!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
5 <!-- or any later version published by the Free Software Foundation; -->
6 <!-- with no invariant sections. -->
7 <!-- A copy of the license can be found at -->
8 <html>
9 <head>
10         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
11         <meta name="author" content="Josh Coalson" />
12         <meta name="description" content="A free, open source codec for lossless audio compression and decompression" />
13         <meta name="keywords" content="free,lossless,audio,codec,encoder,decoder,compression,compressor,archival,archive,archiving,backup,music" />
14         <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
15         <link rel="stylesheet" type="text/css" href="flac.css" />
16         <title>FLAC - documentation</title>
17 </head>
19 <body>
21 <div class="logo">
22         <a href=""><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
23 </div>
25 <div class="above_nav"></div>
27 <div class="navbar">
28         &nbsp;<a href="index.html">home</a>&nbsp;&nbsp;|
29         &nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
30         &nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
31         &nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
32         &nbsp;<a href="features.html">features</a>&nbsp;&nbsp;|
33         &nbsp;<a href="goals.html">goals</a>&nbsp;&nbsp;|
34         &nbsp;<a href="format.html">format</a>&nbsp;&nbsp;|
35         &nbsp;<a href="id.html">id</a>&nbsp;&nbsp;|
36         &nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
37         &nbsp;documentation&nbsp;&nbsp;|
38         &nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
39         &nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
40         &nbsp;<a href="developers.html">developers</a>&nbsp;
41 </div>
43 <div class="langbar">
44         &nbsp;english&nbsp;&nbsp;|
45         &nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
46 </div>
48 <div class="below_nav"></div>
50 <div class="box">
51         <div class="box_title">
52                 documentation
53         </div>
54         <div class="box_header"></div>
55         <div class="box_body">
56                 This page is broken up into the following sections:
57                 <ul>
58                         <li><a href="#format">format</a> - the user-level view of the FLAC format (for a more detailed explanation see the <a href="format.html">format page</a>).</li>
59                         <li><a href="#flac">flac</a> - the usage of the command-line file encoder/decoder <span class="commandname">flac</span>.</li>
60                         <li><a href="#metaflac">metaflac</a> - the usage of the command-line FLAC metadata editor <span class="commandname">metaflac</span>.</li>
61                         <li><a href="#plugins">plugins</a> - documentation for the various input plugins.</li>
62                         <li><a href="api/index.html">libFLAC and libFLAC++ APIs</a> - for developers who want to add FLAC support to their programs.</li>
63                         <li><a href="#bugs">bugs</a> - known bugs.</li>
64                         <li><a href="#monkey">How to add FLAC support to the Monkey's Audio GUI</a></li>
65                 </ul>
66                 Keep in mind that the online version of this document will always apply to the latest release.  For older releases, check the documentation included with the release package.
67         </div>
68         <div class="box_footer"></div>
69 </div>
71 <br />
73 <div class="box">
74         <div class="box_title">
75                 <a name="format">format</a>
76         </div>
77         <div class="box_header"></div>
78         <div class="box_body">
79                 <span class="commandname">flac</span> has been tuned so that the default options yield a good speed vs. compression tradeoff for many kinds of input.  However, if you are looking to maximize the compression rate or speed, or want to use the full power of FLAC's metadata system, this section is for you.  If not, just skip to the <a href="#flac">next section</a>.
80                 <br /><br />
81                 The basic structure of a FLAC stream is:
82                 <ul>
83                         <li>The four byte string "<span class="code">fLaC</span>"</li>
84                         <li>The <a href="format.html#def_STREAMINFO"><span class="code">STREAMINFO</span></a> metadata block</li>
85                         <li>Zero or more other metadata blocks</li>
86                         <li>One or more audio frames</li>
87                 </ul>
88                 The first four bytes are to identify the FLAC stream.  The metadata that follows contains all the information about the stream except for the audio data itself.  After the metadata comes the encoded audio data.
89                 <br /><br />
90                 <b>METADATA</b>
91                 <br /><br />
92                 FLAC defines several types of metadata blocks (see the <a href="format.html">format</a> page for the complete list).  Metadata blocks can be any length and new ones can be defined.  A decoder is allowed to skip any metadata types it does not understand.  Only one is mandatory: the <span class="code">STREAMINFO</span> block.  This block has information like the sample rate, number of channels, etc., and data that can help the decoder manage its buffers, like the minimum and maximum data rate and minimum and maximum block size.  Also included in the <span class="code">STREAMINFO</span> block is the MD5 signature of the <i>unencoded</i> audio data.  This is useful for checking an entire stream for transmission errors.
93                 <br /><br />
94                 Other blocks allow for padding, seek tables, tags, cuesheets, and application-specific data.  You can see <span class="commandname">flac</span> options below for adding <span class="code">PADDING</span> blocks or specifying seek points.  FLAC does not require seek points for seeking but they can speed up seeks, or be used for cueing in editing applications.
95                 <br /><br />
96                 Also, if you have a need of a custom metadata block, you can define your own and request an ID <a href="id.html">here</a>.  Then you can reserve a <span class="code">PADDING</span> block of the correct size when encoding, and overwrite the padding block with your <span class="code">APPLICATION</span> block after encoding.  The resulting stream will be FLAC compatible; decoders that are aware of your metadata can use it and the rest will safely ignore it.
97                 <br /><br />
98                 <b>AUDIO DATA</b>
99                 <br /><br />
100                 After the metadata comes the encoded audio data.  Audio data and metadata are not interleaved.  Like most audio codecs, FLAC splits the unencoded audio data into blocks, and encodes each block separately.  The encoded block is packed into a frame and appended to the stream.  The reference encoder uses a single block size for the whole stream but the FLAC format does not require it.
101                 <br /><br />
102                 <b>BLOCKING</b>
103                 <br /><br />
104                 The block size is an important parameter to encoding.  If it is too small, the frame overhead will lower the compression.  If it is too large, the modeling stage of the compressor will not be able to generate an efficient model.  Understanding FLAC's modeling will help you to improve compression for some kinds of input by varying the block size.  In the most general case, using linear prediction on 44.1kHz audio, the optimal block size will be between 2-6 ksamples.  <span class="commandname">flac</span> defaults to a block size of 4608 in this case.  Using the fast fixed predictors, a smaller block size is usually preferable because of the smaller frame header.
105                 <br /><br />
106                 <b>INTER-CHANNEL DECORRELATION</b>
107                 <br /><br />
108                 In the case of stereo input, once the data is blocked it is optionally passed through an inter-channel decorrelation stage.  The left and right channels are converted to center and side channels through the following transformation: mid = (left + right) / 2, side = left - right.  This is a lossless process, unlike joint stereo.  For normal CD audio this can result in significant extra compression.  <span class="commandname">flac</span> has two options for this: <span class="argument">-m</span> always compresses both the left-right and mid-side versions of the block and takes the smallest frame, and <span class="argument">-M</span>, which adaptively switches between left-right and mid-side.
109                 <br /><br />
110                 <b>MODELING</b>
111                 <br /><br />
112                 In the next stage, the encoder tries to approximate the signal with a function in such a way that when the approximation is subracted, the result (called the <i>residual</i>, <i>residue</i>, or <i>error</i>) requires fewer bits-per-sample to encode.  The function's parameters also have to be transmitted so they should not be so complex as to eat up the savings.  FLAC has two methods of forming approximations: 1) fitting a simple polynomial to the signal; and 2) general linear predictive coding (LPC).  I will not go into the details here, only some generalities that involve the encoding options.
113                 <br /><br />
114                 First, fixed polynomial prediction (specified with <span class="argument">-l 0</span>) is much faster, but less accurate than LPC.  The higher the maximum LPC order, the slower, but more accurate, the model will be.  However, there are diminishing returns with increasing orders.  Also, at some point (usually around order 9) the part of the encoder that guesses what is the best order to use will start to get it wrong and the compression will actually decrease slightly; at that point you will have to you will have to use the exhaustive search option <span class="argument">-e</span> to overcome this, which is significantly slower.
115                 <br /><br />
116                 Second, the parameters for the fixed predictors can be transmitted in 3 bits whereas the parameters for the LPC model depend on the bits-per-sample and LPC order.  This means the frame header length varies depending on the method and order you choose and can affect the optimal block size.
117                 <br /><br />
118                 <b>RESIDUAL CODING</b>
119                 <br /><br />
120                 Once the model is generated, the encoder subracts the approximation from the original signal to get the residual (error) signal.  The error signal is then losslessly coded.  To do this, FLAC takes advantage of the fact that the error signal generally has a Laplacian (two-sided geometric) distribution, and that there are a set of special Huffman codes called Rice codes that can be used to efficiently encode these kind of signals quickly and without needing a dictionary.
121                 <br /><br />
122                 Rice coding involves finding a single parameter that matches a signal's distribution, then using that parameter to generate the codes.  As the distribution changes, the optimal parameter changes, so FLAC supports a method that allows the parameter to change as needed.  The residual can be broken into several <i>contexts</i> or <i>partitions</i>, each with it's own Rice parameter.  <span class="commandname">flac</span> allows you to specify how the partitioning is done with the <span class="argument">-r</span> option.  The residual can be broken into 2^<i>n</i> partitions, by using the option <span class="argument">-r n,n</span>.  The parameter <i>n</i> is called the <i>partition order</i>.  Furthermore, the encoder can be made to search through <i>m</i> to <i>n</i> partition orders, taking the best one, by specifying <span class="argument">-r m,n</span>.  Generally, the choice of n does not affect encoding speed but m,n does.  The larger the difference between m and n, the more time it will take the encoder to search for the best order.  The block size will also affect the optimal order.
123                 <br /><br />
124                 <b>FRAMING</b>
125                 <br /><br />
126                 An audio frame is preceded by a frame header and trailed by a frame footer.  The header starts with a sync code, and contains the minimum information necessary for a decoder to play the stream, like sample rate, bits per sample, etc.  It also contains the block or sample number and an 8-bit CRC of the frame header.  The sync code, frame header CRC, and block/sample number allow resynchronization and seeking even in the absence of seek points.  The frame footer contains a 16-bit CRC of the entire encoded frame for error detection.  If the reference decoder detects a CRC error it will generate a silent block.
127                 <br /><br />
128                 <b>MISCELLANEOUS</b>
129                 <br /><br />
130                 As a convenience, the reference decoder knows how to skip <a href="">ID3v1 and ID3v2 tags</a>.  Note however that the FLAC specification does not require compliant implementations to support ID3 in any form and their use is discouraged.
131                 <br /><br />
132                 <span class="commandname">flac</span> has a verify option <span class="argument">-V</span> that verifies the output while encoding.  With this option, a decoder is run in parallel to the encoder and its output is compared against the original input.  If a difference is found <span class="commandname">flac</span> will stop with an error.
133         </div>
134         <div class="box_footer"></div>
135 </div>
137 <br />
139 <div class="box">
140         <div class="box_title">
141                 <a name="flac">flac</a>
142         </div>
143         <div class="box_header"></div>
144         <div class="box_body">
145                 <span class="commandname">flac</span> is the command-line file encoder/decoder.  The encoder currently supports as input RIFF WAVE, AIFF, or FLAC format, or raw interleaved samples.  The decoder currently can output to RIFF WAVE or AIFF format, or raw interleaved samples.  <span class="commandname">flac</span> only supports linear PCM samples (in other words, no A-LAW, uLAW, etc.).  Another restriction (hopefully short-term) is that the input must be 8, 16, or 24 bits per sample.  This is not a limitation of the FLAC format, just the reference encoder/decoder.
146                 <br /><br />
147                 <span class="commandname">flac</span> assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files, files ending in ".aif" or ".aiff" or have the AIFF header present are AIFF files, and files ending in ".flac" or have the FLAC header present are FLAC files.  This assumption may be overridden with a command-line option.  It also assumes that files ending in ".ogg" are Ogg FLAC files.  Other than this, <span class="commandname">flac</span> makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient file systems like FAT-16).
148                 <br /><br />
149                 Before going into the full command-line description, a few other things help to sort it out: 1) <span class="commandname">flac</span> encodes by default, so you must use <b>-d</b> to decode; 2) the options <span class="argument">-0</span> .. <span class="argument">-8</span> (or <span class="argument">--fast</span> and <span class="argument">--best</span>) that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options; 3) <span class="commandname">flac</span> behaves similarly to gzip in the way it handles input and output files.
150                 <br /><br />
151                 <span class="commandname">flac</span> will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing:
152                 <ul>
153                         <li>
154                                 Encoding: flac [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [<i><a href="#format_options">&lt;format-options&gt;</a></i>] [<i><a href="#encoding_options">&lt;encoding options&gt;</a></i>] [inputfile [...]]
155                         </li>
156                         <li>
157                                 Decoding: flac -d [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [<i><a href="#format_options">&lt;format-options&gt;</a></i>] [<i><a href="#decoding_options">&lt;decoding options&gt;</a></i>]  [FLACfile [...]]
158                         </li>
159                         <li>
160                                 Testing: flac -t [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [FLACfile [...]]
161                         </li>
162                         <li>
163                                 Analyzing: flac -a [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [<i><a href="#analysis_options">&lt;analysis-options&gt;</a></i>] [FLACfile [...]]
164                         </li>
165                 </ul>
166                 In any case, if no <span class="argument">inputfile</span> is specified, stdin is assumed.  If only one inputfile is specified, it may be "-" for stdin.  When stdin is used as input, <span class="commandname">flac</span> will write to stdout.  Otherwise <span class="commandname">flac</span> will perform the desired operation on each input file to similarly named output files (meaning for encoding, the extension will be replaced with ".flac", or appended with ".flac" if the input file has no extension, and for decoding, the extension will be ".wav" for WAVE output and ".raw" for raw output).  The original file is not deleted unless --delete-input-file is specified.
167                 <br /><br />
168                 If you are encoding/decoding from stdin to a file, you should use the -o option like so:
169                 <ul>
170                         <li>
171                                 flac [options] -o outputfile
172                         </li>
173                         <li>
174                                 flac -d [options] -o outputfile
175                         </li>
176                         </ul>
177                         which are better than:
178                         <ul>
179                         <li>
180                                 flac [options] &gt; outputfile
181                         </li>
182                         <li>
183                                 flac -d [options] &gt; outputfile
184                         </li>
185                 </ul>
186                 since the former allows flac to seek backwards to write the <span class="code">STREAMINFO</span> or RIFF WAVE header contents when necessary.
187                 <br /><br />
188                 Also, you can force output data to go to stdout using <span class="argument">-c</span>.
189                 <br /><br />
190                 To encode or decode files that start with a dash, use <span class="argument">--</span> to signal the end of options, to keep the filenames themselves from being treated as options:
191                 <ul>
192                         <li>
193                                 <span class="code">flac -V -- -01-filename.wav</span>
194                         </li>
195                 </ul>
196                 The encoding options affect the compression ratio and encoding speed.  The format options are used to tell <span class="commandname">flac</span> the arrangement of samples if the input file (or output file when decoding) is a raw file.  If it is a RIFF WAVE or AIFF file the format options are not needed since they are read from the AIFF/WAVE header.
197                 <br /><br />
198                 In test mode, <span class="commandname">flac</span> acts just like in decode mode, except no output file is written.  Both decode and test modes detect errors in the stream, but they also detect when the MD5 signature of the decoded audio does not match the stored MD5 signature, even when the bitstream is valid.
199                 <br /><br />
200                 <span class="commandname">flac</span> can also re-encode FLAC files.  In other words, you can specify a FLAC file as an input to the encoder and it will decoder it and re-encode it according to the options you specify.  It will also preserve all the metadata unless you override it with other options (e.g. specifying new tags, seekpoints, cuesheet, padding, etc.).
201                 <br /><br />
203                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
204                 <table width="100%" border="1" bgcolor="#EEEED4">
205                         <tr>
206                                 <td colspan="2" bgcolor="#D3D4C5">
207                                         <a name="general_options"><font size="+1"><b>General Options</b></font></a>
208                                 </td>
209                         </tr>
210                         <tr>
211                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
212                                         <a name="flac_options_version" />
213                                         <span class="argument">-v</span>, <span class="argument">--version</span>
214                                 </td>
215                                 <td>
216                                         Show the <span class="commandname">flac</span> version number.
217                                 </td>
218                         </tr>
219                         <tr>
220                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
221                                         <a name="flac_options_help" />
222                                         <span class="argument">-h</span>, <span class="argument">--help</span>
223                                 </td>
224                                 <td>
225                                         Show basic usage and a list of all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
226                                 </td>
227                         </tr>
228                         <tr>
229                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
230                                         <a name="flac_options_explain" />
231                                         <span class="argument">-H</span>, <span class="argument">--explain</span>
232                                 </td>
233                                 <td>
234                                         Show detailed explanation of usage and all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
235                                 </td>
236                         </tr>
237                         <tr>
238                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
239                                         <a name="flac_options_decode" />
240                                         <span class="argument">-d</span>, <span class="argument">--decode</span>
241                                 </td>
242                                 <td>
243                                         Decode (<span class="commandname">flac</span> encodes by default).  <span class="commandname">flac</span> will exit with an exit code of <span class="argument">1</span> (and print a message, even in silent mode) if there were any errors during decoding, including when the MD5 checksum does not match the decoded output.  Otherwise the exit code will be <span class="argument">0</span>.
244                                 </td>
245                         </tr>
246                         <tr>
247                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
248                                         <a name="flac_options_test" />
249                                         <span class="argument">-t</span>, <span class="argument">--test</span>
250                                 </td>
251                                 <td>
252                                         Test (same as <span class="argument">-d</span> except no decoded file is written).  The exit codes are the same as in decode mode.
253                                 </td>
254                         </tr>
255                         <tr>
256                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
257                                         <a name="flac_options_analyze" />
258                                         <span class="argument">-a</span>, <span class="argument">--analyze</span>
259                                 </td>
260                                 <td>
261                                         Analyze (same as <span class="argument">-d</span> except an analysis file is written).  The exit codes are the same as in decode mode.  This option is mainly for developers; the output will be a text file that has data about each frame and subframe.
262                                 </td>
263                         </tr>
264                         <tr>
265                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
266                                         <a name="flac_options_stdout" />
267                                         <span class="argument">-c</span>, <span class="argument">--stdout</span>
268                                 </td>
269                                 <td>
270                                         Write output to stdout.
271                                 </td>
272                         </tr>
273                         <tr>
274                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
275                                         <a name="flac_options_silent" />
276                                         <span class="argument">-s</span>, <span class="argument">--silent</span>
277                                 </td>
278                                 <td>
279                                         Silent: do not show encoding/decoding statistics.
280                                 </td>
281                         </tr>
282                         <tr>
283                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
284                                         <a name="flac_options_totally_silent" />
285                                         <span class="argument">--totally-silent</span>
286                                 </td>
287                                 <td>
288                                         Do not print anything of any kind, including warnings or errors.  The exit code will be the only way to determine successful completion.
289                                 </td>
290                         </tr>
291                         <tr>
292                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
293                                         <a name="flac_options_force" />
294                                         <span class="argument">-f</span>, <span class="argument">--force</span>
295                                 </td>
296                                 <td>
297                                         Force overwriting of output files.  By default, <span class="commandname">flac</span> warns that the output file already exists and continues to the next file.
298                                 </td>
299                         </tr>
300                         <tr>
301                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
302                                         <a name="flac_options_output_name" />
303                                         <span class="argument">-o filename</span>,<br /><span class="argument">--output-name=filename</span>
304                                 </td>
305                                 <td>
306                                         Force the output file name (usually <span class="commandname">flac</span> just changes the extension).  May only be used when encoding a single file.  May not be used in conjunction with <a href="#flac_options_output_prefix"><span class="argument">--output-prefix</span></a>.
307                                 </td>
308                         </tr>
309                         <tr>
310                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
311                                         <a name="flac_options_output_prefix" />
312                                         <span class="argument">--output-prefix=string</span>
313                                 </td>
314                                 <td>
315                                         Prefix each output file name with the given string.  This can be useful for encoding/decoding files to a different directory.  Make sure if your string is a path name that it ends with a trailing '<span class="argument">/</span>' slash.
316                                 </td>
317                         </tr>
318                         <tr>
319                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
320                                         <a name="flac_options_delete_input_file" />
321                                         <span class="argument">--delete-input-file</span>
322                                 </td>
323                                 <td>
324                                         Automatically delete the input file after a successful encode or decode.  If there was an error (including a verify error) the input file is left intact.
325                                 </td>
326                         </tr>
327                         <tr>
328                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
329                                         <a name="flac_options_skip" />
330                                         <span class="argument">--skip={#|}</span>
331                                 </td>
332                                 <td>
333                                         Skip over the first # of samples of the input.  This works for both encoding and decoding, but not testing.  The alternative form <span class="argument"></span> can be used to specify minutes, seconds, and fractions of a second.<br /><br />
334                                         Examples:<br /><br />
335                                         <span class="argument">--skip=123</span> : skip the first 123 samples of the input<br />
336                                         <span class="argument">--skip=1:23.45</span> : skip the first 1 minute and 23.45 seconds of the input
337                                 </td>
338                         </tr>
339                         <tr>
340                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
341                                         <a name="flac_options_until" />
342                                         <span class="argument">--until={#|[+|-]}</span>
343                                 </td>
344                                 <td>
345                                         Stop at the given sample number for each input file.  This works for both encoding and decoding, but not testing.  The given sample number is not included in the decoded output.  The alternative form <span class="argument"></span> can be used to specify minutes, seconds, and fractions of a second.  If a <span class="argument">+</span> sign is at the beginning, the <span class="argument">--until</span> point is relative to the <span class="argument">--skip</span> point.  If a <span class="argument">-</span> sign is at the beginning, the <span class="argument">--until</span> point is relative to end of the audio.<br /><br />
346                                         Examples:<br /><br />
347                                         <span class="argument">--until=123</span> : decode only the first 123 samples of the input (samples 0-122, stopping at 123)<br />
348                                         <span class="argument">--until=1:23.45</span> : decode only the first 1 minute and 23.45 seconds of the input<br />
349                                         <span class="argument">--skip=1:00 --until=+1:23.45</span> : decode 1:00.00 to 2:23.45<br />
350                                         <span class="argument">--until=-1:23.45</span> : decode everything except the last 1 minute and 23.45 seconds<br />
351                                         <span class="argument">--until=-0:00</span> : decode until the end of the input (the same as not specifying <span class="argument">--until</span>)
352                                 </td>
353                         </tr>
354                         <tr>
355                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
356                                         <a name="flac_options_ogg" />
357                                         <span class="argument">--ogg</span>
358                                 </td>
359                                 <td>
360                                         When encoding, generate Ogg FLAC output instead of native FLAC.  Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer.  The resulting file should have an '.ogg' extension and will still be decodable by <span class="commandname">flac</span>.<br /><br />
361                                         When decoding, force the input to be treated as Ogg FLAC.  This is useful when piping input from stdin or when the filename does not end in '.ogg'.<br /><br />
362                                         <b>NOTE:</b> Ogg FLAC files created prior to <span class="commandname">flac</span> 1.1.1 used an ad-hoc mapping and do not support seeking.  They should be decoded and re-encoded with <span class="commandname">flac</span> 1.1.1 or later.
363                                 </td>
364                         </tr>
365                         <tr>
366                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
367                                         <a name="flac_options_serial_number" />
368                                         <span class="argument">--serial-number=#</span>
369                                 </td>
370                                 <td>
371                                         When used with --ogg, specifies the serial number to use for the first Ogg FLAC stream, which is then incremented for each additional stream.  When encoding and no serial number is given, <span class="commandname">flac</span> uses a random number for the first stream, then increments it for each additional stream.  When decoding and no number is given, <span class="commandname">flac</span> uses the serial number of the first page.
372                                 </td>
373                         </tr>
374                 </table>
375                 </td></tr></table>
377                 <br />
379                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
380                 <table width="100%" border="1" bgcolor="#EEEED4">
381                         <tr>
382                                 <td colspan="2" bgcolor="#D3D4C5">
383                                         <a name="analysis_options"><font size="+1"><b>Analysis Options</b></font></a>
384                                 </td>
385                         </tr>
386                         <tr>
387                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
388                                         <a name="flac_options_residual_text" />
389                                         <span class="argument">--residual-text</span>
390                                 </td>
391                                 <td>
392                                         Includes the residual signal in the analysis file.  This will make the file <b>very</b> big, much larger than even the decoded file.
393                                 </td>
394                         </tr>
395                         <tr>
396                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
397                                         <a name="flac_options_residual_gnuplot" />
398                                         <span class="argument">--residual-gnuplot</span>
399                                 </td>
400                                 <td>
401                                         Generates a gnuplot file for every subframe; each file will contain the residual distribution of the subframe.  This will create a <b>lot</b> of files.
402                                 </td>
403                         </tr>
404                 </table>
405                 </td></tr></table>
407                 <br />
409                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
410                 <table width="100%" border="1" bgcolor="#EEEED4">
411                         <tr>
412                                 <td colspan="2" bgcolor="#D3D4C5">
413                                         <a name="decoding_options"><font size="+1"><b>Decoding Options</b></font></a>
414                                 </td>
415                         </tr>
416                         <tr>
417                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
418                                         <a name="flac_options_cue" />
419                                         <span class="argument">--cue=[#.#][-[#.#]]</span>
420                                 </td>
421                                 <td>
422                                         Set the beginning and ending cuepoints to decode.  The optional first <span class="argument">#.#</span> is the track and index point at which decoding will start; the default is the beginning of the stream.  The optional second <span class="argument">#.#</span> is the track and index point at which decoding will end; the default is the end of the stream.  If the cuepoint does not exist, the closest one before it (for the start point) or after it (for the end point) will be used.  If those don't exist, the start of the stream (for the start point) or end of the stream (for the end point) will be used.  The cuepoints are merely translated into sample numbers then used as --skip and --until.<br /><br />
423                                         Examples:<br /><br />
424                                         <span class="argument">--cue=-</span> : decode the entire stream<br />
425                                         <span class="argument">--cue=4.1</span> : decode from track 4, index 1 to the end of the stream<br />
426                                         <span class="argument">--cue=4.1-</span> : decode from track 4, index 1 to the end of the stream<br />
427                                         <span class="argument">--cue=-4.1</span> : decode from the beginning of the stream up to, but not including, track 4, index 1<br />
428                                         <span class="argument">--cue=2.1-2.4</span> : decode from track 2, index 1, up to, but not including, track 2, index 4<br />
429                                         <span class="argument">--cue=9.1-10.1</span> : decode from track 9 the way it would be played on a CD player; this works even if the CD has no 10th track.
430                                 </td>
431                         </tr>
432                         <tr>
433                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
434                                         <a name="flac_options_decode_through_errors" />
435                                         <span class="argument">-F</span>,<br /><span class="argument">--decode-through-errors</span>
436                                 </td>
437                                 <td>
438                                         By default <span class="commandname">flac</span> stops decoding with an error and removes the partially decoded file if it encounters a bitstream error.  With <span class="argument">-F</span>, errors are still printed but <span class="commandname">flac</span> will continue decoding to completion.  Note that errors may cause the decoded audio to be missing some samples or have silent sections.
439                                 </td>
440                         </tr>
441                         <!-- @@@ undocumented, also not in the man page yet
442                         <tr>
443                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
444                                         <a name="flac_options_apply_replaygain_which_is_not_lossless" />
445                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless[=&lt;specification&gt;]</span>
446                                 </td>
447                                 <td>
448                                         Applies ReplayGain values while decoding.
449                                         <br /><br />
451                                         <br /><br />
452                                         The equals sign and &lt;specification&gt; is optional.  If omitted, the default is <span class="argument">0aLn1</span>.
453                                         <br /><br />
454                                         The <span class="argument">&lt;specification&gt;</span> is a shorthand notation for describing how to apply ReplayGain.  All components are optional but order is important.  '<span class="argument">[]</span>' means 'optional'.  '<span class="argument">|</span>' means 'or'.  '<span class="argument">{}</span>' means required.  The format is:<br /><br />
455                                         &nbsp;&nbsp;<span class="argument">[&lt;preamp&gt;][a|t][l|L][n{0|1|2|3}]</span>
456                                         <ul>
457                                                 <li>
458                                                         <span class="argument">&lt;preamp&gt;</span><br />
459                                                                 &nbsp;&nbsp;A floating point number in dB.  This is added to the existing gain value.
460                                                 </li>
461                                                 <li>
462                                                         <span class="argument">a|t</span><br />
463                                                                 &nbsp;&nbsp;Specify '<span class="argument">a</span>' to use the album gain, or '<span class="argument">t</span>' to use the track gain.  If tags for the preferred kind (album/track) do not exist but tags for the other (track/album) do, those will be used instead.
464                                                 </li>
465                                                 <li>
466                                                         <span class="argument">l|L</span><br />
467                                                                 &nbsp;&nbsp;Specify '<span class="argument">l</span>' to peak-limit the output, so that the ReplayGain peak value is full-scale.  Specify '<span class="argument">L</span>' to use a 6dB hard limiter that kicks in when the signal approaches full-scale.
468                                                 </li>
469                                                 <li>
470                                                         <span class="argument">n{0|1|2|3}</span><br />
471                                                                 &nbsp;&nbsp;Specify the amount of noise shaping.  ReplayGain synthesis happens in floating point; the result is dithered before converting back to integer.  This quantization adds noise.  Noise shaping tries to move the noise where you won't hear it as much.  <span class="argument">0</span> means no noise shaping, <span class="argument">1</span> means 'low', <span class="argument">2</span> means 'medium', <span class="argument">3</span> means 'high'.
472                                                 </li>
473                                         </ul>
474                                         For example, the default of <span class="argument">0aLn1</span> means 0dB preamp, use album gain, 6dB hard limit, low noise shaping.
475                                         <br /><br />
476                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless=3</span> means 3dB preamp, use album gain, no limiting, no noise shaping.
477                                         <br /><br />
478                                         <span class="commandname">flac</span> uses the ReplayGain tags for the calculation.  If a stream does not have the required tags or they can't be parsed, decoding will continue with a warning, and no ReplayGain is applied to that stream.
479                                 </td>
480                         </tr>
481                         -->
482                 </table>
483                 </td></tr></table>
485                 <br />
487                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
488                 <table width="100%" border="1" bgcolor="#EEEED4">
489                         <tr>
490                                 <td colspan="2" bgcolor="#D3D4C5">
491                                         <a name="encoding_options"><font size="+1"><b>Encoding Options</b></font></a>
492                                 </td>
493                         </tr>
494                         <tr>
495                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
496                                         <a name="flac_options_verify" />
497                                         <span class="argument">-V</span>, <span class="argument">--verify</span>
498                                 </td>
499                                 <td>
500                                         Verify the encoding process.  With this option, <span class="commandname">flac</span> will create a parallel decoder that decodes the output of the encoder and compares the result against the original.  It will abort immediately with an error if a mismatch occurs.  <span class="argument">-V</span> increases the total encoding time but is guaranteed to catch any unforseen bug in the encoding process.
501                                 </td>
502                         </tr>
503                         <tr>
504                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
505                                         <a name="flac_options_lax" />
506                                         <span class="argument">--lax</span>
507                                 </td>
508                                 <td>
509                                         Allow encoder to generate non-<a href="format.html#subset">Subset</a> files.  The resulting FLAC file may not be streamable or might have trouble being played in all players (especially hardware devices), so you should only use this option in combination with custom encoding options meant for archival.
510                                 </td>
511                         </tr>
512                         <tr>
513                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
514                                         <a name="flac_options_replay_gain" />
515                                         <span class="argument">--replay-gain</span>
516                                 </td>
517                                 <td>
518                                         Calculate <a href="">ReplayGain</a> values and store them as FLAC tags, similar to <a href="">VorbisGain</a>.  Title gains/peaks will be computed for each input file, and an album gain/peak will be computed for all files.  All input files must have the same resolution, sample rate, and number of channels.  Only mono and stereo files are allowed, and the sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.  Also note that this option may leave a few extra bytes in a <span class="code">PADDING</span> block as the exact size of the tags is not known until all files are processed.<br /><br />
519                                         Note that this option cannot be used when encoding to standard output (stdout).
520                                 </td>
521                         </tr>
522                         <tr>
523                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
524                                         <a name="flac_options_cuesheet" />
525                                         <span class="argument">--cuesheet=FILENAME</span>
526                                 </td>
527                                 <td>
528                                         Import the given cuesheet file and store it in a <a href="format.html#def_CUESHEET"><span class="code">CUESHEET</span></a> metadata block.  This option may only be used when encoding a single file.  A seekpoint will be added for each index point in the cuesheet to the <a href="format.html#def_SEEKTABLE"><span class="code">SEEKTABLE</span></a> unless <span class="argument">--no-cued-seekpoints</span> is specified.<br /><br />
529                                         The cuesheet file must be of the sort written by <a href="">CDRwin</a>, <a href="">CDRcue</a>, <a href="">EAC</a>, et al.
530                                 </td>
531                         </tr>
532                         <tr>
533                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
534                                         <a name="flac_options_picture" />
535                                         <span class="argument">--picture=SPECIFICATION</span>
536                                 </td>
537                                 <td>
538                                         Import a picture and store it in a <a href="format.html#def_PICTURE"><span class="code">PICTURE</span></a> metadata block.  More than one <span class="argument">--picture</span> command can be specified.  The <span class="argument">SPECIFICATION</span> is a string whose parts are separated by <span class="argument">|</span> (pipe) characters.  Some parts may be left empty to invoke default values.  The format of <span class="argument">SPECIFICATION</span> is<br /><br />
539                                         <tt>&nbsp;&nbsp;[TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</tt><br /><br />
540                                         <span class="argument">TYPE</span> is optional; it is a number from one of:<br />
541                                         <tt><ul>
542                                                 <li>0: Other</li>
543                                                 <li>1: 32x32 pixels 'file icon' (PNG only)</li>
544                                                 <li>2: Other file icon</li>
545                                                 <li>3: Cover (front)</li>
546                                                 <li>4: Cover (back)</li>
547                                                 <li>5: Leaflet page</li>
548                                                 <li>6: Media (e.g. label side of CD)</li>
549                                                 <li>7: Lead artist/lead performer/soloist</li>
550                                                 <li>8: Artist/performer</li>
551                                                 <li>9: Conductor</li>
552                                                 <li>10: Band/Orchestra</li>
553                                                 <li>11: Composer</li>
554                                                 <li>12: Lyricist/text writer</li>
555                                                 <li>13: Recording Location</li>
556                                                 <li>14: During recording</li>
557                                                 <li>15: During performance</li>
558                                                 <li>16: Movie/video screen capture</li>
559                                                 <li>17: A bright coloured fish</li>
560                                                 <li>18: Illustration</li>
561                                                 <li>19: Band/artist logotype</li>
562                                                 <li>20: Publisher/Studio logotype</li>
563                                         </ul></tt>
564                                         The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.<br/><br />
565                                         <span class="argument">MIME-TYPE</span> is mandatory; for best compatibility with players, use pictures with MIME type <tt>image/jpeg</tt> or <tt>image/png</tt>.  The MIME type can also be --&gt; to mean that <span class="argument">FILE</span> is actually a URL to an image, though this use is discouraged.<br /><br />
566                                         <span class="argument">DESCRIPTION</span> is optional; the default is an empty string.<br /><br />
567                                         The next part specfies the resolution and color information.  If the <span class="argument">MIME-TYPE</span> is <tt>image/jpeg</tt>, <tt>image/png</tt>, or <tt>image/gif</tt>, you can usually leave this empty and they can be detected from the file.  Otherwise, you must specify the width in pixels, height in pixels, and color depth in bits-per-pixel.  If the image has indexed colors you should also specify the number of colors used.  When manually specified, it is not checked against the file for accuracy.<br /><br />
568                                         <span class="argument">FILE</span> is the path to the picture file to be imported, or the URL if MIME type is --&gt;<br /><br />
569                                         For example, the specification <span class="argument">|image/jpeg|||../cover.jpg</span> will embed the JPEG file at <tt>../cover.jpg</tt>, defaulting to type 3 (front cover) and an empty description.  The resolution and color info will be retrieved from the file itself.<br /><br />
570                                         The specification <span class="argument">4|--&gt;|CD|320x300x24/173|http://blah.blah/backcover.tiff</span> will embed the given URL, with type 4 (back cover), description "CD", and a manually specified resolution of 320x300, 24 bits-per-pixel, and 173 colors.  The file at the URL will not be fetched; the URL itself is stored in the PICTURE metadata block.
571                                 </td>
572                         </tr>
573                         <tr>
574                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
575                                         <a name="flac_options_sector_align" />
576                                         <span class="argument">--sector-align</span>
577                                 </td>
578                                 <td>
579                                         Align encoding of multiple CD format files on sector boundaries.  This option is only allowed when encoding files all of which have a 44.1kHz sample rate and 2 channels.  With <span class="argument">--sector-align</span>, the encoder will align the resulting .flac streams so that their lengths are even multiples of a CD sector (1/75th of a second, or 588 samples).  It does this by carrying over any partial sector at the end of each file to the next stream.  The last stream will be padded to alignment with zeroes.<br /><br />
580                                         This option will have no effect if the files are already aligned (as is the normally the case with WAVE files ripped from a CD).  <span class="commandname">flac</span> can only align a set of files given in one invocation of <span class="commandname">flac</span>.<br /><br />
581                                         <b>WARNING:</b> The ordering of files is important!  If you give a command like '<span class="code">flac --sector-align *.wav</span>' the shell may not expand the wildcard to the order you expect.  To be safe you should '<span class="code">echo *.wav</span>' first to confirm the order, or be explicit like '<span class="code">flac --sector-align 8.wav 9.wav 10.wav</span>'.
582                                 </td>
583                         </tr>
584                         <tr>
585                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
586                                         <a name="flac_options_seekpoint" />
587                                         <span class="argument">-S {#|X|#x|#s}</span>,<br /><span class="argument">--seekpoint={#|X|#x|#s}</span>
588                                 </td>
589                                 <td>
590                                         Include a point or points in a <span class="code">SEEKTABLE</span>:<br />
591                                         <ul>
592                                         <li>
593                                                 <span class="argument">#&nbsp;</span> : a specific sample number for a seek point
594                                         </li>
595                                         <li>
596                                                 <span class="argument">X&nbsp;</span> : a placeholder point (always goes at the end of the <span class="code">SEEKTABLE</span>)
597                                         </li>
598                                         <li>
599                                                 <span class="argument">#x</span> : # evenly spaced seekpoints, the first being at sample 0
600                                         </li>
601                                         <li>
602                                                 <span class="argument">#s</span> : a seekpoint every # seconds; # does not have to be a whole number, it can be, for example, <span class="argument">9.5</span>, meaning a seekpoint every 9.5 seconds
603                                         </li>
604                                         </ul>
605                                         You may use many -S options; the resulting <span class="code">SEEKTABLE</span> will be the unique-ified union of all such values.<br />
606                                         With no -S options, flac defaults to '-S 10s'.  Use --no-seektable for no <span class="code">SEEKTABLE</span>.<br />
607                                         <b>NOTE:</b> -S #x and -S #s will not work if the encoder can't determine the input size before starting.<br />
608                                         <b>NOTE:</b> if you use -S # and # is &gt;= samples in the input, there will be either no seek point entered (if the input size is determinable before encoding starts) or a placeholder point (if input size is not determinable).<br />
609                                 </td>
610                         </tr>
611                         <tr>
612                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
613                                         <a name="flac_options_padding" />
614                                         <span class="argument">-P #</span>, <span class="argument">--padding=#</span>
615                                 </td>
616                                 <td>
617                                         Tell the encoder to write a <span class="code">PADDING</span> metadata block of the given length (in bytes) after the <span class="code">STREAMINFO</span> block.  This is useful if you plan to tag the file later with an <span class="code">APPLICATION</span> block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the <span class="code">PADDING</span> block.  Note that the total length of the <span class="code">PADDING</span> block will be 4 bytes longer than the length given because of the 4 metadata block header bytes.  You can force no <span class="code">PADDING</span> block at all to be written with <span class="argument">--no-padding</span>.  The encoder writes a <span class="code">PADDING</span> block of 4096 bytes by default.
618                                 </td>
619                         </tr>
620                         <tr>
621                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
622                                         <a name="flac_options_tag" />
623                                         <span class="argument">-T FIELD=VALUE</span>,<br /><span class="argument">--tag=FIELD=VALUE</span>
624                                 </td>
625                                 <td>
626                                         Add a FLAC tag.  The comment must adhere to the Vorbis comment spec (which FLAC tags implement), i.e. the FIELD must contain only legal characters, terminated by an 'equals' sign.  Make sure to quote the comment if necessary.  This option may appear more than once to add several comments.  NOTE: all tags will be added to all encoded files.
627                                 </td>
628                         </tr>
629                         <tr>
630                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
631                                         <a name="flac_options_tag_from_file" />
632                                         <span class="argument">--tag-from-file=FIELD=FILENAME</span>
633                                 </td>
634                                 <td>
635                                         Like <a href="#flac_options_tag"><span class="argument">--tag</span></a>, except FILENAME is a file whose contents will be read verbatim to set the tag value.  The contents will be converted to UTF-8 from the local charset.  This can be used to store a cuesheet in a tag (e.g. <span class="argument">--tag-from-file="CUESHEET=image.cue"</span>).  Do not try to store binary data in tag fields!  Use APPLICATION blocks for that.
636                                 </td>
637                         </tr>
638                         <tr>
639                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
640                                         <a name="flac_options_blocksize" />
641                                         <span class="argument">-b #</span>, <span class="argument">--blocksize=#</span>
642                                 </td>
643                                 <td>
644                                         Specify the block size in samples.  The default is 1152 for -l 0, otherwise 4608.  Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096/8192/16384/32768.  The reference encoder uses the same block size for the entire stream.
645                                 </td>
646                         </tr>
647                         <tr>
648                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
649                                         <a name="flac_options_mid_side" />
650                                         <span class="argument">-m</span>, <span class="argument">--mid-side</span>
651                                 </td>
652                                 <td>
653                                         Enable mid-side coding (only for stereo streams).  Tends to increase compression by a few percent on average.  For each block both the stereo pair and mid-side versions of the block will be encoded, and smallest resulting frame will be stored.
654                                 </td>
655                         </tr>
656                         <tr>
657                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
658                                         <a name="flac_options_adaptive_mid_side" />
659                                         <span class="argument">-M</span>, <span class="argument">--adaptive-mid-side</span>
660                                 </td>
661                                 <td>
662                                         Enable adaptive mid-side coding (only for stereo streams).  Like <span class="argument">-m</span> but the encoder adaptively switches between independent and mid-side coding, which is faster but yields less compression than <span class="argument">-m</span> (which does an exhaustive search).
663                                 </td>
664                         </tr>
665                         <tr>
666                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
667                                         <a name="flac_options_levels" />
668                                         <span class="argument">-0 .. -8</span>
669                                 </td>
670                                 <td>
671                                         Fastest compression .. highest compression.  The default is <span class="argument">-5</span>.
672                                 </td>
673                         </tr>
674                         <tr>
675                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
676                                         <a name="flac_options_level_0" />
677                                         <span class="argument">-0</span>, <span class="argument">--compression-level-0</span>
678                                 </td>
679                                 <td>
680                                         Synonymous with <span class="argument">-l 0 -b 1152 -r 2,2</span>
681                                 </td>
682                         </tr>
683                         <tr>
684                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
685                                         <a name="flac_options_level_1" />
686                                         <span class="argument">-1</span>, <span class="argument">--compression-level-1</span>
687                                 </td>
688                                 <td>
689                                         Synonymous with <span class="argument">-l 0 -b 1152 -M -r 2,2</span>
690                                 </td>
691                         </tr>
692                         <tr>
693                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
694                                         <a name="flac_options_level_2" />
695                                         <span class="argument">-2</span>, <span class="argument">--compression-level-2</span>
696                                 </td>
697                                 <td>
698                                         Synonymous with <span class="argument">-l 0 -b 1152 -m -r 3</span>
699                                 </td>
700                         </tr>
701                         <tr>
702                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
703                                         <a name="flac_options_level_3" />
704                                         <span class="argument">-3</span>, <span class="argument">--compression-level-3</span>
705                                 </td>
706                                 <td>
707                                         Synonymous with <span class="argument">-l 6 -b 4608 -r 3,3</span>
708                                 </td>
709                         </tr>
710                         <tr>
711                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
712                                         <a name="flac_options_level_4" />
713                                         <span class="argument">-4</span>, <span class="argument">--compression-level-4</span>
714                                 </td>
715                                 <td>
716                                         Synonymous with <span class="argument">-l 8 -b 4608 -M -r 3,3</span>
717                                 </td>
718                         </tr>
719                         <tr>
720                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
721                                         <a name="flac_options_level_5" />
722                                         <span class="argument">-5</span>, <span class="argument">--compression-level-5</span>
723                                 </td>
724                                 <td>
725                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -r 3,3</span>
726                                 </td>
727                         </tr>
728                         <tr>
729                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
730                                         <a name="flac_options_level_6" />
731                                         <span class="argument">-6</span>, <span class="argument">--compression-level-6</span>
732                                 </td>
733                                 <td>
734                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -r 4</span>
735                                 </td>
736                         </tr>
737                         <tr>
738                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
739                                         <a name="flac_options_level_7" />
740                                         <span class="argument">-7</span>, <span class="argument">--compression-level-7</span>
741                                 </td>
742                                 <td>
743                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -e -r 6</span>
744                                 </td>
745                         </tr>
746                         <tr>
747                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
748                                         <a name="flac_options_level_8" />
749                                         <span class="argument">-8</span>, <span class="argument">--compression-level-8</span>
750                                 </td>
751                                 <td>
752                                         Synonymous with <span class="argument">-l 12 -b 4608 -m -e -r 6</span>
753                                 </td>
754                         </tr>
755                         <tr>
756                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
757                                         <a name="flac_options_fast" />
758                                         <span class="argument">--fast</span>
759                                 </td>
760                                 <td>
761                                         Fastest compression.  Currently synonymous with <span class="argument">-0</span>
762                                 </td>
763                         </tr>
764                         <tr>
765                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
766                                         <a name="flac_options_best" />
767                                         <span class="argument">--best</span>
768                                 </td>
769                                 <td>
770                                         Highest compression.  Currently synonymous with <span class="argument">-8</span>
771                                 </td>
772                         </tr>
773                         <tr>
774                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
775                                         <a name="flac_options_exhaustive_model_search" />
776                                         <span class="argument">-e</span>,<br /><span class="argument">--exhaustive-model-search</span>
777                                 </td>
778                                 <td>
779                                         Exhaustive model search (expensive!).  Normally the encoder estimates the best model to use and encodes once based on the estimate.  With an exhaustive model search, the encoder will generate subframes for every order and use the smallest.  If the max LPC order is high this can significantly increase the encode time but can shave off another 0.5%.
780                                 </td>
781                         </tr>
782                         <tr>
783                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
784                                         <a name="flac_options_apodization" />
785                                         <span class="argument">-A "function"</span>, <span class="argument">--apodization="function"</span>
786                                 </td>
787                                 <td>
788                                         Window audio data with given the apodization function.  The functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), welch.<br />
789                                         For gauss(STDDEV), STDDEV is the standard deviation (0&lt;STDDEV&lt;=0.5).<br />
790                                         For tukey(P), P specifies the fraction of the window that is tapered (0&lt;=P&lt;=1; P=0 corresponds to "rectangle" and P=1 corresponds to "hann").<br />
791                                         More than one -A option (up to 32) may be used.  Any function that is specified erroneously is silently dropped.  The encoder chooses suitable defaults in the absence of any -A options; any -A option specified replaces the default(s).<br />
792                                         When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe.  Multiple functions can greatly increase the encoding time.<br />
793                                 </td>
794                         </tr>
795                         <tr>
796                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
797                                         <a name="flac_options_max_lpc_order" />
798                                         <span class="argument">-l #</span>, <span class="argument">--max-lpc-order=#</span>
799                                 </td>
800                                 <td>
801                                         Specifies the maximum LPC order.  This number must be &lt;= 32.  If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors.  Using fixed predictors is faster but usually results in files being 5-10% larger.
802                                 </td>
803                         </tr>
804                         <tr>
805                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
806                                         <a name="flac_options_qlp_coeff_precision" />
807                                         <span class="argument">-q #</span>,<br /><span class="argument">--qlp-coeff-precision=#</span>
808                                 </td>
809                                 <td>
810                                         Specifies the precision of the quantized LP coefficients, in bits.  The default is <span class="argument">-q 0</span>, which means let the encoder decide based on the signal.  Unless you really know your input file it's best to leave this up to the encoder.
811                                 </td>
812                         </tr>
813                         <tr>
814                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
815                                         <a name="flac_options_qlp_coeff_precision_search" />
816                                         <span class="argument">-p</span>,<br /><span class="argument">--qlp-coeff-precision-search</span>
817                                 </td>
818                                 <td>
819                                         Do exhaustive LP coefficient quantization optimization.  This option overrides any <span class="argument">-q</span> option.  It is expensive and typically will only improve the compression a tiny fraction of a percent.  <span class="argument">-q</span> has no effect when <span class="argument">-l 0</span> is used.
820                                 </td>
821                         </tr>
822                         <tr>
823                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
824                                         <a name="flac_options_rice_partition_order" />
825                                         <span class="argument">-r [#,]#</span>,<br /><span class="argument">--rice-partition-order=[#,]#</span>
826                                 </td>
827                                 <td>
828                                         Set the [min,]max residual partition order.  The min value defaults to 0 if unspecified.<br /><br />
829                                         By default the encoder uses a single Rice parameter for the subframe's entire residual.  With this option, the residual is iteratively partitioned into 2^min# .. 2^max# pieces, each with its own Rice parameter.  Higher values of max# yield diminishing returns.  The most bang for the buck is usually with <span class="argument">-r 2,2</span> (more for higher block sizes).  This usually shaves off about 1.5%.  The technique tends to peak out about when blocksize/(2^n)=128.  Use <span class="argument">-r 0,16</span> to force the highest degree of optimization.
830                                 </td>
831                         </tr>
832                 </table>
833                 </td></tr></table>
835                 <br />
837                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
838                 <table width="100%" border="1" bgcolor="#EEEED4">
839                         <tr>
840                                 <td colspan="2" bgcolor="#D3D4C5">
841                                         <a name="format_options"><font size="+1"><b>Format Options</b></font></a>
842                                 </td>
843                         </tr>
844                         <tr>
845                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
846                                         <a name="flac_options_endian" />
847                                         <span class="argument">--endian={big|little}</span>
848                                 </td>
849                                 <td>
850                                         Specify big-endian or little-endian byte order in the raw file.
851                                 </td>
852                         </tr>
853                         <tr>
854                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
855                                         <a name="flac_options_channels" />
856                                         <span class="argument">--channels=#</span>
857                                 </td>
858                                 <td>
859                                         Specify the number of channels in the raw file.
860                                 </td>
861                         </tr>
862                         <tr>
863                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
864                                         <a name="flac_options_bps" />
865                                         <span class="argument">--bps=#</span>
866                                 </td>
867                                 <td>
868                                         Specify the number of bits per sample in the raw file.
869                                 </td>
870                         </tr>
871                         <tr>
872                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
873                                         <a name="flac_options_sample_rate" />
874                                         <span class="argument">--sample-rate=#</span>
875                                 </td>
876                                 <td>
877                                         Specify the sample rate of the raw file.
878                                 </td>
879                         </tr>
880                         <tr>
881                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
882                                         <a name="flac_options_sign" />
883                                         <span class="argument">--sign={signed|unsigned}</span>
884                                 </td>
885                                 <td>
886                                         Specify that the samples in the raw file are signed or unsigned (the default is signed).
887                                 </td>
888                         </tr>
889                         <tr>
890                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
891                                         <a name="flac_options_input_size" />
892                                         <span class="argument">--input-size=#</span>
893                                 </td>
894                                 <td>
895                                         Specify the size of the raw input in bytes.  If you are encoding raw samples from stdin, you must set this option in order to be able to use --skip, --until, --cue-sheet, or other options that need to know the size of the input beforehand.  If the size given is greater than what is found in the input stream, the encoder will complain about an unexpected end-of-file.  If the size given is less, samples will be truncated.
896                                 </td>
897                         </tr>
898                         <tr>
899                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
900                                         <a name="flac_options_force_aiff_format" />
901                                         <span class="argument">--force-aiff-format</span>
902                                 </td>
903                                 <td>
904                                         Force the decoder to output AIFF format.  This option is not needed if the output filename (as set by -o) ends with .aiff.  Also, this option has no effect when encoding since input AIFF is auto-detected.
905                                 </td>
906                         </tr>
907                         <tr>
908                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
909                                         <a name="flac_options_force_raw_format" />
910                                         <span class="argument">--force-raw-format</span>
911                                 </td>
912                                 <td>
913                                         Treat the input file (or output file if decoding) as a raw file, regardless of the extension.
914                                 </td>
915                         </tr>
916                 </table>
917                 </td></tr></table>
919                 <br />
921                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
922                 <table width="100%" border="1" bgcolor="#EEEED4">
923                         <tr>
924                                 <td colspan="2" bgcolor="#D3D4C5">
925                                         <a name="negative_options"><font size="+1"><b>Negative Options</b></font></a>
926                                 </td>
927                         </tr>
928                         <tr>
929                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
930                                         <span class="argument">--no-adaptive-mid-side</span><br />
931                                         <span class="argument">--no-decode-through-errors</span><br />
932                                         <span class="argument">--no-delete-input-file</span><br />
933                                         <span class="argument">--no-escape-coding</span><br />
934                                         <span class="argument">--no-exhaustive-model-search</span><br />
935                                         <span class="argument">--no-lax</span><br />
936                                         <span class="argument">--no-mid-side</span><br />
937                                         <span class="argument">--no-ogg</span><br />
938                                         <span class="argument">--no-padding</span><br />
939                                         <span class="argument">--no-qlp-coeff-precision-search</span><br />
940                                         <span class="argument">--no-residual-gnuplot</span><br />
941                                         <span class="argument">--no-residual-text</span><br />
942                                         <span class="argument">--no-sector-align</span><br />
943                                         <span class="argument">--no-seektable</span><br />
944                                         <span class="argument">--no-silent</span><br />
945                                         <span class="argument">--no-verify</span>
946                                 </td>
947                                 <td>
948                                         Can all be used to turn off a particular option.
949                                 </td>
950                         </tr>
951                 </table>
952                 </td></tr></table>
954         </div>
955         <div class="box_footer"></div>
956 </div>
958 <br />
960 <div class="box">
961         <div class="box_title">
962                 <a name="metaflac">metaflac</a>
963         </div>
964         <div class="box_header"></div>
965         <div class="box_body">
966                 <span class="commandname">metaflac</span> is the command-line <span class="code">.flac</span> file metadata editor.  You can use it to list the contents of metadata blocks, edit, delete or insert blocks, and manage padding.
967                 <br /><br />
968                 <span class="commandname">metaflac</span> takes a set of "options" (though some are not optional) and a set of FLAC files to operate on.  There are three kinds of "options":
969                 <ul>
970                         <li>
971                                 Major operations, which specify a mode of operation like listing blocks, removing blocks, etc.  These will have sub-operations describing exactly what is to be done.
972                         </li>
973                         <li>
974                                 Shorthand operations, which are convenient synonyms for major operations.  For example, there is a shorthand operation <span class="argument">--show-sample-rate</span> that shows just the sample rate field from the <span class="code">STREAMINFO</span> metadata block.
975                         </li>
976                         <li>
977                                 Global options, which affect all the operations.
978                         </li>
979                 </ul>
980                 All of these are described in the tables below.  At least one shorthand or major operation must be supplied.  You can use multiple shorthand operations to do more than one thing to a file or set of files.  Most of the common things to do to metadata have shorthand operations.  As an example, here is how to show the MD5 signatures for a set of three FLAC files:
981                 <br /><br />
982                         <span class="code">metaflac --show-md5sum file1.flac file2.flac file3.flac</span>
983                 <br /><br />
984                         Another example; this removes all DESCRIPTION and COMMENT tags in a set of FLAC files, and uses the <span class="argument">--preserve-modtime</span> global option to keep the FLAC file modification times the same (usually when files are edited the modification time is set to the current time):
985                 <br /><br />
986                         <span class="code">metaflac --preserve-modtime --remove-tag=DESCRIPTION --remove-tag=COMMENT file1.flac file2.flac file3.flac</span>
987                 <br /><br />
989                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
990                 <table width="100%" border="1" bgcolor="#EEEED4">
991                         <tr>
992                                 <td colspan="2" bgcolor="#D3D4C5">
993                                         <a name="global_options"><font size="+1"><b>Global Options</b></font></a>
994                                 </td>
995                         </tr>
996                         <tr>
997                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
998                                         <a name="metaflac_options_preserve_modtime" />
999                                         <span class="argument">--preserve-modtime</span>
1000                                 </td>
1001                                 <td>
1002                                         Preserve the original modification time in spite of edits.
1003                                 </td>
1004                         </tr>
1005                         <tr>
1006                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1007                                         <a name="metaflac_options_with_filename" />
1008                                         <span class="argument">--with-filename</span>
1009                                 </td>
1010                                 <td>
1011                                         Prefix each output line with the FLAC file name (the default if more than one FLAC file is specified).
1012                                 </td>
1013                         </tr>
1014                         <tr>
1015                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1016                                         <a name="metaflac_options_no_filename" />
1017                                         <span class="argument">--no-filename</span>
1018                                 </td>
1019                                 <td>
1020                                         Do not prefix each output line with the FLAC file name (the default if only one FLAC file is specified)
1021                                 </td>
1022                         </tr>
1023                         <tr>
1024                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1025                                         <a name="metaflac_options_no_utf8_convert" />
1026                                         <span class="argument">--no-utf8-convert</span>
1027                                 </td>
1028                                 <td>
1029                                         Do not convert tags from UTF-8 to local charset, or vice versa.  This is useful for scripts.
1030                                 </td>
1031                         </tr>
1032                         <tr>
1033                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1034                                         <a name="metaflac_options_dont_use_padding" />
1035                                         <span class="argument">--dont-use-padding</span>
1036                                 </td>
1037                                 <td>
1038                                         By default <span class="commandname">metaflac</span> tries to use padding where possible to avoid rewriting the entire file if the metadata size changes.  Use this option to tell metaflac to not take advantage of padding this way.
1039                                 </td>
1040                         </tr>
1041                 </table>
1042                 </td></tr></table>
1044                 <br />
1046                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
1047                 <table width="100%" border="1" bgcolor="#EEEED4">
1048                         <tr>
1049                                 <td colspan="2" bgcolor="#D3D4C5">
1050                                         <a name="shorthand_operations"><font size="+1"><b>Shorthand Operations</b></font></a>
1051                                 </td>
1052                         </tr>
1053                         <tr>
1054                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1055                                         <a name="metaflac_shorthand_show_md5sum" />
1056                                         <span class="argument">--show-md5sum</span>
1057                                 </td>
1058                                 <td>
1059                                         Show the MD5 signature from the <span class="code">STREAMINFO</span> block.
1060                                 </td>
1061                         </tr>
1062                         <tr>
1063                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1064                                         <a name="metaflac_shorthand_show_min_blocksize" />
1065                                         <span class="argument">--show-min-blocksize</span>
1066                                 </td>
1067                                 <td>
1068                                         Show the minimum block size from the <span class="code">STREAMINFO</span> block.
1069                                 </td>
1070                         </tr>
1071                         <tr>
1072                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1073                                         <a name="metaflac_shorthand_show_max_blocksize" />
1074                                         <span class="argument">--show-max-blocksize</span>
1075                                 </td>
1076                                 <td>
1077                                         Show the maximum block size from the <span class="code">STREAMINFO</span> block.
1078                                 </td>
1079                         </tr>
1080                         <tr>
1081                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1082                                         <a name="metaflac_shorthand_show_min_framesize" />
1083                                         <span class="argument">--show-min-framesize</span>
1084                                 </td>
1085                                 <td>
1086                                         Show the minimum frame size from the <span class="code">STREAMINFO</span> block.
1087                                 </td>
1088                         </tr>
1089                         <tr>
1090                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1091                                         <a name="metaflac_shorthand_show_max_framesize" />
1092                                         <span class="argument">--show-max-framesize</span>
1093                                 </td>
1094                                 <td>
1095                                         Show the maximum frame size from the <span class="code">STREAMINFO</span> block.
1096                                 </td>
1097                         </tr>
1098                         <tr>
1099                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1100                                         <a name="metaflac_shorthand_show_sample_rate" />
1101                                         <span class="argument">--show-sample-rate</span>
1102                                 </td>
1103                                 <td>
1104                                         Show the sample rate from the <span class="code">STREAMINFO</span> block.
1105                                 </td>
1106                         </tr>
1107                         <tr>
1108                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1109                                         <a name="metaflac_shorthand_show_channels" />
1110                                         <span class="argument">--show-channels</span>
1111                                 </td>
1112                                 <td>
1113                                         Show the number of channels from the <span class="code">STREAMINFO</span> block.
1114                                 </td>
1115                         </tr>
1116                         <tr>
1117                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1118                                         <a name="metaflac_shorthand_show_bps" />
1119                                         <span class="argument">--show-bps</span>
1120                                 </td>
1121                                 <td>
1122                                         Show the # of bits per sample from the <span class="code">STREAMINFO</span> block.
1123                                 </td>
1124                         </tr>
1125                         <tr>
1126                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1127                                         <a name="metaflac_shorthand_show_total_samples" />
1128                                         <span class="argument">--show-total-samples</span>
1129                                 </td>
1130                                 <td>
1131                                         Show the total # of samples from the <span class="code">STREAMINFO</span> block.
1132                                 </td>
1133                         </tr>
1134                         <tr>
1135                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1136                                         <a name="metaflac_shorthand_show_vendor_tag" />
1137                                         <span class="argument">--show-vendor-tag</span>
1138                                 </td>
1139                                 <td>
1140                                         Show the vendor string from the <span class="code">VORBIS_COMMENT</span> block.
1141                                 </td>
1142                         </tr>
1143                         <tr>
1144                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1145                                         <a name="metaflac_shorthand_show_tag" />
1146                                         <span class="argument">--show-tag=NAME</span>
1147                                 </td>
1148                                 <td>
1149                                         Show all tags where the the field name matches <span class="argument">NAME</span>.
1150                                 </td>
1151                         </tr>
1152                         <tr>
1153                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1154                                         <a name="metaflac_shorthand_remove_tag" />
1155                                         <span class="argument">--remove-tag=NAME</span>
1156                                 </td>
1157                                 <td>
1158                                         Remove all tags whose field name is <span class="argument">NAME</span>.
1159                                 </td>
1160                         </tr>
1161                         <tr>
1162                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1163                                         <a name="metaflac_shorthand_remove_first_tag" />
1164                                         <span class="argument">--remove-first-tag=NAME</span>
1165                                 </td>
1166                                 <td>
1167                                         Remove first tag whose field name is <span class="argument">NAME</span>.
1168                                 </td>
1169                         </tr>
1170                         <tr>
1171                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1172                                         <a name="metaflac_shorthand_remove_all_tags" />
1173                                         <span class="argument">--remove-all-tags</span>
1174                                 </td>
1175                                 <td>
1176                                         Remove all tags, leaving only the vendor string.
1177                                 </td>
1178                         </tr>
1179                         <tr>
1180                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1181                                         <a name="metaflac_shorthand_set_tag" />
1182                                         <span class="argument">--set-tag=FIELD</span>
1183                                 </td>
1184                                 <td>
1185                                         Add a tag.  The <span class="argument">FIELD</span> must comply with the Vorbis comment spec, of the form <span class="argument">NAME=VALUE</span>.  If there is currently no tag block, one will be created.
1186                                 </td>
1187                         </tr>
1188                         <tr>
1189                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1190                                         <a name="metaflac_shorthand_set_tag_from_file" />
1191                                         <span class="argument">--set-tag-from-file=FIELD</span>
1192                                 </td>
1193                                 <td>
1194                                         Like <a href="#metaflac_shorthand_set_tag"><span class="argument">--set-tag</span></a>, except the VALUE is a filename whose contents will be read verbatim to set the tag value.  Unless <a href="#metaflac_options_no_utf8_convert"><span class="argument">--no-utf8-convert</span></a> is specified, the contents will be converted to UTF-8 from the local charset.  This can be used to store a cuesheet in a tag (e.g. <span class="argument">--set-tag-from-file="CUESHEET=image.cue"</span>).  Do not try to store binary data in tag fields!  Use APPLICATION blocks for that.
1195                                 </td>
1196                         </tr>
1197                         <tr>
1198                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1199                                         <a name="metaflac_shorthand_import_tags_from" />
1200                                         <span class="argument">--import-tags-from=FILE</span>
1201                                 </td>
1202                                 <td>
1203                                         Import tags from a file.  Use '-' for stdin.  Each line should be of the form <span class="argument">NAME=VALUE</span>.  Multi-line comments are currently not supported.  Specify <span class="argument">--remove-all-tags</span> and/or <a href="#metaflac_options_no_utf8_convert"><span class="argument">--no-utf8-convert</span></a> before <span class="argument">--import-tags-from</span> if necessary.
1204                                 </td>
1205                         </tr>
1206                         <tr>
1207                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1208                                         <a name="metaflac_shorthand_export_tags_to" />
1209                                         <span class="argument">--export-tags-to=FILE</span>
1210                                 </td>
1211                                 <td>
1212                                         Export tags to a file.  Use '-' for stdin.  Each line will be of the form <span class="argument">NAME=VALUE</span>.  Specify <a href="#metaflac_options_no_utf8_convert"><span class="argument">--no-utf8-convert</span></a> if necessary.
1213                                 </td>
1214                         </tr>
1215                         <tr>
1216                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1217                                         <a name="metaflac_shorthand_import_cuesheet_from" />
1218                                         <span class="argument">--import-cuesheet-from=FILE</span>
1219                                 </td>
1220                                 <td>
1221                                         Import a cuesheet from a file.  Use '-' for stdin.  Only one FLAC file may be specified.  A seekpoint will be added for each index point in the cuesheet to the <span class="code">SEEKTABLE</span> unless <span class="argument">--no-cued-seekpoints</span> is specified.
1222                                 </td>
1223                         </tr>
1224                         <tr>
1225                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1226                                         <a name="metaflac_shorthand_export_cuesheet_to" />
1227                                         <span class="argument">--export-cuesheet-to=FILE</span>
1228                                 </td>
1229                                 <td>
1230                                         Export <span class="code">CUESHEET</span> block to a cuesheet file, suitable for use by CD authoring software.  Use '-' for stdout.  Only one FLAC file may be specified on the command line.
1231                                 </td>
1232                         </tr>
1233                         <tr>
1234                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1235                                         <a name="metaflac_shorthand_import_picture" />
1236                                         <span class="argument">--import-picture=SPECIFICATION</span>
1237                                 </td>
1238                                 <td>
1239                                         Import a picture and store it in a <a href="format.html#def_PICTURE"><span class="code">PICTURE</span></a> metadata block.  See the <span class="commandname">flac</span> option <span class="argument"><a href="#flac_options_picture">--picture</a></span> for an explanation of the <span class="argument">SPECIFICATION</span> syntax.
1240                                 </td>
1241                         </tr>
1242                         <tr>
1243                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1244                                         <a name="metaflac_shorthand_add_replay_gain" />
1245                                         <span class="argument">--add-replay-gain</span>
1246                                 </td>
1247                                 <td>
1248                                         Calculates the title and album gains/peaks of the given FLAC files as if all the files were part of one album, then stores them in the <span class="code">VORBIS_COMMENT</span> block.  The tags are the same as those used by <span class="commandname">vorbisgain</span>.  Existing ReplayGain tags will be replaced.  If only one FLAC file is given, the album and title gains will be the same.  Since this operation requires two passes, it is always executed last, after all other operations have been completed and written to disk.  All FLAC files specified must have the same resolution, sample rate, and number of channels.  The sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.
1249                                 </td>
1250                         </tr>
1251                         <tr>
1252                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1253                                         <a name="metaflac_shorthand_remove_replay_gain" />
1254                                         <span class="argument">--remove-replay-gain</span>
1255                                 </td>
1256                                 <td>
1257                                         Removes the ReplayGain tags.
1258                                 </td>
1259                         </tr>
1260                         <tr>
1261                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1262                                         <a name="metaflac_shorthand_add_seekpoint" />
1263                                         <span class="argument">--add-seekpoint={#|X|#x|#s}</span>
1264                                 </td>
1265                                 <td>
1266                                         Add seek points to a <span class="code">SEEKTABLE</span> block:<br />
1267                                         <ul>
1268                                         <li>
1269                                                 <span class="argument">#&nbsp;</span> : a specific sample number for a seek point
1270                                         </li>
1271                                         <li>
1272                                                 <span class="argument">X&nbsp;</span> : a placeholder point (always goes at the end of the <span class="code">SEEKTABLE</span>)
1273                                         </li>
1274                                         <li>
1275                                                 <span class="argument">#x</span> : # evenly spaced seekpoints, the first being at sample 0
1276                                         </li>
1277                                         <li>
1278                                                 <span class="argument">#s</span> : a seekpoint every # seconds; # does not have to be a whole number, it can be, for example, <span class="argument">9.5</span>, meaning a seekpoint every 9.5 seconds
1279                                         </li>
1280                                         </ul>
1281                                         If no <span class="code">SEEKTABLE</span> block exists, one will be created.  If one already exists, points will be added to the existing table, and any duplicates will be turned into placeholder points.<br />
1282                                         You may use many <span class="argument">--add-seekpoint</span> options; the resulting <span class="code">SEEKTABLE</span> will be the unique-ified union of all such values.  Example: <span class="argument">--add-seekpoint=100x --add-seekpoint=3.5s</span> will add 100 evenly spaced seekpoints and a seekpoint every 3.5 seconds.<br />
1283                                 </td>
1284                         </tr>
1285                         <tr>
1286                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1287                                         <a name="metaflac_shorthand_add_padding" />
1288                                         <span class="argument">--add-padding=#</span>
1289                                 </td>
1290                                 <td>
1291                                         Add a padding block of the given length (in bytes).  The overall length of the new block will be 4 + length; the extra 4 bytes is for the metadata block header.
1292                                 </td>
1293                         </tr>
1294                 </table>
1295                 </td></tr></table>
1297                 <br />
1299                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
1300                 <table width="100%" border="1" bgcolor="#EEEED4">
1301                         <tr>
1302                                 <td colspan="2" bgcolor="#D3D4C5">
1303                                         <a name="major_operations"><font size="+1"><b>Major Operations</b></font></a>
1304                                 </td>
1305                         </tr>
1306                         <tr>
1307                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1308                                         <a name="metaflac_operations_version" />
1309                                         <span class="argument">--version</span>
1310                                 </td>
1311                                 <td>
1312                                         Show the metaflac version number.
1313                                 </td>
1314                         </tr>
1315                         <tr>
1316                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1317                                         <a name="metaflac_operations_list" />
1318                                         <span class="argument">--list</span>
1319                                 </td>
1320                                 <td>
1321                                         List the contents of one or more metadata blocks to stdout.  By default, all metadata blocks are listed in text format.  Use the following options to change this behavior:<br /><br />
1323                                         <span class="argument">--block-number=#[,#[...]]</span><br />
1324                                         An optional comma-separated list of block numbers to display.  The first block, the <span class="code">STREAMINFO</span> block, is block 0.<br /><br />
1326                                         <span class="argument">--block-type=type[,type[...]]</span><br />
1327                                         <span class="argument">--except-block-type=type[,type[...]]</span><br />
1328                                         An optional comma-separated list of block types to be included or ignored with this option.  Use only one of <span class="argument">--block-type</span> or <span class="argument">--except-block-type</span>.  The valid block types are: <span class="code">STREAMINFO</span>, <span class="code">PADDING</span>, <span class="code">APPLICATION</span>, <span class="code">SEEKTABLE</span>, <span class="code">VORBIS_COMMENT</span>.  You may narrow down the types of <span class="code">APPLICATION</span> blocks displayed as follows:<br />
1329                                         <table border="1">
1330                                                 <tr>
1331                                                         <td><span class="argument">APPLICATION:abcd</span></td>
1332                                                         <td>The <span class="code">APPLICATION</span> block(s) whose textual representation of the 4-byte ID is "abcd"</td>
1333                                                 </tr>
1334                                                 <tr>
1335                                                         <td><span class="argument">APPLICATION:0xXXXXXXXX</span></td>
1336                                                         <td>The <span class="code">APPLICATION</span> block(s) whose hexadecimal big- endian representation of the 4-byte ID is "0xXXXXXXXX".  For the example "abcd" above the hexadecimal equivalalent is 0x61626364</td>
1337                                                 </tr>
1338                                         </table>
1339                                         <br />
1341                                         NOTE: if both <span class="argument">--block-number</span> and <span class="argument">--[except-]block-type</span> are specified, the result is the logical AND of both arguments.<br /><br />
1343                                         <span class="argument">--application-data-format=hexdump|text</span><br />
1344                                         If the application block you are displaying contains binary data but your <span class="argument">--data-format=text</span>, you can display a hex dump of the application data contents instead using <span class="argument">--application-data-format=hexdump</span>.
1345                                 </td>
1346                         </tr>
1347                         <tr>
1348                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1349                                         <a name="metaflac_operations_remove" />
1350                                         <span class="argument">--remove</span>
1351                                 </td>
1352                                 <td>
1353                                         Remove one or more metadata blocks from the metadata.  Unless <span class="argument">--dont-use-padding</span> is specified, the blocks will be replaced with padding.  You may not remove the <span class="code">STREAMINFO</span> block.<br /><br />
1355                                         <span class="argument">--block-number=#[,#[...]]</span><br />
1356                                         <span class="argument">--block-type=type[,type[...]]</span><br />
1357                                         <span class="argument">--except-block-type=type[,type[...]]</span><br />
1358                                         See <a href="#metaflac_operations_list"><span class="argument">--list</span></a> above for usage.<br /><br />
1360                                         NOTE: if both <span class="argument">--block-number</span> and <span class="argument">--[except-]block-type</span> are specified, the result is the logical AND of both arguments.
1361                                 </td>
1362                         </tr>
1363                         <tr>
1364                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1365                                         <a name="metaflac_operations_remove_all" />
1366                                         <span class="argument">--remove-all</span>
1367                                 </td>
1368                                 <td>
1369                                         Remove all metadata blocks (except the <span class="code">STREAMINFO</span> block) from the metadata.  Unless <span class="argument">--dont-use-padding</span> is specified, the blocks will be replaced with padding.
1370                                 </td>
1371                         </tr>
1372                         <tr>
1373                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1374                                         <a name="metaflac_operations_merge_padding" />
1375                                         <span class="argument">--merge-padding</span>
1376                                 </td>
1377                                 <td>
1378                                         Merge adjacent <span class="code">PADDING</span> blocks into single blocks.
1379                                 </td>
1380                         </tr>
1381                         <tr>
1382                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1383                                         <a name="metaflac_operations_sort_padding" />
1384                                         <span class="argument">--sort-padding</span>
1385                                 </td>
1386                                 <td>
1387                                         Move all <span class="code">PADDING</span> blocks to the end of the metadata and merge them into a single block.
1388                                 </td>
1389                         </tr>
1390                 </table>
1391                 </td></tr></table>
1393         </div>
1394         <div class="box_footer"></div>
1395 </div>
1397 <br />
1399 <div class="box">
1400         <div class="box_title">
1401                 <a name="plugins"></a><a name="xmms_plugin">xmms plugin</a>
1402         </div>
1403         <div class="box_header"></div>
1404         <div class="box_body">
1405                 All that is necessary is to copy <span class="code"></span> to the directory where XMMS looks for input plugins (usually <span class="code">/usr/lib/xmms/Input</span> or <span class="code">$HOME/.xmms/Input</span>).  There is nothing else to configure.  Make sure to restart XMMS before trying to play any <span class="code">.flac</span> files.
1406         </div>
1407         <div class="box_footer"></div>
1408 </div>
1410 <br />
1412 <div class="box">
1413         <div class="box_title">
1414                 <a name="winamp2_plugin">winamp2 plugin</a>
1415         </div>
1416         <div class="box_header"></div>
1417         <div class="box_body">
1418                 The Winamp plugin should work for both Winamp2 and Winamp5.  If you are using Winamp 2.x, all that is necessary is to copy <span class="code">in_flac.dll</span> to the <span class="code">Plugins/</span> directory of your Winamp installation.  There is nothing else to configure.  Make sure to restart Winamp before trying to play any <span class="code">.flac</span> files.
1419         </div>
1420         <div class="box_footer"></div>
1421 </div>
1423 <br />
1425 <div class="box">
1426         <div class="box_title">
1427                 <a name="bugs">known bugs</a>
1428         </div>
1429         <div class="box_header"></div>
1430         <div class="box_body">
1431                 Bug tracking is done on the Sourceforge project page <a href="">here</a>.  If you submit a bug, make sure and provide an email contact or use the Monitor feature.
1432                 <br /><br />
1433                 The following are major known bugs in the current (1.1.3) release:
1434                 <ul>
1435                         <li>
1436                                 (none)
1437                         </li>
1438                 </ul>
1439                 The following are major known bugs in the 1.1.0 release:
1440                 <ul>
1441                         <li>
1442                                 If you change the FLAC configuration options in the XMMS plugin while a FLAC file is playing, it can cause a crash or other bad things to happen.
1443                         </li>
1444                 </ul>
1445                 The following are major known bugs in the 1.0.4 release:
1446                 <ul>
1447                         <li>
1448                                 All decoders prior to and including 1.0.4 have a bug that prevents them from skipping unknown metadata blocks properly.  A FLAC file created by flac 1.1.0 containing a <span class="code">CUESHEET</span> metadata block will not decode in 1.0.x decoders.
1449                         </li>
1450                         <li>
1451                                 <span class="commandname">metaflac</span> has a bug where, if --import-vc-from is used on a FLAC file that has no Vorbis comment block, the FLAC file can be corrupted.  All FLAC files generated by 1.0.4 have a Vorbis comment block added automatically but files from 1.0.3 and before do not.  This is fixed in CVS.
1452                         </li>
1453                         <li>
1454                                 There is an odd bug in <span class="commandname">metaflac</span> such that you must always use the <span class="argument">--dont-use-padding</span> option with <span class="argument">--add-padding</span> or the padding block won't be written.  This is fixed in CVS.
1455                         </li>
1456                 </ul>
1457         </div>
1458         <div class="box_footer"></div>
1459 </div>
1461 <br />
1463 <div class="box">
1464         <div class="box_title">
1465                 <a name="monkey">monkey</a>
1466         </div>
1467         <div class="box_header"></div>
1468         <div class="box_body">
1469                 Monkey's Audio comes with a nice GUI that many people are familiar with.  It supports some external encoders, but not FLAC.  However, the FLAC Windows distribution comes with a utility that allows you to replace one the of the supported lossless external codecs with FLAC.  Here's how:
1470                 <ul>
1471                         <li>Copy <span class="commandname">flac.exe</span> and <span class="commandname">flac_ren.exe</span> to the <span class="code">External/</span> directory of the Monkey's Audio installation.</li>
1472                         <li>
1473                                 Choose a supported encoder to replace:
1474                                 <ul>
1475                                         <li>Shorten - copy <span class="commandname">flac_mac.exe</span> on top of <span class="commandname">External/shortn32.exe</span></li>
1476                                         <li>WavPack - copy <span class="commandname">flac_mac.exe</span> on top of both <span class="commandname">External/wavpack.exe</span> and <span class="commandname">External/wvunpack.exe</span></li>
1477                                         <li>RKAU - copy <span class="commandname">flac_mac.exe</span> on top of <span class="commandname">External/rkau.exe</span></li>
1478                                 </ul>
1479                                 If you choose WavPack you will also be able to use the WavPack Configuration menu to add flac options.
1480                         </li>
1481                         <li>Now you can encode FLAC files as if you were using the replaced encoder.  The renamed <span class="commandname">flac_mac.exe</span> utility will call <span class="commandname">flac.exe</span> and afterwards, <span class="commandname">flac_ren.exe</span> will rename the resulting file to have the .flac extension.</li>
1482                 </ul>
1483                 Other front-ends may be wedged in the same way; if you have one in mind, post it to the <a href="">flac-dev</a> mailing list.
1484         </div>
1485         <div class="box_footer"></div>
1486 </div>
1489 <div class="copyright">
1490         Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson
1491 </div>
1493 </body>
1494 </html>