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