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