Commit 34cc68f2 authored by Josh Coalson's avatar Josh Coalson
Browse files

reorganize to be more novice-friendly, add more docs

parent 83b37dbf
......@@ -26,15 +26,22 @@ doc_DATA = \
comparison.html \
developers.html \
documentation.html \
documentation_bugs.html \
documentation_format_overview.html \
documentation_tasks.html \
documentation_tools.html \
documentation_tools_flac.html \
documentation_tools_metaflac.html \
documentation_tools_plugins.html \
download.html \
faq.html \
favicon.ico \
features.html \
flac.css \
format.html \
goals.html \
id.html \
index.html \
itunes.html \
license.html \
links.html \
news.html \
......
......@@ -29,12 +29,8 @@
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="features.html">features</a>&nbsp;&nbsp;|
&nbsp;<a href="goals.html">goals</a>&nbsp;&nbsp;|
&nbsp;<a href="format.html">format</a>&nbsp;&nbsp;|
&nbsp;<a href="id.html">id</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;changelog&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;<a href="developers.html">developers</a>&nbsp;
......@@ -53,7 +49,7 @@
</div>
<div class="box_header"></div>
<div class="box_body">
This is an informal changelog, a summary of changes in each release. (See also <a href="documentation.html#bugs">known bugs</a>.) Particulary important for developers is the precise description of changes to the library interfaces. See also the <a href="api/group__porting.html">porting guide</a> for specific instructions on porting to newer versions of FLAC.<br />
This is an informal changelog, a summary of changes in each release. (See also <a href="documentation_bugs.html">known bugs</a>.) Particulary important for developers is the precise description of changes to the library interfaces. See also the <a href="api/group__porting.html">porting guide</a> for specific instructions on porting to newer versions of FLAC.<br />
<br />
......@@ -86,7 +82,7 @@
<ul>
<li>Fixed a bug that caused suboptimal default compression settings in some locales (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1608883&amp;group_id=13478&amp;atid=113478">SF #1608883</a>).</li>
<li>Fixed a bug where FLAC-to-FLAC transcoding of a corrupted FLAC file would truncate the transcoded file at the first error (<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1615019&amp;group_id=13478&amp;atid=113478">SF #1615019</a>).</li>
<li>Fixed a bug where using <span class="argument"><a href="documentation.html#flac_options_decode_through_errors">-F</a></span> with FLAC-to-FLAC transcoding of a corrupted FLAC would have no effect (<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1615391&amp;group_id=13478&amp;atid=113478">SF #1615391</a>).</li>
<li>Fixed a bug where using <span class="argument"><a href="documentation_tools_flac.html#flac_options_decode_through_errors">-F</a></span> with FLAC-to-FLAC transcoding of a corrupted FLAC would have no effect (<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1615391&amp;group_id=13478&amp;atid=113478">SF #1615391</a>).</li>
</ul>
</li>
<li>
......@@ -154,7 +150,7 @@
<li>Better multichannel support</li>
<li>Large file (&gt;2GB) support everywhere</li>
<li><span class="commandname">flac</span> now supports FLAC and Ogg FLAC as input to the encoder (e.g. can re-encode FLAC to FLAC) and preserve all the metadata like tags, etc.</li>
<li>New <span class="code"><a href="format.html#def_PICTURE">PICTURE</a></span> metadata block for storing things like cover art, new <span class="argument"><a href="documentation.html#flac_options_picture">--picture</a></span> option to <span class="commandname">flac</span> and <span class="argument"><a href="documentation.html#metaflac_shorthand_import_picture_from">--import-picture-from</a></span> option to <span class="commandname">metaflac</span> for importing pictures, new <span class="argument"><a href="documentation.html#metaflac_shorthand_export_picture_to">--export-picture-to</a></span> option to <span class="commandname">metaflac</span> for exporting pictures, and metadata API <a href="api/group__flac__metadata__level0.html#ga3">additions</a> for searching for suitable pictures based on type, size and color constraints.</li>
<li>New <span class="code"><a href="format.html#def_PICTURE">PICTURE</a></span> metadata block for storing things like cover art, new <span class="argument"><a href="documentation_tools_flac.html#flac_options_picture">--picture</a></span> option to <span class="commandname">flac</span> and <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_import_picture_from">--import-picture-from</a></span> option to <span class="commandname">metaflac</span> for importing pictures, new <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_export_picture_to">--export-picture-to</a></span> option to <span class="commandname">metaflac</span> for exporting pictures, and metadata API <a href="api/group__flac__metadata__level0.html#ga3">additions</a> for searching for suitable pictures based on type, size and color constraints.</li>
<li>Support for new <tt>REPLAYGAIN_REFERENCE_LOUDNESS</tt> tag.</li>
<li>Fixed a bug in Ogg FLAC encoding where metadata was not being updated properly. Existing Ogg FLAC files should be recoded to fix up the metadata, e.g. <span class="command">flac -Vf -S 10s --ogg file.ogg</span></li>
<li>In the developer libraries, the interface has been simplfied by merging the three decoding layers into a single class; ditto for the encoders. Also, libOggFLAC has been merged into libFLAC and libOggFLAC++ has been merged into libFLAC++ so there is a single API supporting both native FLAC and Ogg FLAC.</li>
......@@ -177,14 +173,14 @@
<li>
flac:
<ul>
<li>Improved the <span class="argument"><a href="documentation.html#flac_options_decode_through_errors">-F</a></span> option to allow decoding of FLAC files whose metadata is corrupted, and other kinds of severe corruption.</li>
<li>Improved the <span class="argument"><a href="documentation_tools_flac.html#flac_options_decode_through_errors">-F</a></span> option to allow decoding of FLAC files whose metadata is corrupted, and other kinds of severe corruption.</li>
<li>Encoder can now take FLAC and Ogg FLAC as input. The output FLAC file will have all the same metadata as the original unless overridden with options on the command line.</li>
<li>Encoder can now take WAVEFORMATEXTENSIBLE WAVE files as input; decoder will output WAVEFORMATEXTENSIBLE WAVE files when necessary to conform to the latest Microsoft specifications.</li>
<li>Now properly supports AIFF and WAVEFORMATEXTENSIBLE multichannel input, performing necessary channel reordering both for encoding and decoding. WAVEFORMATEXTENSIBLE channel mask is also saved to a tag on encoding and restored on decoding for situations when there is no natural mapping to FLAC channel assignments.</li>
<li>Expanded support for "odd" sample resolutions to WAVE and AIFF input; all resolutions from 4 to 24 bits-per-sample now supported for all input types.</li>
<li>Added a new option <span class="argument"><a href="documentation.html#flac_options_tag_from_file">--tag-from-file</a></span> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
<li>Added a new option <span class="argument"><a href="documentation.html#flac_options_picture">--picture</a></span> for adding pictures.</li>
<li>Added a new option <span class="argument"><a href="documentation.html#flac_options_apodization">--apodization</a></span> for specifying the window function(s) to be used in LPC analysis.</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_flac.html#flac_options_tag_from_file">--tag-from-file</a></span> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_flac.html#flac_options_picture">--picture</a></span> for adding pictures.</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_flac.html#flac_options_apodization">--apodization</a></span> for specifying the window function(s) to be used in LPC analysis.</li>
<li>Added support for encoding from non-compressed AIFF-C (<a href="https://sourceforge.net/tracker/?func=detail&amp;atid=113478&amp;aid=1090933&amp;group_id=13478">SF #1090933</a>).</li>
<li>Importing of non-CDDA-compliant cuesheets now only issues a warning, not an error (see <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=31282">here</a>).</li>
<li>MD5 comparison failures on decoding are now an error instead of a warning and will also return a non-zero exit code (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1493725&amp;group_id=13478&amp;atid=113478">SF #1493725</a>).</li>
......@@ -205,11 +201,11 @@
metaflac:
<ul>
<li>Added support for read-only operations on Ogg FLAC files.</li>
<li>Added a new option <span class="argument"><a href="documentation.html#metaflac_shorthand_set_tag_from_file">--set-tag-from-file</a></span> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
<li>Added a new option <span class="argument"><a href="documentation.html#metaflac_shorthand_import_picture_from">--import-picture-from</a></span> for importing pictures.</li>
<li>Added a new option <span class="argument"><a href="documentation.html#metaflac_shorthand_export_picture_to">--export-picture-to</a></span> for exporting pictures.</li>
<li>Added shorthand operation <span class="argument"><a href="documentation.html#metaflac_shorthand_remove_replay_gain">--remove-replay-gain</a></span> for removing ReplayGain tags.</li>
<li><span class="argument"><a href="documentation.html#metaflac_shorthand_export_cuesheet_to">--export-cuesheet-to</a></span> now properly specifies the FLAC file name (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1272825&amp;group_id=13478&amp;atid=363478">SF #1272825</a>).</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_set_tag_from_file">--set-tag-from-file</a></span> for setting a tag from file (e.g. for importing a cuesheet as a tag).</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_import_picture_from">--import-picture-from</a></span> for importing pictures.</li>
<li>Added a new option <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_export_picture_to">--export-picture-to</a></span> for exporting pictures.</li>
<li>Added shorthand operation <span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_remove_replay_gain">--remove-replay-gain</a></span> for removing ReplayGain tags.</li>
<li><span class="argument"><a href="documentation_tools_metaflac.html#metaflac_shorthand_export_cuesheet_to">--export-cuesheet-to</a></span> now properly specifies the FLAC file name (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1272825&amp;group_id=13478&amp;atid=363478">SF #1272825</a>).</li>
<li>Importing of non-CDDA-compliant cuesheets now issues a warning.</li>
<li>Removed the following deprecated tag editing options; you should use the new option names shown instead:
<ul>
......@@ -329,7 +325,7 @@
<li>Sped up decoding by a few percent overall.</li>
<li>Sped up encoding when not using LPC (i.e. when using <span class="commandname">flac</span> options <span class="argument">-0</span>, <span class="argument">-1</span>, <span class="argument">-2</span>, or <span class="argument">-l 0</span>).</li>
<li>Fixed a decoding bug that could cause sync errors with some ID3v1-tagged FLAC files.</li>
<li>Added <a href="documentation.html#metaflac">HTML documentation for metaflac</a>.</li>
<li>Added <a href="documentation_tools_metaflac.html#metaflac">HTML documentation for metaflac</a>.</li>
</ul>
</li>
<li>
......@@ -347,7 +343,7 @@
<li>
flac:
<ul>
<li>New option <span class="argument"><a href="documentation.html#flac_options_input_size">--input-size</a></span> to manually specify the input size when encoding raw samples from stdin.</li>
<li>New option <span class="argument"><a href="documentation_tools_flac.html#flac_options_input_size">--input-size</a></span> to manually specify the input size when encoding raw samples from stdin.</li>
</ul>
</li>
<li>
......@@ -454,16 +450,16 @@
<li>
Ogg FLAC format:
<ul>
<li>First official FLAC-&gt;Ogg bitstream mapping standardized (see new <a href="ogg_mapping.html">FLAC-to-Ogg mapping specification</a>). See the documentation for the <span class="argument"><a href="documentation.html#flac_options_ogg">--ogg</a></span> switch about having to re-encode older Ogg FLAC files.</li>
<li>First official FLAC-&gt;Ogg bitstream mapping standardized (see new <a href="ogg_mapping.html">FLAC-to-Ogg mapping specification</a>). See the documentation for the <span class="argument"><a href="documentation_tools_flac.html#flac_options_ogg">--ogg</a></span> switch about having to re-encode older Ogg FLAC files.</li>
</ul>
</li>
<li>
flac:
<ul>
<li>Print an error when output file already exists instead of automatically overwriting.</li>
<li>New option <span class="argument"><a href="documentation.html#flac_options_force">-f</a></span> (<span class="argument"><a href="documentation.html#flac_options_force">--force</a></span>) to force overwriting if the output file already exists.</li>
<li>New option <span class="argument"><a href="documentation.html#flac_options_cue">--cue</a></span> to select a specific section to decode using cuesheet track/index points.</li>
<li>New option <span class="argument"><a href="documentation.html#flac_options_totally_silent">--totally-silent</a></span> to suppress all output.</li>
<li>New option <span class="argument"><a href="documentation_tools_flac.html#flac_options_force">-f</a></span> (<span class="argument"><a href="documentation_tools_flac.html#flac_options_force">--force</a></span>) to force overwriting if the output file already exists.</li>
<li>New option <span class="argument"><a href="documentation_tools_flac.html#flac_options_cue">--cue</a></span> to select a specific section to decode using cuesheet track/index points.</li>
<li>New option <span class="argument"><a href="documentation_tools_flac.html#flac_options_totally_silent">--totally-silent</a></span> to suppress all output.</li>
<li>New (but undocumented) option <span class="argument">--apply-replaygain-which-is-not-lossless</span> which applies ReplayGain to the decoded output. See <a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=17293&amp;st=11">this thread</a> for usage and caveats.</li>
<li>When encoding to Ogg FLAC, use a random serial number (instead of 0 as was done before) when a serial number is not specified.</li>
<li>When encoding multiple Ogg FLAC streams, <span class="argument">--serial-number</span> or random serial number sets the first number, which is then incremented for subsequent streams (before, the same serial number was used for all streams).</li>
......@@ -628,6 +624,7 @@
<div class="box_footer"></div>
</div>
<div class="copyright">
<!-- @@@ oh so hacky -->
<table>
......
......@@ -29,12 +29,8 @@
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="features.html">features</a>&nbsp;&nbsp;|
&nbsp;<a href="goals.html">goals</a>&nbsp;&nbsp;|
&nbsp;<a href="format.html">format</a>&nbsp;&nbsp;|
&nbsp;<a href="id.html">id</a>&nbsp;&nbsp;|
&nbsp;comparison&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;comparison&nbsp;&nbsp;|
&nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;<a href="developers.html">developers</a>&nbsp;
......@@ -67,6 +63,7 @@
Note: the comparison tables are getting a little stale for some of the other encoders; for some alternate comparisons and other lossless information see these links:
<ul>
<li><a href="http://web.inter.nl.net/users/hvdh/lossless/lossless.htm">Hans Heijden's</a> lossless comparison</li>
<li><a href="http://www.synthetic-soul.co.uk/comparison/lossless/">Synthetic Soul</a> lossless comparison</li>
<li><a href="http://wiki.hydrogenaudio.org/index.php?title=Lossless_comparison">Roberto Amorim's</a> lossless comparison on Hydrogenaudio</li>
<li><a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=33226">"Which is the best lossless codec?"</a> thread on Hydrogenaudio</li>
<li><a href="http://www.losslessaudioblog.com/">Lossless Audio Blog</a></li>
......
......@@ -29,12 +29,8 @@
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="features.html">features</a>&nbsp;&nbsp;|
&nbsp;<a href="goals.html">goals</a>&nbsp;&nbsp;|
&nbsp;<a href="format.html">format</a>&nbsp;&nbsp;|
&nbsp;<a href="id.html">id</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;developers&nbsp;
......@@ -49,31 +45,27 @@
<div class="box">
<div class="box_title">
FLAC developers
developers
</div>
<div class="box_header"></div>
<div class="box_body">
FLAC is an open source project and we are happy to enlist the help of anyone who wants to contribute. The preferred method for transmitting improvements is patch files (in "diff -c" format) sent to the <a href="http://lists.xiph.org/mailman/listinfo/flac-dev">developer mailing list</a>, but zipped up sources are OK. Make sure to read the <a href="goals.html">FLAC goals</a> first; there are some thing the we <b>don't</b> want added to FLAC, like copy protection and lossy compression.<br />
FLAC is an open source project and we are happy to enlist the help of anyone who wants to contribute, or to help with FLAC support in other programs and devices. The preferred method of communication is the <a href="http://lists.xiph.org/mailman/listinfo/flac-dev">developer mailing list</a>.<br />
<br />
High priority items are:
<ul>
<li>
Support in the plugins for using the CUESHEET metadata block. The plugin should be able to see a CUESHEET in a FLAC file and present the individual tracks in the player, and fetch metadata from CDDB or CDindex by computing the hash from the CUESHEET and looking up either in a local database or over the net.
</li>
</ul>
Some other "nice-to-haves":
FLAC is open to third-party developers who want to add support for FLAC into their programs. All the necessary functionality is contained the libFLAC libraries which are licensed under <a href="license.html">Xiph.org's BSD license</a>.<br />
<br />
Some pointers to developer documentation and code:<br />
<ul>
<li>
FLAC module for <a href="http://www.68k.org/~michael/audiofile/">Audiofile</a>.
</li>
<li>
<a href="http://java.sun.com/products/java-media/jmf/">JMF</a> plugin.
</li>
<li>
Streaming support in the Winamp plugin.
</li>
<li><a href="license.html">License</a> - The license under which the official tools are distributed.</li>
<li><a href="api/index.html">libFLAC and libFLAC++ APIs</a> - Complete library documentation.</li>
<li><a href="format.html">FLAC Format Specification</a> - The formal specification.</li>
<li><a href="ogg_mapping.html">Ogg FLAC Mapping</a> - How FLAC should be embedded in an Ogg container.</li>
<li><a href="id.html">ID Registration</a> - Register an ID if you need to write custom metadata.</li>
<li><a href="http://sourceforge.net/cvs/?group_id=13478">CVS Access</a> - instructions for checking out the source code.</li>
<li><a href="http://flac.cvs.sourceforge.net/flac">Browse the CVS repository</a> from your web browser.</li>
</ul>
See also the <a href="http://sourceforge.net/projects/flac">FLAC project page</a> on Sourceforge.net.
There also are several examples in the FLAC code base of API usage that may also be helpful. Visit the <a href="download.html">download page</a> for instructions on how to get the source code.
<br />
Finally, more resources are available on the <a href="http://sourceforge.net/projects/flac">FLAC project page</a> on Sourceforge.net.
</div>
<div class="box_footer"></div>
</div>
......@@ -82,19 +74,45 @@
<div class="box">
<div class="box_title">
third-party developers
goals
</div>
<div class="box_header"></div>
<div class="box_body">
FLAC is open to third-party developers who want to add support for FLAC into their programs. All the necessary functionality is contained the lib*FLAC libraries which are licensed under Xiph.org's BSD license. The relevant documentation here is:
Since FLAC is an open-source project, it's important to have a set of goals that everyone works to. They may change slightly from time to time but they're a good guideline. Changes should be in line with the goals and should not attempt to embrace any of the anti-goals.<br />
<br />
<b>Goals</b>
<ul>
<li>The <a href="license.html">license page</a>.</li>
<li>The <a href="api/index.html">API documentation</a>.</li>
<li>The <a href="format.html">formal description</a> of the FLAC format.</li>
<li>The <a href="ogg_mapping.html">Ogg FLAC mapping</a> document.</li>
<li>The <a href="id.html">ID registration page</a> for registering an ID if you need to write custom metadata.</li>
<li>
FLAC should be and stay an open format with an open-source reference implementation.
</li>
<li>
FLAC should be lossless. This seems obvious but lossy compression seems to creep into every audio codec. This goal also means that <span class="commandname">flac</span> should stay archival quality and be truly lossless for all input. Testing of releases should be thorough.
</li>
<li>
FLAC should yield respectable compression, on par or better than other lossless codecs.
</li>
<li>
FLAC should allow at least realtime decoding on even modest hardware.
</li>
<li>
FLAC should support fast sample-accurate seeking.
</li>
<li>
FLAC should allow gapless playback of consecutive streams. This follows from the lossless goal.
</li>
<li>
The FLAC project owes a lot to the many people who have advanced the audio compression field so freely, and aims also to contribute through the open-source development of new ideas.
</li>
</ul>
<b>Anti-goals</b><br />
<ul>
<li>
Lossy compression. There are already many suitable lossy formats (<a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a>, <a href="http://www.mp3-tech.org/">MP3</a>, etc.).
</li>
<li>
Copy prevention, DRM, etc. There is no intention to add any copy prevention methods. Of course, we can't stop someone from encrypting a FLAC stream in another container (e.g. the way Apple encrypts AAC in MP4 with FairPlay), that is the choice of the user.
</li>
</ul>
There also are several examples in the FLAC code base of API usage that may also be helpful. Visit the <a href="download.html">download page</a> for instructions on how to get the source.
</div>
<div class="box_footer"></div>
</div>
......
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="author" content="Josh Coalson" />
<meta name="description" content="A free, open source codec for lossless audio compression and decompression" />
<meta name="keywords" content="free,lossless,audio,codec,encoder,decoder,compression,compressor,archival,archive,archiving,backup,music" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="flac.css" />
<title>FLAC - documentation</title>
</head>
<body>
<div class="logo">
<a href="http://flac.sourceforge.net/"><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
</div>
<div class="above_nav"></div>
<div class="navbar">
&nbsp;<a href="index.html">home</a>&nbsp;&nbsp;|
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;<a href="developers.html">developers</a>&nbsp;
</div>
<div class="langbar">
&nbsp;english&nbsp;&nbsp;|
&nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
</div>
<div class="below_nav"></div>
<div class="box">
<div class="box_title">
<a name="bugs">known bugs</a>
</div>
<div class="box_header"></div>
<div class="box_body">
The following are major known bugs in the current (1.1.3) release:
<ul>
<li>
If your locale does not use "." for the decimal point, there is a bug that causes the default compression settings to be sub-optimal. You should add <span class="argument">-A "tukey(0,5)"</span> to your <span class="command">flac</span> command string (or however "0.5" should be formatted for your locale).
</li>
<li>
If a corrupted FLAC file is used as input in FLAC-to-FLAC encoding, the transcoded FLAC file will have the audio data truncated after the first error.
</li>
<li>
When encoding to Ogg FLAC, if there are too many seek points (&gt;240), the seek table will not have the offsets written back properly after encoding.
</li>
</ul>
</div>
<div class="box_footer"></div>
</div>
<br />
<div class="box">
<div class="box_title">
<a name="bug_reporting">reporting bugs</a>
</div>
<div class="box_header"></div>
<div class="box_body">
To report a bug, please go to the <a href="http://sourceforge.net/tracker/?group_id=13478&amp;atid=113478">FLAC bug tracker</a> (or appropriately the <a href="http://sourceforge.net/tracker/?group_id=13478&amp;atid=363478">feature request tracker</a>, <a href="http://sourceforge.net/tracker/?group_id=13478&amp;atid=313478">patch page</a>, or <a href="http://sourceforge.net/tracker/?group_id=13478&amp;atid=213478">support page</a>).<br />
<br />
First check that there is not already an existing request. If you do submit a new request, make sure and provide an email contact <b>and</b> use the Monitor feature.<br />
<br />
Note that we get many false bug reports from people with faulty hardware or who overclock their machines that FLAC is not working. Please do due diligence if you are getting FLAC encoding or decoding errors that it is not the fault of the hardware. FLAC encoding tends to highlight problems with bad RAM, corrupted files, and excessive overclocking.
</div>
<div class="box_footer"></div>
</div>
<div class="copyright">
<!-- @@@ oh so hacky -->
<table>
<tr>
<td align="left">
Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson
</td>
<td width="1%" align="right">
<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>
</td>
<td width="1%" align="right">
<a href="http://www.eff.org/cafe/"><img src="images/cafebug.gif" alt="CAFE Logo" border="0" /></a><br />
</td>
<td width="1%" align="right">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="author" content="Josh Coalson" />
<meta name="description" content="A free, open source codec for lossless audio compression and decompression" />
<meta name="keywords" content="free,lossless,audio,codec,encoder,decoder,compression,compressor,archival,archive,archiving,backup,music" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="flac.css" />
<title>FLAC - documentation</title>
</head>
<body>
<div class="logo">
<a href="http://flac.sourceforge.net/"><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
</div>
<div class="above_nav"></div>
<div class="navbar">
&nbsp;<a href="index.html">home</a>&nbsp;&nbsp;|
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;<a href="developers.html">developers</a>&nbsp;
</div>
<div class="langbar">
&nbsp;english&nbsp;&nbsp;|
&nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
</div>
<div class="below_nav"></div>
<div class="box">
<div class="box_title">
<a name="format">format</a>
</div>
<div class="box_header"></div>
<div class="box_body">
The basic structure of a FLAC stream is:
<ul>
<li>The four byte string "<span class="code">fLaC</span>"</li>
<li>The <a href="format.html#def_STREAMINFO"><span class="code">STREAMINFO</span></a> metadata block</li>
<li>Zero or more other metadata blocks</li>
<li>One or more audio frames</li>
</ul>
The first four bytes are to identify the FLAC stream. The metadata that follows contains all the information about the stream except for the audio data itself. After the metadata comes the encoded audio data.<br />
<br />
<b>METADATA</b><br />
<br />
FLAC defines several types of metadata blocks (see the <a href="format.html">format</a> page for the complete list). Metadata blocks can be any length and new ones can be defined. A decoder is allowed to skip any metadata types it does not understand. Only one is mandatory: the <span class="code">STREAMINFO</span> block. This block has information like the sample rate, number of channels, etc., and data that can help the decoder manage its buffers, like the minimum and maximum data rate and minimum and maximum block size. Also included in the <span class="code">STREAMINFO</span> block is the MD5 signature of the <i>unencoded</i> audio data. This is useful for checking an entire stream for transmission errors.<br />
<br />
Other blocks allow for padding, seek tables, tags, cuesheets, and application-specific data. There are <a href="documentation_tools_flac.html"><span class="commandname">flac</span> options</a> for adding <span class="code">PADDING</span> blocks or specifying seek points. FLAC does not require seek points for seeking but they can speed up seeks, or be used for cueing in editing applications.<br />
<br />
Also, if you have a need of a custom metadata block, you can define your own and request an ID <a href="id.html">here</a>. Then you can reserve a <span class="code">PADDING</span> block of the correct size when encoding, and overwrite the padding block with your <span class="code">APPLICATION</span> block after encoding. The resulting stream will be FLAC compatible; decoders that are aware of your metadata can use it and the rest will safely ignore it.<br />
<br />
<b>AUDIO DATA</b><br />
<br />
After the metadata comes the encoded audio data. Audio data and metadata are not interleaved. Like most audio codecs, FLAC splits the unencoded audio data into blocks, and encodes each block separately. The encoded block is packed into a frame and appended to the stream. The reference encoder uses a single block size for the whole stream but the FLAC format does not require it.<br />
<br />
<b>BLOCKING</b><br />
<br />
The block size is an important parameter to encoding. If it is too small, the frame overhead will lower the compression. If it is too large, the modeling stage of the compressor will not be able to generate an efficient model. Understanding FLAC's modeling will help you to improve compression for some kinds of input by varying the block size. In the most general case, using linear prediction on 44.1kHz audio, the optimal block size will be between 2-6 ksamples. <span class="commandname">flac</span> defaults to a block size of 4608 in this case. Using the fast fixed predictors, a smaller block size is usually preferable because of the smaller frame header.<br />
<br />
<b>INTER-CHANNEL DECORRELATION</b><br />
<br />
In the case of stereo input, once the data is blocked it is optionally passed through an inter-channel decorrelation stage. The left and right channels are converted to center and side channels through the following transformation: mid = (left + right) / 2, side = left - right. This is a lossless process, unlike joint stereo. For normal CD audio this can result in significant extra compression. <span class="commandname">flac</span> has two options for this: <span class="argument">-m</span> always compresses both the left-right and mid-side versions of the block and takes the smallest frame, and <span class="argument">-M</span>, which adaptively switches between left-right and mid-side.<br />
<br />
<b>MODELING</b><br />
<br />
In the next stage, the encoder tries to approximate the signal with a function in such a way that when the approximation is subracted, the result (called the <i>residual</i>, <i>residue</i>, or <i>error</i>) requires fewer bits-per-sample to encode. The function's parameters also have to be transmitted so they should not be so complex as to eat up the savings. FLAC has two methods of forming approximations: 1) fitting a simple polynomial to the signal; and 2) general linear predictive coding (LPC). I will not go into the details here, only some generalities that involve the encoding options.<br />
<br />
First, fixed polynomial prediction (specified with <span class="argument">-l 0</span>) is much faster, but less accurate than LPC. The higher the maximum LPC order, the slower, but more accurate, the model will be. However, there are diminishing returns with increasing orders. Also, at some point (usually around order 9) the part of the encoder that guesses what is the best order to use will start to get it wrong and the compression will actually decrease slightly; at that point you will have to you will have to use the exhaustive search option <span class="argument">-e</span> to overcome this, which is significantly slower.<br />
<br />
Second, the parameters for the fixed predictors can be transmitted in 3 bits whereas the parameters for the LPC model depend on the bits-per-sample and LPC order. This means the frame header length varies depending on the method and order you choose and can affect the optimal block size.<br />
<br />
<b>RESIDUAL CODING</b><br />
<br />
Once the model is generated, the encoder subracts the approximation from the original signal to get the residual (error) signal. The error signal is then losslessly coded. To do this, FLAC takes advantage of the fact that the error signal generally has a Laplacian (two-sided geometric) distribution, and that there are a set of special Huffman codes called Rice codes that can be used to efficiently encode these kind of signals quickly and without needing a dictionary.<br />
<br />
Rice coding involves finding a single parameter that matches a signal's distribution, then using that parameter to generate the codes. As the distribution changes, the optimal parameter changes, so FLAC supports a method that allows the parameter to change as needed. The residual can be broken into several <i>contexts</i> or <i>partitions</i>, each with it's own Rice parameter. <span class="commandname">flac</span> allows you to specify how the partitioning is done with the <span class="argument">-r</span> option. The residual can be broken into 2^<i>n</i> partitions, by using the option <span class="argument">-r n,n</span>. The parameter <i>n</i> is called the <i>partition order</i>. Furthermore, the encoder can be made to search through <i>m</i> to <i>n</i> partition orders, taking the best one, by specifying <span class="argument">-r m,n</span>. Generally, the choice of n does not affect encoding speed but m,n does. The larger the difference between m and n, the more time it will take the encoder to search for the best order. The block size will also affect the optimal order.<br />
<br />
<b>FRAMING</b><br />
<br />
An audio frame is preceded by a frame header and trailed by a frame footer. The header starts with a sync code, and contains the minimum information necessary for a decoder to play the stream, like sample rate, bits per sample, etc. It also contains the block or sample number and an 8-bit CRC of the frame header. The sync code, frame header CRC, and block/sample number allow resynchronization and seeking even in the absence of seek points. The frame footer contains a 16-bit CRC of the entire encoded frame for error detection. If the reference decoder detects a CRC error it will generate a silent block.<br />
<br />
<b>MISCELLANEOUS</b><br />
<br />
As a convenience, the reference decoder knows how to skip <a href="http://www.id3.org/">ID3v1 and ID3v2 tags</a>. Note however that the FLAC specification does not require compliant implementations to support ID3 in any form and their use is strongly discouraged.<br />
<br />
<span class="commandname">flac</span> has a verify option <span class="argument">-V</span> that verifies the output while encoding. With this option, a decoder is run in parallel to the encoder and its output is compared against the original input. If a difference is found <span class="commandname">flac</span> will stop with an error.
</div>
<div class="box_footer"></div>
</div>
<div class="copyright">
<!-- @@@ oh so hacky -->
<table>
<tr>
<td align="left">
Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson
</td>
<td width="1%" align="right">
<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>
</td>
<td width="1%" align="right">
<a href="http://www.eff.org/cafe/"><img src="images/cafebug.gif" alt="CAFE Logo" border="0" /></a><br />
</td>
<td width="1%" align="right">
<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>
</td>
</tr>
</table>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright (c) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="author" content="Josh Coalson" />
<meta name="description" content="A free, open source codec for lossless audio compression and decompression" />
<meta name="keywords" content="free,lossless,audio,codec,encoder,decoder,compression,compressor,archival,archive,archiving,backup,music" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="flac.css" />
<title>FLAC - documentation</title>
</head>
<body>
<div class="logo">
<a href="http://flac.sourceforge.net/"><img src="images/logo130.gif" alt="FLAC Logo" align="middle" border="0" hspace="0" /></a>
</div>
<div class="above_nav"></div>
<div class="navbar">
&nbsp;<a href="index.html">home</a>&nbsp;&nbsp;|
&nbsp;<a href="faq.html">faq</a>&nbsp;&nbsp;|
&nbsp;<a href="news.html">news</a>&nbsp;&nbsp;|
&nbsp;<a href="download.html">download</a>&nbsp;&nbsp;|
&nbsp;<a href="documentation.html">documentation</a>&nbsp;&nbsp;|
&nbsp;<a href="comparison.html">comparison</a>&nbsp;&nbsp;|
&nbsp;<a href="changelog.html">changelog</a>&nbsp;&nbsp;|
&nbsp;<a href="links.html">links</a>&nbsp;&nbsp;|
&nbsp;<a href="developers.html">developers</a>&nbsp;
</div>
<div class="langbar">
&nbsp;english&nbsp;&nbsp;|
&nbsp;<a href="ru/documentation.html">russian</a>&nbsp;
</div>
<div class="below_nav"></div>
<div class="box">
<div class="box_title">
using flac
</div>
<div class="box_header"></div>
<div class="box_body">
Since FLAC is supported by so many different programs, it can be a daunting task for the new user to choose a suitable program. This page will walk you through the steps. First, choose your operating system:
<ul>
<li><a href="#windows">Windows</a></li>
<li><a href="#osx">Mac OS X</a></li>
<li><a href="#unix">Linux, *BSD, and other Unixes</a></li>
</ul>
</div>
<div class="box_footer"></div>
</div>
<br />
<div class="box">
<div class="box_title">
<a name="windows">windows</a>
</div>