Before going into the full command-line description, a few other things help to sort it out: 1) <spanclass="commandname">flac</span> encodes by default, so you must use <b>-d</b> to decode; 2) the options <spanclass="argument">-0</span> .. <spanclass="argument">-8</span> (or <spanclass="argument">--fast</span> and <spanclass="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) <spanclass="commandname">flac</span> behaves similarly to gzip in the way it handles input and output files.<br/>
<br/>
Skip to the <ahref="#tutorial">tutorial</a> below for examples of some common tasks.<br/>
<br/>
<spanclass="commandname">flac</span> will be invoked one of four ways, depending on whether you are encoding, decoding, testing, or analyzing:
<ul>
<li>
...
...
@@ -122,6 +125,56 @@
<spanclass="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 <ahref="documentation_format_overview.html">About the FLAC Format</a>.<br/>
This one's a little tricky: notice that <spanclass="commandname">flac</span> is in encode mode by default (you have to specify <spanclass="argument">-d</span> to decode) so this command actually recompresses <tt>abc.flac</tt> back to <tt>abc.flac</tt>. <spanclass="argument"><ahref="#flac_options_force">--force</a></span> is needed to make sure you really want to overwrite <tt>abc.flac</tt> with a new version. Why would you want to do this? It allows you to recompress an existing FLAC file with (usually) higher compression options or a newer version of FLAC and preserve all the metadata like tags too.<br/>
<br/>
Some common <b>decoding</b> tasks using <spanclass="commandname">flac</span>:<br/>
Decode <tt>abc.flac</tt> to <tt>abc.wav</tt>. <tt>abc.flac</tt> is not deleted. NOTE: Without <spanclass="argument"><ahref="#flac_options_decode">-d</a></span> it means re-encode <tt>abc.flac</tt> to <tt>abc.flac</tt> (see above).<br/>
Decode <tt>abc.flac</tt> to <tt>abc.wav</tt> and don't abort if errors are found (useful for recovering as much as possible from corrupted files).<br/>
<br/>
<spanclass="commandname">flac</span> has many other useful options, described below.<br/>