99952abdcb9db930b96bc638aaa7d046ae7fc860
[platform/upstream/flac.git] / doc / html / documentation.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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 http://www.gnu.org/copyleft/fdl.html -->
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>
18
19 <body>
20
21 <div class="logo">
22         <a href="http://flac.sourceforge.net/"><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
23 </div>
24
25 <div class="above_nav"></div>
26
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>
42
43 <div class="langbar">
44         &nbsp;english&nbsp;&nbsp;|
45         &nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
46 </div>
47
48 <div class="below_nav"></div>
49
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="http://losslessaudio.blogspot.com/2005/12/media-center-edition-2005-with-flac.html">How to add FLAC support to Windows Media Player</a></li>
65                         <li><a href="#monkey">How to add FLAC support to the Monkey's Audio GUI</a></li>
66                 </ul>
67                 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.
68         </div>
69         <div class="box_footer"></div>
70 </div>
71
72 <br />
73
74 <div class="box">
75         <div class="box_title">
76                 <a name="format">format</a>
77         </div>
78         <div class="box_header"></div>
79         <div class="box_body">
80                 <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>.
81                 <br /><br />
82                 The basic structure of a FLAC stream is:
83                 <ul>
84                         <li>The four byte string "<span class="code">fLaC</span>"</li>
85                         <li>The <a href="format.html#def_STREAMINFO"><span class="code">STREAMINFO</span></a> metadata block</li>
86                         <li>Zero or more other metadata blocks</li>
87                         <li>One or more audio frames</li>
88                 </ul>
89                 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.
90                 <br /><br />
91                 <b>METADATA</b>
92                 <br /><br />
93                 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.
94                 <br /><br />
95                 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.
96                 <br /><br />
97                 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.
98                 <br /><br />
99                 <b>AUDIO DATA</b>
100                 <br /><br />
101                 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.
102                 <br /><br />
103                 <b>BLOCKING</b>
104                 <br /><br />
105                 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.
106                 <br /><br />
107                 <b>INTER-CHANNEL DECORRELATION</b>
108                 <br /><br />
109                 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.
110                 <br /><br />
111                 <b>MODELING</b>
112                 <br /><br />
113                 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.
114                 <br /><br />
115                 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.
116                 <br /><br />
117                 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.
118                 <br /><br />
119                 <b>RESIDUAL CODING</b>
120                 <br /><br />
121                 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.
122                 <br /><br />
123                 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.
124                 <br /><br />
125                 <b>FRAMING</b>
126                 <br /><br />
127                 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.
128                 <br /><br />
129                 <b>MISCELLANEOUS</b>
130                 <br /><br />
131                 As a convenience, the reference decoder knows how to skip <a href="http://www.id3.org/">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.
132                 <br /><br />
133                 <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.
134         </div>
135         <div class="box_footer"></div>
136 </div>
137
138 <br />
139
140 <div class="box">
141         <div class="box_title">
142                 <a name="flac">flac</a>
143         </div>
144         <div class="box_header"></div>
145         <div class="box_body">
146                 <span class="commandname">flac</span> is the command-line file encoder/decoder.  The encoder currently supports as input RIFF WAVE, AIFF, FLAC or Ogg 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.), and the input must be between 4 and 24 bits per sample.  This is not a limitation of the FLAC format, just the reference encoder/decoder.
147                 <br /><br />
148                 <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" of have the Ogg FLAC header present 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 "8.3" file systems like FAT-16).
149                 <br /><br />
150                 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.
151                 <br /><br />
152                 <span class="commandname">flac</span> will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing:
153                 <ul>
154                         <li>
155                                 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 [...]]
156                         </li>
157                         <li>
158                                 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 [...]]
159                         </li>
160                         <li>
161                                 Testing: flac -t [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [FLACfile [...]]
162                         </li>
163                         <li>
164                                 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 [...]]
165                         </li>
166                 </ul>
167                 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.
168                 <br /><br />
169                 If you are encoding/decoding from stdin to a file, you should use the -o option like so:
170                 <ul>
171                         <li>
172                                 flac [options] -o outputfile
173                         </li>
174                         <li>
175                                 flac -d [options] -o outputfile
176                         </li>
177                         </ul>
178                         which are better than:
179                         <ul>
180                         <li>
181                                 flac [options] &gt; outputfile
182                         </li>
183                         <li>
184                                 flac -d [options] &gt; outputfile
185                         </li>
186                 </ul>
187                 since the former allows flac to seek backwards to write the <span class="code">STREAMINFO</span> or RIFF WAVE header contents when necessary.
188                 <br /><br />
189                 Also, you can force output data to go to stdout using <span class="argument">-c</span>.
190                 <br /><br />
191                 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:
192                 <ul>
193                         <li>
194                                 <span class="code">flac -V -- -01-filename.wav</span>
195                         </li>
196                 </ul>
197                 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.
198                 <br /><br />
199                 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.
200                 <br /><br />
201                 <span class="commandname">flac</span> can also re-encode FLAC files.  In other words, you can specify a FLAC or Ogg 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.).
202                 <br /><br />
203
204                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
205                 <table width="100%" border="1" bgcolor="#EEEED4">
206                         <tr>
207                                 <td colspan="2" bgcolor="#D3D4C5">
208                                         <a name="general_options"><font size="+1"><b>General Options</b></font></a>
209                                 </td>
210                         </tr>
211                         <tr>
212                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
213                                         <a name="flac_options_version" />
214                                         <span class="argument">-v</span>, <span class="argument">--version</span>
215                                 </td>
216                                 <td>
217                                         Show the <span class="commandname">flac</span> version number.
218                                 </td>
219                         </tr>
220                         <tr>
221                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
222                                         <a name="flac_options_help" />
223                                         <span class="argument">-h</span>, <span class="argument">--help</span>
224                                 </td>
225                                 <td>
226                                         Show basic usage and a list of all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
227                                 </td>
228                         </tr>
229                         <tr>
230                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
231                                         <a name="flac_options_explain" />
232                                         <span class="argument">-H</span>, <span class="argument">--explain</span>
233                                 </td>
234                                 <td>
235                                         Show detailed explanation of usage and all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
236                                 </td>
237                         </tr>
238                         <tr>
239                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
240                                         <a name="flac_options_decode" />
241                                         <span class="argument">-d</span>, <span class="argument">--decode</span>
242                                 </td>
243                                 <td>
244                                         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>.
245                                 </td>
246                         </tr>
247                         <tr>
248                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
249                                         <a name="flac_options_test" />
250                                         <span class="argument">-t</span>, <span class="argument">--test</span>
251                                 </td>
252                                 <td>
253                                         Test (same as <span class="argument">-d</span> except no decoded file is written).  The exit codes are the same as in decode mode.
254                                 </td>
255                         </tr>
256                         <tr>
257                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
258                                         <a name="flac_options_analyze" />
259                                         <span class="argument">-a</span>, <span class="argument">--analyze</span>
260                                 </td>
261                                 <td>
262                                         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.
263                                 </td>
264                         </tr>
265                         <tr>
266                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
267                                         <a name="flac_options_stdout" />
268                                         <span class="argument">-c</span>, <span class="argument">--stdout</span>
269                                 </td>
270                                 <td>
271                                         Write output to stdout.
272                                 </td>
273                         </tr>
274                         <tr>
275                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
276                                         <a name="flac_options_silent" />
277                                         <span class="argument">-s</span>, <span class="argument">--silent</span>
278                                 </td>
279                                 <td>
280                                         Silent: do not show encoding/decoding statistics.
281                                 </td>
282                         </tr>
283                         <tr>
284                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
285                                         <a name="flac_options_totally_silent" />
286                                         <span class="argument">--totally-silent</span>
287                                 </td>
288                                 <td>
289                                         Do not print anything of any kind, including warnings or errors.  The exit code will be the only way to determine successful completion.
290                                 </td>
291                         </tr>
292                         <tr>
293                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
294                                         <a name="flac_options_force" />
295                                         <span class="argument">-f</span>, <span class="argument">--force</span>
296                                 </td>
297                                 <td>
298                                         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.
299                                 </td>
300                         </tr>
301                         <tr>
302                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
303                                         <a name="flac_options_output_name" />
304                                         <span class="argument">-o filename</span>,<br /><span class="argument">--output-name=filename</span>
305                                 </td>
306                                 <td>
307                                         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>.
308                                 </td>
309                         </tr>
310                         <tr>
311                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
312                                         <a name="flac_options_output_prefix" />
313                                         <span class="argument">--output-prefix=string</span>
314                                 </td>
315                                 <td>
316                                         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.
317                                 </td>
318                         </tr>
319                         <tr>
320                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
321                                         <a name="flac_options_delete_input_file" />
322                                         <span class="argument">--delete-input-file</span>
323                                 </td>
324                                 <td>
325                                         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.
326                                 </td>
327                         </tr>
328                         <tr>
329                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
330                                         <a name="flac_options_skip" />
331                                         <span class="argument">--skip={#|mm:ss.ss}</span>
332                                 </td>
333                                 <td>
334                                         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">mm:ss.ss</span> can be used to specify minutes, seconds, and fractions of a second.<br /><br />
335                                         Examples:<br /><br />
336                                         <span class="argument">--skip=123</span> : skip the first 123 samples of the input<br />
337                                         <span class="argument">--skip=1:23.45</span> : skip the first 1 minute and 23.45 seconds of the input
338                                 </td>
339                         </tr>
340                         <tr>
341                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
342                                         <a name="flac_options_until" />
343                                         <span class="argument">--until={#|[+|-]mm:ss.ss}</span>
344                                 </td>
345                                 <td>
346                                         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">mm:ss.ss</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 />
347                                         Examples:<br /><br />
348                                         <span class="argument">--until=123</span> : decode only the first 123 samples of the input (samples 0-122, stopping at 123)<br />
349                                         <span class="argument">--until=1:23.45</span> : decode only the first 1 minute and 23.45 seconds of the input<br />
350                                         <span class="argument">--skip=1:00 --until=+1:23.45</span> : decode 1:00.00 to 2:23.45<br />
351                                         <span class="argument">--until=-1:23.45</span> : decode everything except the last 1 minute and 23.45 seconds<br />
352                                         <span class="argument">--until=-0:00</span> : decode until the end of the input (the same as not specifying <span class="argument">--until</span>)
353                                 </td>
354                         </tr>
355                         <tr>
356                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
357                                         <a name="flac_options_ogg" />
358                                         <span class="argument">--ogg</span>
359                                 </td>
360                                 <td>
361                                         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 />
362                                         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 />
363                                         <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.
364                                 </td>
365                         </tr>
366                         <tr>
367                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
368                                         <a name="flac_options_serial_number" />
369                                         <span class="argument">--serial-number=#</span>
370                                 </td>
371                                 <td>
372                                         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.
373                                 </td>
374                         </tr>
375                 </table>
376                 </td></tr></table>
377
378                 <br />
379
380                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
381                 <table width="100%" border="1" bgcolor="#EEEED4">
382                         <tr>
383                                 <td colspan="2" bgcolor="#D3D4C5">
384                                         <a name="analysis_options"><font size="+1"><b>Analysis Options</b></font></a>
385                                 </td>
386                         </tr>
387                         <tr>
388                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
389                                         <a name="flac_options_residual_text" />
390                                         <span class="argument">--residual-text</span>
391                                 </td>
392                                 <td>
393                                         Includes the residual signal in the analysis file.  This will make the file <b>very</b> big, much larger than even the decoded file.
394                                 </td>
395                         </tr>
396                         <tr>
397                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
398                                         <a name="flac_options_residual_gnuplot" />
399                                         <span class="argument">--residual-gnuplot</span>
400                                 </td>
401                                 <td>
402                                         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.
403                                 </td>
404                         </tr>
405                 </table>
406                 </td></tr></table>
407
408                 <br />
409
410                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
411                 <table width="100%" border="1" bgcolor="#EEEED4">
412                         <tr>
413                                 <td colspan="2" bgcolor="#D3D4C5">
414                                         <a name="decoding_options"><font size="+1"><b>Decoding Options</b></font></a>
415                                 </td>
416                         </tr>
417                         <tr>
418                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
419                                         <a name="flac_options_cue" />
420                                         <span class="argument">--cue=[#.#][-[#.#]]</span>
421                                 </td>
422                                 <td>
423                                         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 />
424                                         Examples:<br /><br />
425                                         <span class="argument">--cue=-</span> : decode the entire 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 track 4, index 1 to the end of the stream<br />
428                                         <span class="argument">--cue=-4.1</span> : decode from the beginning of the stream up to, but not including, track 4, index 1<br />
429                                         <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 />
430                                         <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.
431                                 </td>
432                         </tr>
433                         <tr>
434                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
435                                         <a name="flac_options_decode_through_errors" />
436                                         <span class="argument">-F</span>,<br /><span class="argument">--decode-through-errors</span>
437                                 </td>
438                                 <td>
439                                         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.
440                                 </td>
441                         </tr>
442                         <!-- @@@ undocumented, also not in the man page yet
443                         <tr>
444                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
445                                         <a name="flac_options_apply_replaygain_which_is_not_lossless" />
446                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless[=&lt;specification&gt;]</span>
447                                 </td>
448                                 <td>
449                                         Applies ReplayGain values while decoding.
450                                         <br /><br />
451                                         <b>WARNING: THIS IS NOT LOSSLESS.  DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION</b>.
452                                         <br /><br />
453                                         The equals sign and &lt;specification&gt; is optional.  If omitted, the default is <span class="argument">0aLn1</span>.
454                                         <br /><br />
455                                         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 />
456                                         &nbsp;&nbsp;<span class="argument">[&lt;preamp&gt;][a|t][l|L][n{0|1|2|3}]</span>
457                                         <ul>
458                                                 <li>
459                                                         <span class="argument">&lt;preamp&gt;</span><br />
460                                                                 &nbsp;&nbsp;A floating point number in dB.  This is added to the existing gain value.
461                                                 </li>
462                                                 <li>
463                                                         <span class="argument">a|t</span><br />
464                                                                 &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.
465                                                 </li>
466                                                 <li>
467                                                         <span class="argument">l|L</span><br />
468                                                                 &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.
469                                                 </li>
470                                                 <li>
471                                                         <span class="argument">n{0|1|2|3}</span><br />
472                                                                 &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'.
473                                                 </li>
474                                         </ul>
475                                         For example, the default of <span class="argument">0aLn1</span> means 0dB preamp, use album gain, 6dB hard limit, low noise shaping.
476                                         <br /><br />
477                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless=3</span> means 3dB preamp, use album gain, no limiting, no noise shaping.
478                                         <br /><br />
479                                         <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.
480                                 </td>
481                         </tr>
482                         -->
483                 </table>
484                 </td></tr></table>
485
486                 <br />
487
488                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
489                 <table width="100%" border="1" bgcolor="#EEEED4">
490                         <tr>
491                                 <td colspan="2" bgcolor="#D3D4C5">
492                                         <a name="encoding_options"><font size="+1"><b>Encoding Options</b></font></a>
493                                 </td>
494                         </tr>
495                         <tr>
496                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
497                                         <a name="flac_options_verify" />
498                                         <span class="argument">-V</span>, <span class="argument">--verify</span>
499                                 </td>
500                                 <td>
501                                         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.
502                                 </td>
503                         </tr>
504                         <tr>
505                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
506                                         <a name="flac_options_lax" />
507                                         <span class="argument">--lax</span>
508                                 </td>
509                                 <td>
510                                         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.
511                                 </td>
512                         </tr>
513                         <tr>
514                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
515                                         <a name="flac_options_replay_gain" />
516                                         <span class="argument">--replay-gain</span>
517                                 </td>
518                                 <td>
519                                         Calculate <a href="http://www.replaygain.org/">ReplayGain</a> values and store them as FLAC tags, similar to <a href="http://packages.qa.debian.org/v/vorbisgain.html">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 />
520                                         Note that this option cannot be used when encoding to standard output (stdout).
521                                 </td>
522                         </tr>
523                         <tr>
524                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
525                                         <a name="flac_options_cuesheet" />
526                                         <span class="argument">--cuesheet=FILENAME</span>
527                                 </td>
528                                 <td>
529                                         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 />
530                                         The cuesheet file must be of the sort written by <a href="http://www.goldenhawk.com/cdrwin.htm">CDRwin</a>, <a href="http://www.dcsoft.com/prod03.htm">CDRcue</a>, <a href="http://www.exactaudiocopy.de/">EAC</a>, et al.
531                                 </td>
532                         </tr>
533                         <tr>
534                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
535                                         <a name="flac_options_picture" />
536                                         <span class="argument">--picture=SPECIFICATION</span>
537                                 </td>
538                                 <td>
539                                         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 />
540                                         <tt>&nbsp;&nbsp;[TYPE]|MIME-TYPE|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</tt><br /><br />
541                                         <span class="argument">TYPE</span> is optional; it is a number from one of:<br />
542                                         <tt><ul>
543                                                 <li>0: Other</li>
544                                                 <li>1: 32x32 pixels 'file icon' (PNG only)</li>
545                                                 <li>2: Other file icon</li>
546                                                 <li>3: Cover (front)</li>
547                                                 <li>4: Cover (back)</li>
548                                                 <li>5: Leaflet page</li>
549                                                 <li>6: Media (e.g. label side of CD)</li>
550                                                 <li>7: Lead artist/lead performer/soloist</li>
551                                                 <li>8: Artist/performer</li>
552                                                 <li>9: Conductor</li>
553                                                 <li>10: Band/Orchestra</li>
554                                                 <li>11: Composer</li>
555                                                 <li>12: Lyricist/text writer</li>
556                                                 <li>13: Recording Location</li>
557                                                 <li>14: During recording</li>
558                                                 <li>15: During performance</li>
559                                                 <li>16: Movie/video screen capture</li>
560                                                 <li>17: A bright coloured fish</li>
561                                                 <li>18: Illustration</li>
562                                                 <li>19: Band/artist logotype</li>
563                                                 <li>20: Publisher/Studio logotype</li>
564                                         </ul></tt>
565                                         The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.<br/><br />
566                                         <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 />
567                                         <span class="argument">DESCRIPTION</span> is optional; the default is an empty string.<br /><br />
568                                         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 />
569                                         <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 />
570                                         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 />
571                                         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.
572                                 </td>
573                         </tr>
574                         <tr>
575                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
576                                         <a name="flac_options_sector_align" />
577                                         <span class="argument">--sector-align</span>
578                                 </td>
579                                 <td>
580                                         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 />
581                                         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 />
582                                         <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>'.
583                                 </td>
584                         </tr>
585                         <tr>
586                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
587                                         <a name="flac_options_seekpoint" />
588                                         <span class="argument">-S {#|X|#x|#s}</span>,<br /><span class="argument">--seekpoint={#|X|#x|#s}</span>
589                                 </td>
590                                 <td>
591                                         Include a point or points in a <span class="code">SEEKTABLE</span>:<br />
592                                         <ul>
593                                         <li>
594                                                 <span class="argument">#&nbsp;</span> : a specific sample number for a seek point
595                                         </li>
596                                         <li>
597                                                 <span class="argument">X&nbsp;</span> : a placeholder point (always goes at the end of the <span class="code">SEEKTABLE</span>)
598                                         </li>
599                                         <li>
600                                                 <span class="argument">#x</span> : # evenly spaced seekpoints, the first being at sample 0
601                                         </li>
602                                         <li>
603                                                 <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
604                                         </li>
605                                         </ul>
606                                         You may use many -S options; the resulting <span class="code">SEEKTABLE</span> will be the unique-ified union of all such values.<br />
607                                         With no -S options, flac defaults to '-S 10s'.  Use --no-seektable for no <span class="code">SEEKTABLE</span>.<br />
608                                         <b>NOTE:</b> -S #x and -S #s will not work if the encoder can't determine the input size before starting.<br />
609                                         <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 />
610                                 </td>
611                         </tr>
612                         <tr>
613                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
614                                         <a name="flac_options_padding" />
615                                         <span class="argument">-P #</span>, <span class="argument">--padding=#</span>
616                                 </td>
617                                 <td>
618                                         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 8192 bytes by default (or 65536 bytes if the input audio stream is more than 20 minutes long).
619                                 </td>
620                         </tr>
621                         <tr>
622                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
623                                         <a name="flac_options_tag" />
624                                         <span class="argument">-T FIELD=VALUE</span>,<br /><span class="argument">--tag=FIELD=VALUE</span>
625                                 </td>
626                                 <td>
627                                         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.
628                                 </td>
629                         </tr>
630                         <tr>
631                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
632                                         <a name="flac_options_tag_from_file" />
633                                         <span class="argument">--tag-from-file=FIELD=FILENAME</span>
634                                 </td>
635                                 <td>
636                                         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.
637                                 </td>
638                         </tr>
639                         <tr>
640                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
641                                         <a name="flac_options_blocksize" />
642                                         <span class="argument">-b #</span>, <span class="argument">--blocksize=#</span>
643                                 </td>
644                                 <td>
645                                         Specify the block size in samples.  Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096 (and 8192/16384 if the sample rate is &gt;48kHz).  The reference encoder uses the same block size for the entire stream.
646                                 </td>
647                         </tr>
648                         <tr>
649                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
650                                         <a name="flac_options_mid_side" />
651                                         <span class="argument">-m</span>, <span class="argument">--mid-side</span>
652                                 </td>
653                                 <td>
654                                         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.
655                                 </td>
656                         </tr>
657                         <tr>
658                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
659                                         <a name="flac_options_adaptive_mid_side" />
660                                         <span class="argument">-M</span>, <span class="argument">--adaptive-mid-side</span>
661                                 </td>
662                                 <td>
663                                         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).
664                                 </td>
665                         </tr>
666                         <tr>
667                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
668                                         <a name="flac_options_levels" />
669                                         <span class="argument">-0 .. -8</span>
670                                 </td>
671                                 <td>
672                                         Fastest compression .. highest compression.  The default is <span class="argument">-5</span>.
673                                 </td>
674                         </tr>
675                         <tr>
676                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
677                                         <a name="flac_options_level_0" />
678                                         <span class="argument">-0</span>, <span class="argument">--compression-level-0</span>
679                                 </td>
680                                 <td>
681                                         Synonymous with <span class="argument">-l 0 -b 1152 -r 2,2</span>
682                                 </td>
683                         </tr>
684                         <tr>
685                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
686                                         <a name="flac_options_level_1" />
687                                         <span class="argument">-1</span>, <span class="argument">--compression-level-1</span>
688                                 </td>
689                                 <td>
690                                         Synonymous with <span class="argument">-l 0 -b 1152 -M -r 2,2</span>
691                                 </td>
692                         </tr>
693                         <tr>
694                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
695                                         <a name="flac_options_level_2" />
696                                         <span class="argument">-2</span>, <span class="argument">--compression-level-2</span>
697                                 </td>
698                                 <td>
699                                         Synonymous with <span class="argument">-l 0 -b 1152 -m -r 3</span>
700                                 </td>
701                         </tr>
702                         <tr>
703                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
704                                         <a name="flac_options_level_3" />
705                                         <span class="argument">-3</span>, <span class="argument">--compression-level-3</span>
706                                 </td>
707                                 <td>
708                                         Synonymous with <span class="argument">-l 6 -b 4608 -r 3,3</span>
709                                 </td>
710                         </tr>
711                         <tr>
712                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
713                                         <a name="flac_options_level_4" />
714                                         <span class="argument">-4</span>, <span class="argument">--compression-level-4</span>
715                                 </td>
716                                 <td>
717                                         Synonymous with <span class="argument">-l 8 -b 4608 -M -r 3,3</span>
718                                 </td>
719                         </tr>
720                         <tr>
721                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
722                                         <a name="flac_options_level_5" />
723                                         <span class="argument">-5</span>, <span class="argument">--compression-level-5</span>
724                                 </td>
725                                 <td>
726                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -r 3,3</span>
727                                 </td>
728                         </tr>
729                         <tr>
730                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
731                                         <a name="flac_options_level_6" />
732                                         <span class="argument">-6</span>, <span class="argument">--compression-level-6</span>
733                                 </td>
734                                 <td>
735                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -r 4</span>
736                                 </td>
737                         </tr>
738                         <tr>
739                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
740                                         <a name="flac_options_level_7" />
741                                         <span class="argument">-7</span>, <span class="argument">--compression-level-7</span>
742                                 </td>
743                                 <td>
744                                         Synonymous with <span class="argument">-l 8 -b 4608 -m -e -r 6</span>
745                                 </td>
746                         </tr>
747                         <tr>
748                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
749                                         <a name="flac_options_level_8" />
750                                         <span class="argument">-8</span>, <span class="argument">--compression-level-8</span>
751                                 </td>
752                                 <td>
753                                         Synonymous with <span class="argument">-l 12 -b 4608 -m -e -r 6</span>
754                                 </td>
755                         </tr>
756                         <tr>
757                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
758                                         <a name="flac_options_fast" />
759                                         <span class="argument">--fast</span>
760                                 </td>
761                                 <td>
762                                         Fastest compression.  Currently synonymous with <span class="argument">-0</span>
763                                 </td>
764                         </tr>
765                         <tr>
766                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
767                                         <a name="flac_options_best" />
768                                         <span class="argument">--best</span>
769                                 </td>
770                                 <td>
771                                         Highest compression.  Currently synonymous with <span class="argument">-8</span>
772                                 </td>
773                         </tr>
774                         <tr>
775                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
776                                         <a name="flac_options_exhaustive_model_search" />
777                                         <span class="argument">-e</span>,<br /><span class="argument">--exhaustive-model-search</span>
778                                 </td>
779                                 <td>
780                                         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%.
781                                 </td>
782                         </tr>
783                         <tr>
784                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
785                                         <a name="flac_options_apodization" />
786                                         <span class="argument">-A "function"</span>, <span class="argument">--apodization="function"</span>
787                                 </td>
788                                 <td>
789                                         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 />
790                                         For gauss(STDDEV), STDDEV is the standard deviation (0&lt;STDDEV&lt;=0.5).<br />
791                                         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 />
792                                         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 />
793                                         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 />
794                                 </td>
795                         </tr>
796                         <tr>
797                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
798                                         <a name="flac_options_max_lpc_order" />
799                                         <span class="argument">-l #</span>, <span class="argument">--max-lpc-order=#</span>
800                                 </td>
801                                 <td>
802                                         Specifies the maximum LPC order.  This number must be &lt;= 32.  For Subset streams, it must be &lt;=12 if the sample rate is &lt;=48kHz.  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.
803                                 </td>
804                         </tr>
805                         <tr>
806                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
807                                         <a name="flac_options_qlp_coeff_precision" />
808                                         <span class="argument">-q #</span>,<br /><span class="argument">--qlp-coeff-precision=#</span>
809                                 </td>
810                                 <td>
811                                         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.
812                                 </td>
813                         </tr>
814                         <tr>
815                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
816                                         <a name="flac_options_qlp_coeff_precision_search" />
817                                         <span class="argument">-p</span>,<br /><span class="argument">--qlp-coeff-precision-search</span>
818                                 </td>
819                                 <td>
820                                         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.
821                                 </td>
822                         </tr>
823                         <tr>
824                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
825                                         <a name="flac_options_rice_partition_order" />
826                                         <span class="argument">-r [#,]#</span>,<br /><span class="argument">--rice-partition-order=[#,]#</span>
827                                 </td>
828                                 <td>
829                                         Set the [min,]max residual partition order.  The min value defaults to 0 if unspecified.<br /><br />
830                                         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.
831                                 </td>
832                         </tr>
833                 </table>
834                 </td></tr></table>
835
836                 <br />
837
838                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
839                 <table width="100%" border="1" bgcolor="#EEEED4">
840                         <tr>
841                                 <td colspan="2" bgcolor="#D3D4C5">
842                                         <a name="format_options"><font size="+1"><b>Format Options</b></font></a>
843                                 </td>
844                         </tr>
845                         <tr>
846                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
847                                         <a name="flac_options_endian" />
848                                         <span class="argument">--endian={big|little}</span>
849                                 </td>
850                                 <td>
851                                         Specify big-endian or little-endian byte order in the raw file.
852                                 </td>
853                         </tr>
854                         <tr>
855                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
856                                         <a name="flac_options_channels" />
857                                         <span class="argument">--channels=#</span>
858                                 </td>
859                                 <td>
860                                         Specify the number of channels in the raw file.
861                                 </td>
862                         </tr>
863                         <tr>
864                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
865                                         <a name="flac_options_bps" />
866                                         <span class="argument">--bps=#</span>
867                                 </td>
868                                 <td>
869                                         Specify the number of bits per sample in the raw file.
870                                 </td>
871                         </tr>
872                         <tr>
873                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
874                                         <a name="flac_options_sample_rate" />
875                                         <span class="argument">--sample-rate=#</span>
876                                 </td>
877                                 <td>
878                                         Specify the sample rate of the raw file.
879                                 </td>
880                         </tr>
881                         <tr>
882                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
883                                         <a name="flac_options_sign" />
884                                         <span class="argument">--sign={signed|unsigned}</span>
885                                 </td>
886                                 <td>
887                                         Specify that the samples in the raw file are signed or unsigned (the default is signed).
888                                 </td>
889                         </tr>
890                         <tr>
891                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
892                                         <a name="flac_options_input_size" />
893                                         <span class="argument">--input-size=#</span>
894                                 </td>
895                                 <td>
896                                         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.
897                                 </td>
898                         </tr>
899                         <tr>
900                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
901                                         <a name="flac_options_force_aiff_format" />
902                                         <span class="argument">--force-aiff-format</span>
903                                 </td>
904                                 <td>
905                                         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.
906                                 </td>
907                         </tr>
908                         <tr>
909                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
910                                         <a name="flac_options_force_raw_format" />
911                                         <span class="argument">--force-raw-format</span>
912                                 </td>
913                                 <td>
914                                         Treat the input file (or output file if decoding) as a raw file, regardless of the extension.
915                                 </td>
916                         </tr>
917                 </table>
918                 </td></tr></table>
919
920                 <br />
921
922                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
923                 <table width="100%" border="1" bgcolor="#EEEED4">
924                         <tr>
925                                 <td colspan="2" bgcolor="#D3D4C5">
926                                         <a name="negative_options"><font size="+1"><b>Negative Options</b></font></a>
927                                 </td>
928                         </tr>
929                         <tr>
930                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
931                                         <span class="argument">--no-adaptive-mid-side</span><br />
932                                         <span class="argument">--no-decode-through-errors</span><br />
933                                         <span class="argument">--no-delete-input-file</span><br />
934                                         <span class="argument">--no-escape-coding</span><br />
935                                         <span class="argument">--no-exhaustive-model-search</span><br />
936                                         <span class="argument">--no-lax</span><br />
937                                         <span class="argument">--no-mid-side</span><br />
938                                         <span class="argument">--no-ogg</span><br />
939                                         <span class="argument">--no-padding</span><br />
940                                         <span class="argument">--no-qlp-coeff-precision-search</span><br />
941                                         <span class="argument">--no-residual-gnuplot</span><br />
942                                         <span class="argument">--no-residual-text</span><br />
943                                         <span class="argument">--no-sector-align</span><br />
944                                         <span class="argument">--no-seektable</span><br />
945                                         <span class="argument">--no-silent</span><br />
946                                         <span class="argument">--no-verify</span>
947                                 </td>
948                                 <td>
949                                         Can all be used to turn off a particular option.
950                                 </td>
951                         </tr>
952                 </table>
953                 </td></tr></table>
954
955         </div>
956         <div class="box_footer"></div>
957 </div>
958
959 <br />
960
961 <div class="box">
962         <div class="box_title">
963                 <a name="metaflac">metaflac</a>
964         </div>
965         <div class="box_header"></div>
966         <div class="box_body">
967                 <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.
968                 <br /><br />
969                 <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":
970                 <ul>
971                         <li>
972                                 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.
973                         </li>
974                         <li>
975                                 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.
976                         </li>
977                         <li>
978                                 Global options, which affect all the operations.
979                         </li>
980                 </ul>
981                 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:
982                 <br /><br />
983                         <span class="code">metaflac --show-md5sum file1.flac file2.flac file3.flac</span>
984                 <br /><br />
985                         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):
986                 <br /><br />
987                         <span class="code">metaflac --preserve-modtime --remove-tag=DESCRIPTION --remove-tag=COMMENT file1.flac file2.flac file3.flac</span>
988                 <br /><br />
989
990                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
991                 <table width="100%" border="1" bgcolor="#EEEED4">
992                         <tr>
993                                 <td colspan="2" bgcolor="#D3D4C5">
994                                         <a name="global_options"><font size="+1"><b>Global Options</b></font></a>
995                                 </td>
996                         </tr>
997                         <tr>
998                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
999                                         <a name="metaflac_options_preserve_modtime" />
1000                                         <span class="argument">--preserve-modtime</span>
1001                                 </td>
1002                                 <td>
1003                                         Preserve the original modification time in spite of edits.
1004                                 </td>
1005                         </tr>
1006                         <tr>
1007                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1008                                         <a name="metaflac_options_with_filename" />
1009                                         <span class="argument">--with-filename</span>
1010                                 </td>
1011                                 <td>
1012                                         Prefix each output line with the FLAC file name (the default if more than one FLAC file is specified).
1013                                 </td>
1014                         </tr>
1015                         <tr>
1016                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1017                                         <a name="metaflac_options_no_filename" />
1018                                         <span class="argument">--no-filename</span>
1019                                 </td>
1020                                 <td>
1021                                         Do not prefix each output line with the FLAC file name (the default if only one FLAC file is specified)
1022                                 </td>
1023                         </tr>
1024                         <tr>
1025                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1026                                         <a name="metaflac_options_no_utf8_convert" />
1027                                         <span class="argument">--no-utf8-convert</span>
1028                                 </td>
1029                                 <td>
1030                                         Do not convert tags from UTF-8 to local charset, or vice versa.  This is useful for scripts.
1031                                 </td>
1032                         </tr>
1033                         <tr>
1034                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1035                                         <a name="metaflac_options_dont_use_padding" />
1036                                         <span class="argument">--dont-use-padding</span>
1037                                 </td>
1038                                 <td>
1039                                         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.
1040                                 </td>
1041                         </tr>
1042                 </table>
1043                 </td></tr></table>
1044
1045                 <br />
1046
1047                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
1048                 <table width="100%" border="1" bgcolor="#EEEED4">
1049                         <tr>
1050                                 <td colspan="2" bgcolor="#D3D4C5">
1051                                         <a name="shorthand_operations"><font size="+1"><b>Shorthand Operations</b></font></a>
1052                                 </td>
1053                         </tr>
1054                         <tr>
1055                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1056                                         <a name="metaflac_shorthand_show_md5sum" />
1057                                         <span class="argument">--show-md5sum</span>
1058                                 </td>
1059                                 <td>
1060                                         Show the MD5 signature from the <span class="code">STREAMINFO</span> block.
1061                                 </td>
1062                         </tr>
1063                         <tr>
1064                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1065                                         <a name="metaflac_shorthand_show_min_blocksize" />
1066                                         <span class="argument">--show-min-blocksize</span>
1067                                 </td>
1068                                 <td>
1069                                         Show the minimum block size from the <span class="code">STREAMINFO</span> block.
1070                                 </td>
1071                         </tr>
1072                         <tr>
1073                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1074                                         <a name="metaflac_shorthand_show_max_blocksize" />
1075                                         <span class="argument">--show-max-blocksize</span>
1076                                 </td>
1077                                 <td>
1078                                         Show the maximum block size from the <span class="code">STREAMINFO</span> block.
1079                                 </td>
1080                         </tr>
1081                         <tr>
1082                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1083                                         <a name="metaflac_shorthand_show_min_framesize" />
1084                                         <span class="argument">--show-min-framesize</span>
1085                                 </td>
1086                                 <td>
1087                                         Show the minimum frame size from the <span class="code">STREAMINFO</span> block.
1088                                 </td>
1089                         </tr>
1090                         <tr>
1091                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1092                                         <a name="metaflac_shorthand_show_max_framesize" />
1093                                         <span class="argument">--show-max-framesize</span>
1094                                 </td>
1095                                 <td>
1096                                         Show the maximum frame size from the <span class="code">STREAMINFO</span> block.
1097                                 </td>
1098                         </tr>
1099                         <tr>
1100                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1101                                         <a name="metaflac_shorthand_show_sample_rate" />
1102                                         <span class="argument">--show-sample-rate</span>
1103                                 </td>
1104                                 <td>
1105                                         Show the sample rate from the <span class="code">STREAMINFO</span> block.
1106                                 </td>
1107                         </tr>
1108                         <tr>
1109                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1110                                         <a name="metaflac_shorthand_show_channels" />
1111                                         <span class="argument">--show-channels</span>
1112                                 </td>
1113                                 <td>
1114                                         Show the number of channels from the <span class="code">STREAMINFO</span> block.
1115                                 </td>
1116                         </tr>
1117                         <tr>
1118                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1119                                         <a name="metaflac_shorthand_show_bps" />
1120                                         <span class="argument">--show-bps</span>
1121                                 </td>
1122                                 <td>
1123                                         Show the # of bits per sample from the <span class="code">STREAMINFO</span> block.
1124                                 </td>
1125                         </tr>
1126                         <tr>
1127                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1128                                         <a name="metaflac_shorthand_show_total_samples" />
1129                                         <span class="argument">--show-total-samples</span>
1130                                 </td>
1131                                 <td>
1132                                         Show the total # of samples from the <span class="code">STREAMINFO</span> block.
1133                                 </td>
1134                         </tr>
1135                         <tr>
1136                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1137                                         <a name="metaflac_shorthand_show_vendor_tag" />
1138                                         <span class="argument">--show-vendor-tag</span>
1139                                 </td>
1140                                 <td>
1141                                         Show the vendor string from the <span class="code">VORBIS_COMMENT</span> block.
1142                                 </td>
1143                         </tr>
1144                         <tr>
1145                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1146                                         <a name="metaflac_shorthand_show_tag" />
1147                                         <span class="argument">--show-tag=NAME</span>
1148                                 </td>
1149                                 <td>
1150                                         Show all tags where the the field name matches <span class="argument">NAME</span>.
1151                                 </td>
1152                         </tr>
1153                         <tr>
1154                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1155                                         <a name="metaflac_shorthand_remove_tag" />
1156                                         <span class="argument">--remove-tag=NAME</span>
1157                                 </td>
1158                                 <td>
1159                                         Remove all tags whose field name is <span class="argument">NAME</span>.
1160                                 </td>
1161                         </tr>
1162                         <tr>
1163                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1164                                         <a name="metaflac_shorthand_remove_first_tag" />
1165                                         <span class="argument">--remove-first-tag=NAME</span>
1166                                 </td>
1167                                 <td>
1168                                         Remove first tag whose field name is <span class="argument">NAME</span>.
1169                                 </td>
1170                         </tr>
1171                         <tr>
1172                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1173                                         <a name="metaflac_shorthand_remove_all_tags" />
1174                                         <span class="argument">--remove-all-tags</span>
1175                                 </td>
1176                                 <td>
1177                                         Remove all tags, leaving only the vendor string.
1178                                 </td>
1179                         </tr>
1180                         <tr>
1181                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1182                                         <a name="metaflac_shorthand_set_tag" />
1183                                         <span class="argument">--set-tag=FIELD</span>
1184                                 </td>
1185                                 <td>
1186                                         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.
1187                                 </td>
1188                         </tr>
1189                         <tr>
1190                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1191                                         <a name="metaflac_shorthand_set_tag_from_file" />
1192                                         <span class="argument">--set-tag-from-file=FIELD</span>
1193                                 </td>
1194                                 <td>
1195                                         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.
1196                                 </td>
1197                         </tr>
1198                         <tr>
1199                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1200                                         <a name="metaflac_shorthand_import_tags_from" />
1201                                         <span class="argument">--import-tags-from=FILE</span>
1202                                 </td>
1203                                 <td>
1204                                         Import tags from a file.  Use <span class="argument">-</span> 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.  If <span class="argument">FILE</span> is <span class="argument">-</span> (stdin), only one FLAC file may be specified.
1205                                 </td>
1206                         </tr>
1207                         <tr>
1208                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1209                                         <a name="metaflac_shorthand_export_tags_to" />
1210                                         <span class="argument">--export-tags-to=FILE</span>
1211                                 </td>
1212                                 <td>
1213                                         Export tags to a file.  Use <span class="argument">-</span> 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.
1214                                 </td>
1215                         </tr>
1216                         <tr>
1217                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1218                                         <a name="metaflac_shorthand_import_cuesheet_from" />
1219                                         <span class="argument">--import-cuesheet-from=FILE</span>
1220                                 </td>
1221                                 <td>
1222                                         Import a cuesheet from a file.  Use <span class="argument">-</span> 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.
1223                                 </td>
1224                         </tr>
1225                         <tr>
1226                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1227                                         <a name="metaflac_shorthand_export_cuesheet_to" />
1228                                         <span class="argument">--export-cuesheet-to=FILE</span>
1229                                 </td>
1230                                 <td>
1231                                         Export <span class="code">CUESHEET</span> block to a cuesheet file, suitable for use by CD authoring software.  Use <span class="argument">-</span> for stdout.  Only one FLAC file may be specified on the command line.
1232                                 </td>
1233                         </tr>
1234                         <tr>
1235                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1236                                         <a name="metaflac_shorthand_import_picture_from" />
1237                                         <span class="argument">--import-picture-from=SPECIFICATION</span>
1238                                 </td>
1239                                 <td>
1240                                         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.
1241                                 </td>
1242                         </tr>
1243                         <tr>
1244                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1245                                         <a name="metaflac_shorthand_export_picture_to" />
1246                                         <span class="argument">--export-picture-to=FILE</span>
1247                                 </td>
1248                                 <td>
1249                                         Export <span class="code">PICTURE</span> block to a file.  Use <span class="argument">-</span> for stdout.  Only one FLAC file may be specified on the command line.  The first <span class="code">PICTURE</span> block will be exported unless <span class="argument">--export-picture-to</span> is preceded by a <span class="argument">--block-number=#</span> option to specify the exact metadata block to extract.  Note that the block number is the one shown by --list.
1250                                 </td>
1251                         </tr>
1252                         <tr>
1253                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1254                                         <a name="metaflac_shorthand_add_replay_gain" />
1255                                         <span class="argument">--add-replay-gain</span>
1256                                 </td>
1257                                 <td>
1258                                         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.
1259                                 </td>
1260                         </tr>
1261                         <tr>
1262                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1263                                         <a name="metaflac_shorthand_remove_replay_gain" />
1264                                         <span class="argument">--remove-replay-gain</span>
1265                                 </td>
1266                                 <td>
1267                                         Removes the ReplayGain tags.
1268                                 </td>
1269                         </tr>
1270                         <tr>
1271                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1272                                         <a name="metaflac_shorthand_add_seekpoint" />
1273                                         <span class="argument">--add-seekpoint={#|X|#x|#s}</span>
1274                                 </td>
1275                                 <td>
1276                                         Add seek points to a <span class="code">SEEKTABLE</span> block:<br />
1277                                         <ul>
1278                                         <li>
1279                                                 <span class="argument">#&nbsp;</span> : a specific sample number for a seek point
1280                                         </li>
1281                                         <li>
1282                                                 <span class="argument">X&nbsp;</span> : a placeholder point (always goes at the end of the <span class="code">SEEKTABLE</span>)
1283                                         </li>
1284                                         <li>
1285                                                 <span class="argument">#x</span> : # evenly spaced seekpoints, the first being at sample 0
1286                                         </li>
1287                                         <li>
1288                                                 <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
1289                                         </li>
1290                                         </ul>
1291                                         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 />
1292                                         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 />
1293                                 </td>
1294                         </tr>
1295                         <tr>
1296                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1297                                         <a name="metaflac_shorthand_add_padding" />
1298                                         <span class="argument">--add-padding=#</span>
1299                                 </td>
1300                                 <td>
1301                                         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.
1302                                 </td>
1303                         </tr>
1304                 </table>
1305                 </td></tr></table>
1306
1307                 <br />
1308
1309                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
1310                 <table width="100%" border="1" bgcolor="#EEEED4">
1311                         <tr>
1312                                 <td colspan="2" bgcolor="#D3D4C5">
1313                                         <a name="major_operations"><font size="+1"><b>Major Operations</b></font></a>
1314                                 </td>
1315                         </tr>
1316                         <tr>
1317                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1318                                         <a name="metaflac_operations_version" />
1319                                         <span class="argument">--version</span>
1320                                 </td>
1321                                 <td>
1322                                         Show the metaflac version number.
1323                                 </td>
1324                         </tr>
1325                         <tr>
1326                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1327                                         <a name="metaflac_operations_list" />
1328                                         <span class="argument">--list</span>
1329                                 </td>
1330                                 <td>
1331                                         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 />
1332
1333                                         <span class="argument">--block-number=#[,#[...]]</span><br />
1334                                         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 />
1335
1336                                         <span class="argument">--block-type=type[,type[...]]</span><br />
1337                                         <span class="argument">--except-block-type=type[,type[...]]</span><br />
1338                                         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 />
1339                                         <table border="1">
1340                                                 <tr>
1341                                                         <td><span class="argument">APPLICATION:abcd</span></td>
1342                                                         <td>The <span class="code">APPLICATION</span> block(s) whose textual representation of the 4-byte ID is "abcd"</td>
1343                                                 </tr>
1344                                                 <tr>
1345                                                         <td><span class="argument">APPLICATION:0xXXXXXXXX</span></td>
1346                                                         <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>
1347                                                 </tr>
1348                                         </table>
1349                                         <br />
1350
1351                                         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 />
1352
1353                                         <span class="argument">--application-data-format=hexdump|text</span><br />
1354                                         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>.
1355                                 </td>
1356                         </tr>
1357                         <tr>
1358                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1359                                         <a name="metaflac_operations_remove" />
1360                                         <span class="argument">--remove</span>
1361                                 </td>
1362                                 <td>
1363                                         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 />
1364
1365                                         <span class="argument">--block-number=#[,#[...]]</span><br />
1366                                         <span class="argument">--block-type=type[,type[...]]</span><br />
1367                                         <span class="argument">--except-block-type=type[,type[...]]</span><br />
1368                                         See <a href="#metaflac_operations_list"><span class="argument">--list</span></a> above for usage.<br /><br />
1369
1370                                         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.
1371                                 </td>
1372                         </tr>
1373                         <tr>
1374                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1375                                         <a name="metaflac_operations_remove_all" />
1376                                         <span class="argument">--remove-all</span>
1377                                 </td>
1378                                 <td>
1379                                         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.
1380                                 </td>
1381                         </tr>
1382                         <tr>
1383                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1384                                         <a name="metaflac_operations_merge_padding" />
1385                                         <span class="argument">--merge-padding</span>
1386                                 </td>
1387                                 <td>
1388                                         Merge adjacent <span class="code">PADDING</span> blocks into single blocks.
1389                                 </td>
1390                         </tr>
1391                         <tr>
1392                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
1393                                         <a name="metaflac_operations_sort_padding" />
1394                                         <span class="argument">--sort-padding</span>
1395                                 </td>
1396                                 <td>
1397                                         Move all <span class="code">PADDING</span> blocks to the end of the metadata and merge them into a single block.
1398                                 </td>
1399                         </tr>
1400                 </table>
1401                 </td></tr></table>
1402
1403         </div>
1404         <div class="box_footer"></div>
1405 </div>
1406
1407 <br />
1408
1409 <div class="box">
1410         <div class="box_title">
1411                 <a name="plugins"></a><a name="xmms_plugin">xmms plugin</a>
1412         </div>
1413         <div class="box_header"></div>
1414         <div class="box_body">
1415                 All that is necessary is to copy <span class="code">libxmms-flac.so</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.
1416         </div>
1417         <div class="box_footer"></div>
1418 </div>
1419
1420 <br />
1421
1422 <div class="box">
1423         <div class="box_title">
1424                 <a name="winamp2_plugin">winamp2 plugin</a>
1425         </div>
1426         <div class="box_header"></div>
1427         <div class="box_body">
1428                 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.
1429         </div>
1430         <div class="box_footer"></div>
1431 </div>
1432
1433 <br />
1434
1435 <div class="box">
1436         <div class="box_title">
1437                 <a name="bugs">known bugs</a>
1438         </div>
1439         <div class="box_header"></div>
1440         <div class="box_body">
1441                 Bug tracking is done on the Sourceforge project page <a href="http://sourceforge.net/bugs/?group_id=13478">here</a>.  If you submit a bug, make sure and provide an email contact or use the Monitor feature.
1442                 <br /><br />
1443                 The following are major known bugs in the current (1.1.3) release:
1444                 <ul>
1445                         <li>
1446                                 (none)
1447                         </li>
1448                 </ul>
1449                 The following are major known bugs in the 1.1.0 release:
1450                 <ul>
1451                         <li>
1452                                 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.
1453                         </li>
1454                 </ul>
1455                 The following are major known bugs in the 1.0.4 release:
1456                 <ul>
1457                         <li>
1458                                 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.
1459                         </li>
1460                         <li>
1461                                 <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.
1462                         </li>
1463                         <li>
1464                                 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.
1465                         </li>
1466                 </ul>
1467         </div>
1468         <div class="box_footer"></div>
1469 </div>
1470
1471 <br />
1472
1473 <div class="box">
1474         <div class="box_title">
1475                 <a name="monkey">monkey</a>
1476         </div>
1477         <div class="box_header"></div>
1478         <div class="box_body">
1479                 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:
1480                 <ul>
1481                         <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>
1482                         <li>
1483                                 Choose a supported encoder to replace:
1484                                 <ul>
1485                                         <li>Shorten - copy <span class="commandname">flac_mac.exe</span> on top of <span class="commandname">External/shortn32.exe</span></li>
1486                                         <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>
1487                                         <li>RKAU - copy <span class="commandname">flac_mac.exe</span> on top of <span class="commandname">External/rkau.exe</span></li>
1488                                 </ul>
1489                                 If you choose WavPack you will also be able to use the WavPack Configuration menu to add flac options.
1490                         </li>
1491                         <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>
1492                 </ul>
1493                 Other front-ends may be wedged in the same way; if you have one in mind, post it to the <a href="http://lists.sourceforge.net/lists/listinfo/flac-dev">flac-dev</a> mailing list.
1494         </div>
1495         <div class="box_footer"></div>
1496 </div>
1497
1498
1499 <div class="copyright">
1500         Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson
1501 </div>
1502
1503 </body>
1504 </html>