change default extension for ogg flac from .ogg to .oga (SF#1762492: http://sourcefor...
[flac.git] / doc / html / documentation_tools_flac.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <!-- Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  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="documentation.html">documentation</a>&nbsp;&nbsp;|
33         &nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
34         &nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
35         &nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
36         &nbsp;<a href="developers.html">developers</a>&nbsp;
37 </div>
38
39 <div class="langbar">
40         &nbsp;english&nbsp;&nbsp;|
41         &nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
42 </div>
43
44 <div class="below_nav"></div>
45
46 <div class="box">
47         <div class="box_title">
48                 <a name="flac">flac</a>
49         </div>
50         <div class="box_header"></div>
51         <div class="box_body">
52                 <a name="toc"><font size="+1"><b><u>Table of Contents</u></b></font></a>
53                 <ul>
54                         <li><a href="#usage">General Usage</a></li>
55                         <li><a href="#general_options">General Options</a></li>
56                         <li><a href="#analysis_options">Analysis Options</a></li>
57                         <li><a href="#decoding_options">Decoding Options</a></li>
58                         <li><a href="#encoding_options">Encoding Options</a></li>
59                         <li><a href="#format_options">Format Options</a></li>
60                         <li><a href="#negative_options">Negative Options</a></li>
61                         <li><a href="#option_index">Option Index</a></li>
62                 </ul>
63                 <a name="usage"><font size="+1"><b><u>General Usage</u></b></font></a><br />
64                 <br />
65                 <span class="commandname">flac</span> is the command-line file encoder/decoder.  The encoder currently supports as input RIFF WAVE, AIFF, FLAC or Ogg FLAC format, or raw interleaved samples.  The decoder currently can output to RIFF WAVE or AIFF format, or raw interleaved samples.  <span class="commandname">flac</span> only supports linear PCM samples (in other words, no A-LAW, uLAW, etc.), and the input must be between 4 and 24 bits per sample.  This is not a limitation of the FLAC format, just the reference encoder/decoder.<br />
66                 <br />
67                 <span class="commandname">flac</span> assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files, files ending in ".aif" or ".aiff" or have the AIFF header present are AIFF files, and files ending in ".flac" or have the FLAC header present are FLAC files.  This assumption may be overridden with a command-line option.  It also assumes that files ending in ".oga" or ".ogg" or have the Ogg FLAC header present are Ogg FLAC files.  Other than this, <span class="commandname">flac</span> makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient "8.3" file systems like FAT-16).<br />
68                 <br />
69                 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.<br />
70                 <br />
71                 <span class="commandname">flac</span> will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing:
72                 <ul>
73                         <li>
74                                 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 [...]]
75                         </li>
76                         <li>
77                                 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 [...]]
78                         </li>
79                         <li>
80                                 Testing: flac -t [<i><a href="#general_options">&lt;general-options&gt;</a></i>] [FLACfile [...]]
81                         </li>
82                         <li>
83                                 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 [...]]
84                         </li>
85                 </ul>
86                 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.<br />
87                 <br />
88                 If you are encoding/decoding from stdin to a file, you should use the -o option like so:
89                 <ul>
90                         <li>
91                                 flac [options] -o outputfile
92                         </li>
93                         <li>
94                                 flac -d [options] -o outputfile
95                         </li>
96                         </ul>
97                         which are better than:
98                         <ul>
99                         <li>
100                                 flac [options] &gt; outputfile
101                         </li>
102                         <li>
103                                 flac -d [options] &gt; outputfile
104                         </li>
105                 </ul>
106                 since the former allows flac to seek backwards to write the <span class="code">STREAMINFO</span> or RIFF WAVE header contents when necessary.<br />
107                 <br />
108                 Also, you can force output data to go to stdout using <span class="argument">-c</span>.<br />
109                 <br />
110                 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:
111                 <ul>
112                         <li>
113                                 <span class="code">flac -V -- -01-filename.wav</span>
114                         </li>
115                 </ul>
116                 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.<br />
117                 <br />
118                 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.<br />
119                 <br />
120                 <span class="commandname">flac</span> can also re-encode FLAC files.  In other words, you can specify a FLAC or Ogg FLAC file as an input to the encoder and it will decoder it and re-encode it according to the options you specify.  It will also preserve all the metadata unless you override it with other options (e.g. specifying new tags, seekpoints, cuesheet, padding, etc.).<br />
121                 <br />
122                 <span class="commandname">flac</span> has been tuned so that the default settings 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, see <a href="documentation_format_overview.html">About the FLAC Format</a>.<br />
123                 <br />
124
125                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
126                 <table width="100%" border="1" bgcolor="#EEEED4">
127                         <tr>
128                                 <td colspan="2" bgcolor="#D3D4C5">
129                                         <a name="general_options"><font size="+1"><b>General Options</b></font></a>
130                                 </td>
131                         </tr>
132                         <tr>
133                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
134                                         <a name="flac_options_version" />
135                                         <span class="argument">-v</span>, <span class="argument">--version</span>
136                                 </td>
137                                 <td>
138                                         Show the <span class="commandname">flac</span> version number.
139                                 </td>
140                         </tr>
141                         <tr>
142                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
143                                         <a name="flac_options_help" />
144                                         <span class="argument">-h</span>, <span class="argument">--help</span>
145                                 </td>
146                                 <td>
147                                         Show basic usage and a list of all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
148                                 </td>
149                         </tr>
150                         <tr>
151                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
152                                         <a name="flac_options_explain" />
153                                         <span class="argument">-H</span>, <span class="argument">--explain</span>
154                                 </td>
155                                 <td>
156                                         Show detailed explanation of usage and all options.  Running <span class="commandname">flac</span> without arguments shows the short help screen by default.
157                                 </td>
158                         </tr>
159                         <tr>
160                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
161                                         <a name="flac_options_decode" />
162                                         <span class="argument">-d</span>, <span class="argument">--decode</span>
163                                 </td>
164                                 <td>
165                                         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>.
166                                 </td>
167                         </tr>
168                         <tr>
169                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
170                                         <a name="flac_options_test" />
171                                         <span class="argument">-t</span>, <span class="argument">--test</span>
172                                 </td>
173                                 <td>
174                                         Test (same as <span class="argument">-d</span> except no decoded file is written).  The exit codes are the same as in decode mode.
175                                 </td>
176                         </tr>
177                         <tr>
178                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
179                                         <a name="flac_options_analyze" />
180                                         <span class="argument">-a</span>, <span class="argument">--analyze</span>
181                                 </td>
182                                 <td>
183                                         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.
184                                 </td>
185                         </tr>
186                         <tr>
187                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
188                                         <a name="flac_options_stdout" />
189                                         <span class="argument">-c</span>, <span class="argument">--stdout</span>
190                                 </td>
191                                 <td>
192                                         Write output to stdout.
193                                 </td>
194                         </tr>
195                         <tr>
196                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
197                                         <a name="flac_options_silent" />
198                                         <span class="argument">-s</span>, <span class="argument">--silent</span>
199                                 </td>
200                                 <td>
201                                         Silent: do not show encoding/decoding statistics.
202                                 </td>
203                         </tr>
204                         <tr>
205                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
206                                         <a name="flac_options_totally_silent" />
207                                         <span class="argument">--totally-silent</span>
208                                 </td>
209                                 <td>
210                                         Do not print anything of any kind, including warnings or errors.  The exit code will be the only way to determine successful completion.
211                                 </td>
212                         </tr>
213                         <tr>
214                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
215                                         <a name="flac_options_no_utf8_convert" />
216                                         <span class="argument">--no-utf8-convert</span>
217                                 </td>
218                                 <td>
219                                         Do not convert tags from local charset to UTF-8.  This is useful for scripts, and setting tags in situations where the locale is wrong.  This option must appear before any tag options!
220                                 </td>
221                         </tr>
222                         <tr>
223                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
224                                         <a name="flac_options_warnings_as_errors" />
225                                         <span class="argument">-w</span>, <span class="argument">--warnings-as-errors</span>
226                                 </td>
227                                 <td>
228                                         Treat all warnings as errors (which cause <span class="commandname">flac</span> to terminate with a non-zero exit code).
229                                 </td>
230                         </tr>
231                         <tr>
232                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
233                                         <a name="flac_options_force" />
234                                         <span class="argument">-f</span>, <span class="argument">--force</span>
235                                 </td>
236                                 <td>
237                                         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.
238                                 </td>
239                         </tr>
240                         <tr>
241                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
242                                         <a name="flac_options_output_name" />
243                                         <span class="argument">-o filename</span>,<br /><span class="argument">--output-name=filename</span>
244                                 </td>
245                                 <td>
246                                         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>.
247                                 </td>
248                         </tr>
249                         <tr>
250                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
251                                         <a name="flac_options_output_prefix" />
252                                         <span class="argument">--output-prefix=string</span>
253                                 </td>
254                                 <td>
255                                         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.
256                                 </td>
257                         </tr>
258                         <tr>
259                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
260                                         <a name="flac_options_delete_input_file" />
261                                         <span class="argument">--delete-input-file</span>
262                                 </td>
263                                 <td>
264                                         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.
265                                 </td>
266                         </tr>
267                         <tr>
268                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
269                                         <a name="flac_options_skip" />
270                                         <span class="argument">--skip={#|mm:ss.ss}</span>
271                                 </td>
272                                 <td>
273                                         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 />
274                                         <br />
275                                         Examples:<br />
276                                         <br />
277                                         <span class="argument">--skip=123</span> : skip the first 123 samples of the input<br />
278                                         <span class="argument">--skip=1:23.45</span> : skip the first 1 minute and 23.45 seconds of the input
279                                 </td>
280                         </tr>
281                         <tr>
282                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
283                                         <a name="flac_options_until" />
284                                         <span class="argument">--until={#|[+|-]mm:ss.ss}</span>
285                                 </td>
286                                 <td>
287                                         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 />
288                                         <br />
289                                         Examples:<br />
290                                         <br />
291                                         <span class="argument">--until=123</span> : decode only the first 123 samples of the input (samples 0-122, stopping at 123)<br />
292                                         <span class="argument">--until=1:23.45</span> : decode only the first 1 minute and 23.45 seconds of the input<br />
293                                         <span class="argument">--skip=1:00 --until=+1:23.45</span> : decode 1:00.00 to 2:23.45<br />
294                                         <span class="argument">--until=-1:23.45</span> : decode everything except the last 1 minute and 23.45 seconds<br />
295                                         <span class="argument">--until=-0:00</span> : decode until the end of the input (the same as not specifying <span class="argument">--until</span>)
296                                 </td>
297                         </tr>
298                         <tr>
299                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
300                                         <a name="flac_options_ogg" />
301                                         <span class="argument">--ogg</span>
302                                 </td>
303                                 <td>
304                                         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 '.oga' extension and will still be decodable by <span class="commandname">flac</span>.<br />
305                                         <br />
306                                         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 '.oga' or '.ogg'.<br />
307                                         <br />
308                                         <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.
309                                 </td>
310                         </tr>
311                         <tr>
312                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
313                                         <a name="flac_options_serial_number" />
314                                         <span class="argument">--serial-number=#</span>
315                                 </td>
316                                 <td>
317                                         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.
318                                 </td>
319                         </tr>
320                 </table>
321                 </td></tr></table>
322
323                 <br />
324
325                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
326                 <table width="100%" border="1" bgcolor="#EEEED4">
327                         <tr>
328                                 <td colspan="2" bgcolor="#D3D4C5">
329                                         <a name="analysis_options"><font size="+1"><b>Analysis Options</b></font></a>
330                                 </td>
331                         </tr>
332                         <tr>
333                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
334                                         <a name="flac_options_residual_text" />
335                                         <span class="argument">--residual-text</span>
336                                 </td>
337                                 <td>
338                                         Includes the residual signal in the analysis file.  This will make the file <b>very</b> big, much larger than even the decoded file.
339                                 </td>
340                         </tr>
341                         <tr>
342                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
343                                         <a name="flac_options_residual_gnuplot" />
344                                         <span class="argument">--residual-gnuplot</span>
345                                 </td>
346                                 <td>
347                                         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.
348                                 </td>
349                         </tr>
350                 </table>
351                 </td></tr></table>
352
353                 <br />
354
355                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
356                 <table width="100%" border="1" bgcolor="#EEEED4">
357                         <tr>
358                                 <td colspan="2" bgcolor="#D3D4C5">
359                                         <a name="decoding_options"><font size="+1"><b>Decoding Options</b></font></a>
360                                 </td>
361                         </tr>
362                         <tr>
363                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
364                                         <a name="flac_options_cue" />
365                                         <span class="argument">--cue=[#.#][-[#.#]]</span>
366                                 </td>
367                                 <td>
368                                         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 />
369                                         <br />
370                                         Examples:<br />
371                                         <br />
372                                         <span class="argument">--cue=-</span> : decode the entire stream<br />
373                                         <span class="argument">--cue=4.1</span> : decode from track 4, index 1 to the end of the stream<br />
374                                         <span class="argument">--cue=4.1-</span> : decode from track 4, index 1 to the end of the stream<br />
375                                         <span class="argument">--cue=-4.1</span> : decode from the beginning of the stream up to, but not including, track 4, index 1<br />
376                                         <span class="argument">--cue=2.1-2.4</span> : decode from track 2, index 1, up to, but not including, track 2, index 4<br />
377                                         <span class="argument">--cue=9.1-10.1</span> : decode from track 9 the way it would be played on a CD player; this works even if the CD has no 10th track.
378                                 </td>
379                         </tr>
380                         <tr>
381                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
382                                         <a name="flac_options_decode_through_errors" />
383                                         <span class="argument">-F</span>,<br /><span class="argument">--decode-through-errors</span>
384                                 </td>
385                                 <td>
386                                         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.
387                                 </td>
388                         </tr>
389                         <!-- @@@ undocumented, also not in the man page yet
390                         <tr>
391                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
392                                         <a name="flac_options_apply_replaygain_which_is_not_lossless" />
393                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless[=&lt;specification&gt;]</span>
394                                 </td>
395                                 <td>
396                                         Applies ReplayGain values while decoding.<br />
397                                         <br />
398                                         <b>WARNING: THIS IS NOT LOSSLESS.  DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION</b>.<br />
399                                         <br />
400                                         The equals sign and &lt;specification&gt; is optional.  If omitted, the default is <span class="argument">0aLn1</span>.<br />
401                                         <br />
402                                         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 />
403                                         <br />
404                                         &nbsp;&nbsp;<span class="argument">[&lt;preamp&gt;][a|t][l|L][n{0|1|2|3}]</span>
405                                         <ul>
406                                                 <li>
407                                                         <span class="argument">&lt;preamp&gt;</span><br />
408                                                                 &nbsp;&nbsp;A floating point number in dB.  This is added to the existing gain value.
409                                                 </li>
410                                                 <li>
411                                                         <span class="argument">a|t</span><br />
412                                                                 &nbsp;&nbsp;Specify '<span class="argument">a</span>' to use the album gain, or '<span class="argument">t</span>' to use the track gain.  If tags for the preferred kind (album/track) do not exist but tags for the other (track/album) do, those will be used instead.
413                                                 </li>
414                                                 <li>
415                                                         <span class="argument">l|L</span><br />
416                                                                 &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.
417                                                 </li>
418                                                 <li>
419                                                         <span class="argument">n{0|1|2|3}</span><br />
420                                                                 &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'.
421                                                 </li>
422                                         </ul>
423                                         For example, the default of <span class="argument">0aLn1</span> means 0dB preamp, use album gain, 6dB hard limit, low noise shaping.<br />
424                                         <br />
425                                         <span class="argument">-@@@-apply-replaygain-which-is-not-lossless=3</span> means 3dB preamp, use album gain, no limiting, no noise shaping.<br />
426                                         <br />
427                                         <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.
428                                 </td>
429                         </tr>
430                         -->
431                 </table>
432                 </td></tr></table>
433
434                 <br />
435
436                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
437                 <table width="100%" border="1" bgcolor="#EEEED4">
438                         <tr>
439                                 <td colspan="2" bgcolor="#D3D4C5">
440                                         <a name="encoding_options"><font size="+1"><b>Encoding Options</b></font></a>
441                                 </td>
442                         </tr>
443                         <tr>
444                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
445                                         <a name="flac_options_verify" />
446                                         <span class="argument">-V</span>, <span class="argument">--verify</span>
447                                 </td>
448                                 <td>
449                                         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.
450                                 </td>
451                         </tr>
452                         <tr>
453                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
454                                         <a name="flac_options_lax" />
455                                         <span class="argument">--lax</span>
456                                 </td>
457                                 <td>
458                                         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.
459                                 </td>
460                         </tr>
461                         <tr>
462                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
463                                         <a name="flac_options_replay_gain" />
464                                         <span class="argument">--replay-gain</span>
465                                 </td>
466                                 <td>
467                                         Calculate <a href="http://www.replaygain.org/">ReplayGain</a> values and store them as FLAC tags, similar to <a href="http://packages.qa.debian.org/v/vorbisgain.html">VorbisGain</a>.  Title gains/peaks will be computed for each input file, and an album gain/peak will be computed for all files.  All input files must have the same resolution, sample rate, and number of channels.  Only mono and stereo files are allowed, and the sample rate must be one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, or 48 kHz.  Also note that this option may leave a few extra bytes in a <span class="code">PADDING</span> block as the exact size of the tags is not known until all files are processed.<br />
468                                         <br />
469                                         Note that this option cannot be used when encoding to standard output (stdout).
470                                 </td>
471                         </tr>
472                         <tr>
473                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
474                                         <a name="flac_options_cuesheet" />
475                                         <span class="argument">--cuesheet=FILENAME</span>
476                                 </td>
477                                 <td>
478                                         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 />
479                                         <br />
480                                         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>, etc.  See also <a href="http://digitalx.org/cuesheetsyntax.php">cuesheet syntax</a>.
481                                 </td>
482                         </tr>
483                         <tr>
484                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
485                                         <a name="flac_options_picture" />
486                                         <span class="argument">--picture={FILENAME|SPECIFICATION}</span>
487                                 </td>
488                                 <td>
489                                         Import a picture and store it in a <a href="format.html#def_PICTURE"><span class="code">PICTURE</span></a> metadata block.  More than one <span class="argument">--picture</span> command can be specified.  Either a filename for the picture file or a more complete specification form can be used.  The <span class="argument">SPECIFICATION</span> is a string whose parts are separated by | (pipe) characters.  Some parts may be left empty to invoke default values.  <span class="argument">FILENAME</span> is just shorthand for <span class="argument">||||FILENAME</span>.  The format of <span class="argument">SPECIFICATION</span> is<br />
490                                         <br />
491                                         <tt>&nbsp;&nbsp;[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE</tt><br />
492                                         <br />
493                                         <span class="argument">TYPE</span> is optional; it is a number from one of:<br />
494                                         <ul>
495                                                 <li><tt>0: Other</tt></li>
496                                                 <li><tt>1: 32x32 pixels 'file icon' (PNG only)</tt></li>
497                                                 <li><tt>2: Other file icon</tt></li>
498                                                 <li><tt>3: Cover (front)</tt></li>
499                                                 <li><tt>4: Cover (back)</tt></li>
500                                                 <li><tt>5: Leaflet page</tt></li>
501                                                 <li><tt>6: Media (e.g. label side of CD)</tt></li>
502                                                 <li><tt>7: Lead artist/lead performer/soloist</tt></li>
503                                                 <li><tt>8: Artist/performer</tt></li>
504                                                 <li><tt>9: Conductor</tt></li>
505                                                 <li><tt>10: Band/Orchestra</tt></li>
506                                                 <li><tt>11: Composer</tt></li>
507                                                 <li><tt>12: Lyricist/text writer</tt></li>
508                                                 <li><tt>13: Recording Location</tt></li>
509                                                 <li><tt>14: During recording</tt></li>
510                                                 <li><tt>15: During performance</tt></li>
511                                                 <li><tt>16: Movie/video screen capture</tt></li>
512                                                 <li><tt>17: A bright coloured fish</tt></li>
513                                                 <li><tt>18: Illustration</tt></li>
514                                                 <li><tt>19: Band/artist logotype</tt></li>
515                                                 <li><tt>20: Publisher/Studio logotype</tt></li>
516                                         </ul>
517                                         The default is 3 (front cover).  There may only be one picture each of type 1 and 2 in a file.<br/>
518                                         <br />
519                                         <span class="argument">MIME-TYPE</span> is optional; if left blank, it will be detected from the file.  For best compatibility with players, use pictures with MIME type <tt>image/jpeg</tt> or <tt>image/png</tt>.  The MIME type can also be --&gt; to mean that <span class="argument">FILE</span> is actually a URL to an image, though this use is discouraged.<br />
520                                         <br />
521                                         <span class="argument">DESCRIPTION</span> is optional; the default is an empty string.<br />
522                                         <br />
523                                         The next part specfies the resolution and color information.  If the <span class="argument">MIME-TYPE</span> is <tt>image/jpeg</tt>, <tt>image/png</tt>, or <tt>image/gif</tt>, you can usually leave this empty and they can be detected from the file.  Otherwise, you must specify the width in pixels, height in pixels, and color depth in bits-per-pixel.  If the image has indexed colors you should also specify the number of colors used.  When manually specified, it is not checked against the file for accuracy.<br />
524                                         <br />
525                                         <span class="argument">FILE</span> is the path to the picture file to be imported, or the URL if MIME type is --&gt;<br />
526                                         <br />
527                                         For example, the specification <span class="argument">|image/jpeg|||../cover.jpg</span> will embed the JPEG file at <tt>../cover.jpg</tt>, defaulting to type 3 (front cover) and an empty description.  The resolution and color info will be retrieved from the file itself.<br />
528                                         <br />
529                                         The specification <span class="argument">4|--&gt;|CD|320x300x24/173|http://blah.blah/backcover.tiff</span> will embed the given URL, with type 4 (back cover), description "CD", and a manually specified resolution of 320x300, 24 bits-per-pixel, and 173 colors.  The file at the URL will not be fetched; the URL itself is stored in the PICTURE metadata block.
530                                 </td>
531                         </tr>
532                         <tr>
533                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
534                                         <a name="flac_options_sector_align" />
535                                         <span class="argument">--sector-align</span>
536                                 </td>
537                                 <td>
538                                         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 />
539                                         <br />
540                                         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 />
541                                         <br />
542                                         <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>'.
543                                 </td>
544                         </tr>
545                         <tr>
546                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
547                                         <a name="flac_options_seekpoint" />
548                                         <span class="argument">-S {#|X|#x|#s}</span>,<br /><span class="argument">--seekpoint={#|X|#x|#s}</span>
549                                 </td>
550                                 <td>
551                                         Include a point or points in a <span class="code">SEEKTABLE</span>:<br />
552                                         <ul>
553                                         <li>
554                                                 <span class="argument">#&nbsp;</span> : a specific sample number for a seek point
555                                         </li>
556                                         <li>
557                                                 <span class="argument">X&nbsp;</span> : a placeholder point (always goes at the end of the <span class="code">SEEKTABLE</span>)
558                                         </li>
559                                         <li>
560                                                 <span class="argument">#x</span> : # evenly spaced seekpoints, the first being at sample 0
561                                         </li>
562                                         <li>
563                                                 <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
564                                         </li>
565                                         </ul>
566                                         You may use many -S options; the resulting <span class="code">SEEKTABLE</span> will be the unique-ified union of all such values.<br />
567                                         With no -S options, flac defaults to '-S 10s'.  Use --no-seektable for no <span class="code">SEEKTABLE</span>.<br />
568                                         <b>NOTE:</b> -S #x and -S #s will not work if the encoder can't determine the input size before starting.<br />
569                                         <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 />
570                                 </td>
571                         </tr>
572                         <tr>
573                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
574                                         <a name="flac_options_padding" />
575                                         <span class="argument">-P #</span>, <span class="argument">--padding=#</span>
576                                 </td>
577                                 <td>
578                                         Tell the encoder to write a <span class="code">PADDING</span> metadata block of the given length (in bytes) after the <span class="code">STREAMINFO</span> block.  This is useful if you plan to tag the file later with an <span class="code">APPLICATION</span> block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the <span class="code">PADDING</span> block.  Note that the total length of the <span class="code">PADDING</span> block will be 4 bytes longer than the length given because of the 4 metadata block header bytes.  You can force no <span class="code">PADDING</span> block at all to be written with <span class="argument">--no-padding</span>.  The encoder writes a <span class="code">PADDING</span> block of 8192 bytes by default (or 65536 bytes if the input audio stream is more than 20 minutes long).
579                                 </td>
580                         </tr>
581                         <tr>
582                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
583                                         <a name="flac_options_tag" />
584                                         <span class="argument">-T FIELD=VALUE</span>,<br /><span class="argument">--tag=FIELD=VALUE</span>
585                                 </td>
586                                 <td>
587                                         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.
588                                 </td>
589                         </tr>
590                         <tr>
591                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
592                                         <a name="flac_options_tag_from_file" />
593                                         <span class="argument">--tag-from-file=FIELD=FILENAME</span>
594                                 </td>
595                                 <td>
596                                         Like <a href="#flac_options_tag"><span class="argument">--tag</span></a>, except FILENAME is a file whose contents will be read verbatim to set the tag value.  The contents will be converted to UTF-8 from the local charset.  This can be used to store a cuesheet in a tag (e.g. <span class="argument">--tag-from-file="CUESHEET=image.cue"</span>).  Do not try to store binary data in tag fields!  Use APPLICATION blocks for that.
597                                 </td>
598                         </tr>
599                         <tr>
600                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
601                                         <a name="flac_options_blocksize" />
602                                         <span class="argument">-b #</span>, <span class="argument">--blocksize=#</span>
603                                 </td>
604                                 <td>
605                                         Specify the block size in samples.  Subset streams must use one of 192/576/1152/2304/4608/256/512/1024/2048/4096 (and 8192/16384 if the sample rate is &gt;48kHz).  The reference encoder uses the same block size for the entire stream.
606                                 </td>
607                         </tr>
608                         <tr>
609                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
610                                         <a name="flac_options_mid_side" />
611                                         <span class="argument">-m</span>, <span class="argument">--mid-side</span>
612                                 </td>
613                                 <td>
614                                         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.
615                                 </td>
616                         </tr>
617                         <tr>
618                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
619                                         <a name="flac_options_adaptive_mid_side" />
620                                         <span class="argument">-M</span>, <span class="argument">--adaptive-mid-side</span>
621                                 </td>
622                                 <td>
623                                         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).
624                                 </td>
625                         </tr>
626                         <tr>
627                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
628                                         <a name="flac_options_levels" />
629                                         <span class="argument">-0 .. -8</span>
630                                 </td>
631                                 <td>
632                                         Fastest compression .. highest compression.  The default is <span class="argument">-5</span>.
633                                 </td>
634                         </tr>
635                         <tr>
636                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
637                                         <a name="flac_options_level_0" />
638                                         <span class="argument">-0</span>, <span class="argument">--compression-level-0</span>
639                                 </td>
640                                 <td>
641                                         Synonymous with <span class="argument">-l 0 -b 1152 -r 3</span>
642                                 </td>
643                         </tr>
644                         <tr>
645                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
646                                         <a name="flac_options_level_1" />
647                                         <span class="argument">-1</span>, <span class="argument">--compression-level-1</span>
648                                 </td>
649                                 <td>
650                                         Synonymous with <span class="argument">-l 0 -b 1152 -M -r 3</span>
651                                 </td>
652                         </tr>
653                         <tr>
654                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
655                                         <a name="flac_options_level_2" />
656                                         <span class="argument">-2</span>, <span class="argument">--compression-level-2</span>
657                                 </td>
658                                 <td>
659                                         Synonymous with <span class="argument">-l 0 -b 1152 -m -r 3</span>
660                                 </td>
661                         </tr>
662                         <tr>
663                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
664                                         <a name="flac_options_level_3" />
665                                         <span class="argument">-3</span>, <span class="argument">--compression-level-3</span>
666                                 </td>
667                                 <td>
668                                         Synonymous with <span class="argument">-l 6 -b 4096 -r 4</span>
669                                 </td>
670                         </tr>
671                         <tr>
672                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
673                                         <a name="flac_options_level_4" />
674                                         <span class="argument">-4</span>, <span class="argument">--compression-level-4</span>
675                                 </td>
676                                 <td>
677                                         Synonymous with <span class="argument">-l 8 -b 4096 -M -r 4</span>
678                                 </td>
679                         </tr>
680                         <tr>
681                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
682                                         <a name="flac_options_level_5" />
683                                         <span class="argument">-5</span>, <span class="argument">--compression-level-5</span>
684                                 </td>
685                                 <td>
686                                         Synonymous with <span class="argument">-l 8 -b 4096 -m -r 5</span>
687                                 </td>
688                         </tr>
689                         <tr>
690                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
691                                         <a name="flac_options_level_6" />
692                                         <span class="argument">-6</span>, <span class="argument">--compression-level-6</span>
693                                 </td>
694                                 <td>
695                                         Synonymous with <span class="argument">-l 8 -b 4096 -m -r 6</span>
696                                 </td>
697                         </tr>
698                         <tr>
699                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
700                                         <a name="flac_options_level_7" />
701                                         <span class="argument">-7</span>, <span class="argument">--compression-level-7</span>
702                                 </td>
703                                 <td>
704                                         Synonymous with <span class="argument">-l 8 -b 4096 -m -e -r 6</span>
705                                 </td>
706                         </tr>
707                         <tr>
708                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
709                                         <a name="flac_options_level_8" />
710                                         <span class="argument">-8</span>, <span class="argument">--compression-level-8</span>
711                                 </td>
712                                 <td>
713                                         Synonymous with <span class="argument">-l 12 -b 4096 -m -e -r 6</span>
714                                 </td>
715                         </tr>
716                         <tr>
717                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
718                                         <a name="flac_options_fast" />
719                                         <span class="argument">--fast</span>
720                                 </td>
721                                 <td>
722                                         Fastest compression.  Currently synonymous with <span class="argument">-0</span>
723                                 </td>
724                         </tr>
725                         <tr>
726                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
727                                         <a name="flac_options_best" />
728                                         <span class="argument">--best</span>
729                                 </td>
730                                 <td>
731                                         Highest compression.  Currently synonymous with <span class="argument">-8</span>
732                                 </td>
733                         </tr>
734                         <tr>
735                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
736                                         <a name="flac_options_exhaustive_model_search" />
737                                         <span class="argument">-e</span>,<br /><span class="argument">--exhaustive-model-search</span>
738                                 </td>
739                                 <td>
740                                         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%.
741                                 </td>
742                         </tr>
743                         <tr>
744                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
745                                         <a name="flac_options_apodization" />
746                                         <span class="argument">-A "function"</span>, <span class="argument">--apodization="function"</span>
747                                 </td>
748                                 <td>
749                                         Window audio data with given the apodization function.  The functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), welch.<br />
750                                         For gauss(STDDEV), STDDEV is the standard deviation (0&lt;STDDEV&lt;=0.5).<br />
751                                         For tukey(P), P specifies the fraction of the window that is tapered (0&lt;=P&lt;=1; P=0 corresponds to "rectangle" and P=1 corresponds to "hann").<br />
752                                         More than one -A option (up to 32) may be used.  Any function that is specified erroneously is silently dropped.  The encoder chooses suitable defaults in the absence of any -A options; any -A option specified replaces the default(s).<br />
753                                         When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe.  Multiple functions can greatly increase the encoding time.<br />
754                                 </td>
755                         </tr>
756                         <tr>
757                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
758                                         <a name="flac_options_max_lpc_order" />
759                                         <span class="argument">-l #</span>, <span class="argument">--max-lpc-order=#</span>
760                                 </td>
761                                 <td>
762                                         Specifies the maximum LPC order.  This number must be &lt;= 32.  For Subset streams, it must be &lt;=12 if the sample rate is &lt;=48kHz.  If 0, the encoder will not attempt generic linear prediction, and use only fixed predictors.  Using fixed predictors is faster but usually results in files being 5-10% larger.
763                                 </td>
764                         </tr>
765                         <tr>
766                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
767                                         <a name="flac_options_qlp_coeff_precision" />
768                                         <span class="argument">-q #</span>,<br /><span class="argument">--qlp-coeff-precision=#</span>
769                                 </td>
770                                 <td>
771                                         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.
772                                 </td>
773                         </tr>
774                         <tr>
775                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
776                                         <a name="flac_options_qlp_coeff_precision_search" />
777                                         <span class="argument">-p</span>,<br /><span class="argument">--qlp-coeff-precision-search</span>
778                                 </td>
779                                 <td>
780                                         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.
781                                 </td>
782                         </tr>
783                         <tr>
784                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
785                                         <a name="flac_options_rice_partition_order" />
786                                         <span class="argument">-r [#,]#</span>,<br /><span class="argument">--rice-partition-order=[#,]#</span>
787                                 </td>
788                                 <td>
789                                         Set the [min,]max residual partition order.  The min value defaults to 0 if unspecified.<br />
790                                         <br />
791                                         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.
792                                 </td>
793                         </tr>
794                 </table>
795                 </td></tr></table>
796
797                 <br />
798
799                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
800                 <table width="100%" border="1" bgcolor="#EEEED4">
801                         <tr>
802                                 <td colspan="2" bgcolor="#D3D4C5">
803                                         <a name="format_options"><font size="+1"><b>Format Options</b></font></a>
804                                 </td>
805                         </tr>
806                         <tr>
807                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
808                                         <a name="flac_options_endian" />
809                                         <span class="argument">--endian={big|little}</span>
810                                 </td>
811                                 <td>
812                                         Specify big-endian or little-endian byte order in the raw file.
813                                 </td>
814                         </tr>
815                         <tr>
816                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
817                                         <a name="flac_options_channels" />
818                                         <span class="argument">--channels=#</span>
819                                 </td>
820                                 <td>
821                                         Specify the number of channels in the raw file.
822                                 </td>
823                         </tr>
824                         <tr>
825                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
826                                         <a name="flac_options_bps" />
827                                         <span class="argument">--bps=#</span>
828                                 </td>
829                                 <td>
830                                         Specify the number of bits per sample in the raw file.
831                                 </td>
832                         </tr>
833                         <tr>
834                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
835                                         <a name="flac_options_sample_rate" />
836                                         <span class="argument">--sample-rate=#</span>
837                                 </td>
838                                 <td>
839                                         Specify the sample rate of the raw file.
840                                 </td>
841                         </tr>
842                         <tr>
843                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
844                                         <a name="flac_options_sign" />
845                                         <span class="argument">--sign={signed|unsigned}</span>
846                                 </td>
847                                 <td>
848                                         Specify that the samples in the raw file are signed or unsigned (the default is signed).
849                                 </td>
850                         </tr>
851                         <tr>
852                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
853                                         <a name="flac_options_input_size" />
854                                         <span class="argument">--input-size=#</span>
855                                 </td>
856                                 <td>
857                                         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.
858                                 </td>
859                         </tr>
860                         <tr>
861                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
862                                         <a name="flac_options_force_aiff_format" />
863                                         <span class="argument">--force-aiff-format</span>
864                                 </td>
865                                 <td>
866                                         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.
867                                 </td>
868                         </tr>
869                         <tr>
870                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
871                                         <a name="flac_options_force_raw_format" />
872                                         <span class="argument">--force-raw-format</span>
873                                 </td>
874                                 <td>
875                                         Treat the input file (or output file if decoding) as a raw file, regardless of the extension.
876                                 </td>
877                         </tr>
878                 </table>
879                 </td></tr></table>
880
881                 <br />
882
883                 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEED4"><tr><td>
884                 <table width="100%" border="1" bgcolor="#EEEED4">
885                         <tr>
886                                 <td colspan="2" bgcolor="#D3D4C5">
887                                         <a name="negative_options"><font size="+1"><b>Negative Options</b></font></a>
888                                 </td>
889                         </tr>
890                         <tr>
891                                 <td nowrap="nowrap" align="right" valign="top" bgcolor="#F4F4CC">
892                                         <span class="argument">--no-adaptive-mid-side</span><br />
893                                         <span class="argument">--no-decode-through-errors</span><br />
894                                         <span class="argument">--no-delete-input-file</span><br />
895                                         <span class="argument">--no-escape-coding</span><br />
896                                         <span class="argument">--no-exhaustive-model-search</span><br />
897                                         <span class="argument">--no-lax</span><br />
898                                         <span class="argument">--no-mid-side</span><br />
899                                         <span class="argument">--no-ogg</span><br />
900                                         <span class="argument">--no-padding</span><br />
901                                         <span class="argument">--no-qlp-coeff-precision-search</span><br />
902                                         <span class="argument">--no-residual-gnuplot</span><br />
903                                         <span class="argument">--no-residual-text</span><br />
904                                         <span class="argument">--no-sector-align</span><br />
905                                         <span class="argument">--no-seektable</span><br />
906                                         <span class="argument">--no-silent</span><br />
907                                         <span class="argument">--no-verify</span>
908                                         <span class="argument">--no-warnings-as-errors</span>
909                                 </td>
910                                 <td>
911                                         Can all be used to turn off a particular option.
912                                 </td>
913                         </tr>
914                 </table>
915                 </td></tr></table>
916
917                 <br />
918                 <a name="option_index"><font size="+1"><b><u>Option Index</u></b></font></a><br />
919                 <br />
920                 <a href="#flac_options_level_0" /><span class="argument">-0</span></a><br />
921                 <a href="#flac_options_level_1" /><span class="argument">-1</span></a><br />
922                 <a href="#flac_options_level_2" /><span class="argument">-2</span></a><br />
923                 <a href="#flac_options_level_3" /><span class="argument">-3</span></a><br />
924                 <a href="#flac_options_level_4" /><span class="argument">-4</span></a><br />
925                 <a href="#flac_options_level_5" /><span class="argument">-5</span></a><br />
926                 <a href="#flac_options_level_6" /><span class="argument">-6</span></a><br />
927                 <a href="#flac_options_level_7" /><span class="argument">-7</span></a><br />
928                 <a href="#flac_options_level_8" /><span class="argument">-8</span></a><br />
929                 <a href="#flac_options_apodization" /><span class="argument">-A</span></a><br />
930                 <a href="#flac_options_analyze" /><span class="argument">-a</span></a><br />
931                 <a href="#flac_options_adaptive_mid_side" /><span class="argument">--adaptive-mid-side</span></a><br />
932                 <a href="#flac_options_analyze" /><span class="argument">--analyze</span></a><br />
933                 <a href="#flac_options_apodization" /><span class="argument">--apodization</span></a><br />
934                 <!-- @@@ undocumented, also not in the man page yet
935                 <a href="#flac_options_apply_replaygain_which_is_not_lossless" /><span class="argument">-@@@-apply-replaygain-which-is-not-lossless</span></a><br />
936                 -->
937                 <a href="#flac_options_blocksize" /><span class="argument">-b</span></a><br />
938                 <a href="#flac_options_best" /><span class="argument">--best</span></a><br />
939                 <a href="#flac_options_blocksize" /><span class="argument">--blocksize</span></a><br />
940                 <a href="#flac_options_bps" /><span class="argument">--bps</span></a><br />
941                 <a href="#flac_options_stdout" /><span class="argument">-c</span></a><br />
942                 <a href="#flac_options_channels" /><span class="argument">--channels</span></a><br />
943                 <a href="#flac_options_level_0" /><span class="argument">--compression-level-0</span></a><br />
944                 <a href="#flac_options_level_1" /><span class="argument">--compression-level-1</span></a><br />
945                 <a href="#flac_options_level_2" /><span class="argument">--compression-level-2</span></a><br />
946                 <a href="#flac_options_level_3" /><span class="argument">--compression-level-3</span></a><br />
947                 <a href="#flac_options_level_4" /><span class="argument">--compression-level-4</span></a><br />
948                 <a href="#flac_options_level_5" /><span class="argument">--compression-level-5</span></a><br />
949                 <a href="#flac_options_level_6" /><span class="argument">--compression-level-6</span></a><br />
950                 <a href="#flac_options_level_7" /><span class="argument">--compression-level-7</span></a><br />
951                 <a href="#flac_options_level_8" /><span class="argument">--compression-level-8</span></a><br />
952                 <a href="#flac_options_cue" /><span class="argument">--cue</span></a><br />
953                 <a href="#flac_options_cuesheet" /><span class="argument">--cuesheet</span></a><br />
954                 <a href="#flac_options_decode" /><span class="argument">-d</span></a><br />
955                 <a href="#flac_options_decode" /><span class="argument">--decode</span></a><br />
956                 <a href="#flac_options_decode_through_errors" /><span class="argument">--decode-through-errors</span></a><br />
957                 <a href="#flac_options_delete_input_file" /><span class="argument">--delete-input-file</span></a><br />
958                 <a href="#flac_options_exhaustive_model_search" /><span class="argument">-e</span></a><br />
959                 <a href="#flac_options_endian" /><span class="argument">--endian</span></a><br />
960                 <a href="#flac_options_exhaustive_model_search" /><span class="argument">--exhaustive-model-search</span></a><br />
961                 <a href="#flac_options_explain" /><span class="argument">--explain</span></a><br />
962                 <a href="#flac_options_decode_through_errors" /><span class="argument">-F</span></a><br />
963                 <a href="#flac_options_force" /><span class="argument">-f</span></a><br />
964                 <a href="#flac_options_fast" /><span class="argument">--fast</span></a><br />
965                 <a href="#flac_options_force_aiff_format" /><span class="argument">--force-aiff-format</span></a><br />
966                 <a href="#flac_options_force_raw_format" /><span class="argument">--force-raw-format</span></a><br />
967                 <a href="#flac_options_force" /><span class="argument">--force</span></a><br />
968                 <a href="#flac_options_explain" /><span class="argument">-H</span></a><br />
969                 <a href="#flac_options_help" /><span class="argument">-h</span></a><br />
970                 <a href="#flac_options_help" /><span class="argument">--help</span></a><br />
971                 <a href="#flac_options_input_size" /><span class="argument">--input-size</span></a><br />
972                 <a href="#flac_options_max_lpc_order" /><span class="argument">-l</span></a><br />
973                 <a href="#flac_options_lax" /><span class="argument">--lax</span></a><br />
974                 <a href="#flac_options_adaptive_mid_side" /><span class="argument">-M</span></a><br />
975                 <a href="#flac_options_mid_side" /><span class="argument">-m</span></a><br />
976                 <a href="#flac_options_max_lpc_order" /><span class="argument">--max-lpc-order</span></a><br />
977                 <a href="#flac_options_mid_side" /><span class="argument">--mid-side</span></a><br />
978                 <a href="#negative_options" /><span class="argument">--no-adaptive-mid-side</span></a><br />
979                 <a href="#negative_options" /><span class="argument">--no-decode-through-errors</span></a><br />
980                 <a href="#negative_options" /><span class="argument">--no-delete-input-file</span></a><br />
981                 <a href="#negative_options" /><span class="argument">--no-escape-coding</span></a><br />
982                 <a href="#negative_options" /><span class="argument">--no-exhaustive-model-search</span></a><br />
983                 <a href="#negative_options" /><span class="argument">--no-lax</span></a><br />
984                 <a href="#negative_options" /><span class="argument">--no-mid-side</span></a><br />
985                 <a href="#negative_options" /><span class="argument">--no-ogg</span></a><br />
986                 <a href="#negative_options" /><span class="argument">--no-padding</span></a><br />
987                 <a href="#negative_options" /><span class="argument">--no-qlp-coeff-precision-search</span></a><br />
988                 <a href="#negative_options" /><span class="argument">--no-residual-gnuplot</span></a><br />
989                 <a href="#negative_options" /><span class="argument">--no-residual-text</span></a><br />
990                 <a href="#negative_options" /><span class="argument">--no-sector-align</span></a><br />
991                 <a href="#negative_options" /><span class="argument">--no-seektable</span></a><br />
992                 <a href="#negative_options" /><span class="argument">--no-silent</span></a><br />
993                 <a href="#negative_options" /><span class="argument">--no-verify</span></a><br />
994                 <a href="#negative_options" /><span class="argument">--no-warnings-as-errors</span></a><br />
995                 <a href="#flac_options_no_utf8_convert" /><span class="argument">--no-utf8-convert</span></a><br />
996                 <a href="#flac_options_output_name" /><span class="argument">-o</span></a><br />
997                 <a href="#flac_options_ogg" /><span class="argument">--ogg</span></a><br />
998                 <a href="#flac_options_output_name" /><span class="argument">--output-name</span></a><br />
999                 <a href="#flac_options_output_prefix" /><span class="argument">--output-prefix</span></a><br />
1000                 <a href="#flac_options_padding" /><span class="argument">-P</span></a><br />
1001                 <a href="#flac_options_qlp_coeff_precision_search" /><span class="argument">-p</span></a><br />
1002                 <a href="#flac_options_padding" /><span class="argument">--padding</span></a><br />
1003                 <a href="#flac_options_picture" /><span class="argument">--picture</span></a><br />
1004                 <a href="#flac_options_qlp_coeff_precision" /><span class="argument">-q</span></a><br />
1005                 <a href="#flac_options_qlp_coeff_precision" /><span class="argument">--qlp-coeff-precision</span></a><br />
1006                 <a href="#flac_options_qlp_coeff_precision_search" /><span class="argument">--qlp-coeff-precision-search</span></a><br />
1007                 <a href="#flac_options_rice_partition_order" /><span class="argument">-r</span></a><br />
1008                 <a href="#flac_options_replay_gain" /><span class="argument">--replay-gain</span></a><br />
1009                 <a href="#flac_options_residual_gnuplot" /><span class="argument">--residual-gnuplot</span></a><br />
1010                 <a href="#flac_options_residual_text" /><span class="argument">--residual-text</span></a><br />
1011                 <a href="#flac_options_rice_partition_order" /><span class="argument">--rice-partition-order</span></a><br />
1012                 <a href="#flac_options_seekpoint" /><span class="argument">-S</span></a><br />
1013                 <a href="#flac_options_silent" /><span class="argument">-s</span></a><br />
1014                 <a href="#flac_options_sample_rate" /><span class="argument">--sample-rate</span></a><br />
1015                 <a href="#flac_options_sector_align" /><span class="argument">--sector-align</span></a><br />
1016                 <a href="#flac_options_seekpoint" /><span class="argument">--seekpoint</span></a><br />
1017                 <a href="#flac_options_serial_number" /><span class="argument">--serial-number</span></a><br />
1018                 <a href="#flac_options_sign" /><span class="argument">--sign</span></a><br />
1019                 <a href="#flac_options_silent" /><span class="argument">--silent</span></a><br />
1020                 <a href="#flac_options_skip" /><span class="argument">--skip</span></a><br />
1021                 <a href="#flac_options_stdout" /><span class="argument">--stdout</span></a><br />
1022                 <a href="#flac_options_tag" /><span class="argument">-T</span></a><br />
1023                 <a href="#flac_options_test" /><span class="argument">-t</span></a><br />
1024                 <a href="#flac_options_tag" /><span class="argument">--tag</span></a><br />
1025                 <a href="#flac_options_tag_from_file" /><span class="argument">--tag-from-file</span></a><br />
1026                 <a href="#flac_options_test" /><span class="argument">--test</span></a><br />
1027                 <a href="#flac_options_totally_silent" /><span class="argument">--totally-silent</span></a><br />
1028                 <a href="#flac_options_until" /><span class="argument">--until</span></a><br />
1029                 <a href="#flac_options_verify" /><span class="argument">-V</span></a><br />
1030                 <a href="#flac_options_version" /><span class="argument">-v</span></a><br />
1031                 <a href="#flac_options_verify" /><span class="argument">--verify</span></a><br />
1032                 <a href="#flac_options_warnings_as_errors" /><span class="argument">-w</span></a><br />
1033                 <a href="#flac_options_warnings_as_errors" /><span class="argument">--warnings-as-errors</span></a><br />
1034                 <a href="#flac_options_version" /><span class="argument">--version</span></a><br />
1035
1036         </div>
1037         <div class="box_footer"></div>
1038 </div>
1039
1040
1041 <div class="copyright">
1042         <!-- @@@ oh so hacky -->
1043         <table>
1044                 <tr>
1045                         <td align="left">
1046                                 Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
1047                         </td>
1048                         <td width="1%" align="right">
1049                                 <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
1050                         </td>
1051                         <td width="1%" align="right">
1052                                 <a href="http://www.eff.org/cafe/"><img src="images/cafebug.gif" alt="CAFE Logo" border="0" /></a><br />
1053                         </td>
1054                         <td width="1%" align="right">
1055                                 <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" hspace="0" /></a>
1056                         </td>
1057                 </tr>
1058         </table>
1059 </div>
1060
1061 </body>
1062 </html>