From Audacity Wiki
Revision as of 13:28, 30 January 2018 by PeterSampson (talk | contribs) (removed stale P2 ednote)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
FLAC (Free Lossless Audio Codec) is a size-compressed but lossless digital audio format with smaller file size than uncompressed lossless formats like WAV. FLAC is currently well-supported by many software applications and hardware support is growing. Josh Coalson is the primary author of FLAC.

How it works

FLAC uses a combination of linear prediction, Golomb-Rice coding, and lastly, run-length encoding for blocks of identical samples, such as silent passages. You can read more about technical aspects of FLAC in the FLAC documentation.

Comparisons to other formats

While several other compressed formats like MP3 and OGG are "lossy" (meaning they discard audio information to achieve compression), FLAC is lossless. It has the same quality as the lossless uncompressed WAV and AIFF formats, but with smaller file size. Audio encoded to FLAC is typically reduced to a little less than half of the original file size. An MP3, by comparison, is typically one tenth or so of the original file size, but with lost audio information and lower quality.

Other similar lossless compressed formats include OptimFROG (.ofr), Wavpack (.wv), Shorten (.shn) and Monkeys Audio (.ape). There are also lossless compressed versions of the proprietary Apple, Windows Media and Real Audio lossy compressed codecs. Current Audacity as shipped cannot import any of these alternative formats, with the exception of Apple Lossless which can be imported into current Audacity on Mac using QuickTime. Many of these alternative formats can be imported and exported using current Audacity on all operating systems if you add the optional FFmpeg library to your computer.


The are no quality settings in the encoder as the format is lossless, but there are levels settings for the amount of file size compression used to losslessly pack the audio data, similar to compression levels in ZIP files. The level settings range from 0 to 8. Level 0 is optimized to encode as fast as possible. Level 8 is optimized to pack as efficiently as possible, so produces slightly smaller files than level 0 at the expense of taking longer to encode. Files encoded at level 8 are rarely more than a few percent smaller than those encoded at level 0, but can take three or four times longer to encode.

FLAC supports metadata tags containing information such as title and artist (similar to the ID3 tags in MP3 files) and supports cover art (though Audacity does not yet support cover art). Unlike MP3, FLAC is a free, open source codec.

Import and Export of FLAC

The current version of Audacity has full support for import and export of 16-bit and 24-bit FLAC.

On Windows and Mac libflac is used to import and export FLAC but on Linux libsndfile is used by default to import FLAC. Importing using libsndfile allows FLAC files to be imported and operated on more quickly using On-Demand Loading. To import using libflac, choose the "FLAC files" filter when using Open or Import, or set a rule in Extended Import Preferences to always use libflac whatever the import method.