Frequently Asked Questions


Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange for better compression rates.

FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player (or your car or home stereo, see supported devices) just like you would an MP3 file.

FLAC stands out as the fastest and most widely supported lossless audio codec, and the only one that at once is non-proprietary, is unencumbered by patents, has an open-source reference implementation, has a well documented format and API, and has several other independent implementations.

FLAC supports tagging, cover art, and fast seeking. FLAC is freely available and supported on most operating systems, including Windows, "unix" (Linux, *BSD, Solaris, OS X, IRIX), BeOS, OS/2, and Amiga.

There are many programs and devices that support FLAC, but the core FLAC project here maintains the format and provides programs and libraries for working with FLAC files. See Getting FLAC for instructions on downloading and installing the official FLAC tools, or Using FLAC for instructions and guides on playing FLAC files, ripping CDs to FLAC, etc.

When we say that FLAC is "Free" it means more than just that it is available at no cost. It means that the specification of the format is fully open to the public to be used for any purpose (the FLAC project reserves the right to set the FLAC specification and certify compliance), and that neither the FLAC format nor any of the implemented encoding/decoding methods are covered by any known patent. It also means that all the source code is available under open-source licenses. It is the first truly open and free lossless audio format.

Notable features of FLAC:

  • Lossless: The encoding of audio (PCM) data incurs no loss of information, and the decoded audio is bit-for-bit identical to what went into the encoder. Each frame contains a 16-bit CRC of the frame data for detecting transmission errors. The integrity of the audio data is further insured by storing an MD5 signature of the original unencoded audio data in the file header, which can be compared against later during decoding or testing.
  • Fast: FLAC is asymmetric in favor of decode speed. Decoding requires only integer arithmetic, and is much less compute-intensive than for most perceptual codecs. Real-time decode performance is easily achievable on even modest hardware.
  • Hardware support: FLAC is supported by dozens of consumer electronic devices, from portable players, to home stereo equipment, to car stereo.
  • Flexible metadata: FLAC's metadata system supports tags, cover art, seek tables, and cue sheets. Applications can write their own APPLICATION metadata once they register an ID. New metadata blocks can be defined and implemented in future versions of FLAC without breaking older streams or decoders.
  • Seekable: FLAC supports fast sample-accurate seeking. Not only is this useful for playback, it makes FLAC files suitable for use in editing applications.
  • Streamable: Each FLAC frame contains enough data to decode that frame. FLAC does not even rely on previous or following frames. FLAC uses sync codes and CRCs (similar to MPEG and other formats), which, along with framing, allow decoders to pick up in the middle of a stream with a minimum of delay.
  • Suitable for archiving: FLAC is an open format, and there is no generation loss if you need to convert your data to another format in the future. In addition to the frame CRCs and MD5 signature, flac has a verify option that decodes the encoded stream in parallel with the encoding process and compares the result to the original, aborting with an error if there is a mismatch.
  • Convenient CD archiving: FLAC has a "cue sheet" metadata block for storing a CD table of contents and all track and index points. For instance, you can rip a CD to a single file, then import the CD's extracted cue sheet while encoding to yield a single file representation of the entire CD. If your original CD is damaged, the cue sheet can be exported later in order to burn an exact copy.
  • Error resistant: Because of FLAC's framing, stream errors limit the damage to the frame in which the error occurred, typically a small fraction of a second worth of data. Contrast this with some other lossless codecs, in which a single error destroys the remainder of the stream.

What FLAC is not:

  • Lossy. FLAC is intended for lossless compression only, as there are many good lossy formats already, such as Vorbis, MPC, and MP3 (see LAME for an excellent open-source implementation).
  • DRM. 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.

Lossless compression means that the compressed, smaller file can be expanded back into the original file without losing any information whatever.

That is: take a file; compress it, and uncompress it again. If the original file is bit-for-bit identical, 100% of the time, for any given input file, then the compression scheme is lossless. No information is lost.

Unfortunately, compressing audio losslessly is hard. General-purpose compression programs like WinRar, WinZip only manage about 5% on average.

There are special-purpose compressors (like ape, flac, wavpack etc.) which were designed solely for losslessly compressing audio, but even they only manage about a 50% reduction in filesize on average. While this is enough for some, for music files to be truly portable they must be even smaller.

FLAC is a general purpose audio format supported by many programs.

Most of the documentation here is about the FLAC format itself and the tools we provide, but there is also information on using other programs that support FLAC.

To download official FLAC tools go here.

And to see the extras section for other third-party tools go here.

I recommend to Windows users, use free player foobar2000 which supports MP3, MP4, AAC, CD Audio, WMA, Vorbis, FLAC, WavPack, WAV, AIFF, Musepack...

Also in foobar2000 you can convert from/to lossless/lossy formats, join and split files using cue-sheets and even rip Audio CDs.

If you want to create a high fidelity digital archive, a better solution is to use a lossless compression format.

These formats work more or less like ZIP compression; redundant bits are taken out to create the compressed file, which is then uncompressed for playback.

So what you hear has exact fidelity to the original, while still being stored in a smaller-sized file.

Of course, a lossless compressed file isn't as near small as a file with lossy compression. While an MP3 file might be 10% the size of the original, uncompressed file, a file with lossless compression is typically about 50% the original's size.

This is why lossless compression isn't recommended for portable music players, where storage space is limited.

If you're storing your CD collection on hard disk, however, it works just fine—especially with today's cheap hard disk prices. You can easily store 1,000 CDs on a 300GB hard disk, using any lossless compression format.

First, it's a good idea to understand the difference between lossy and lossless audio.

Look at the root of the noun: lossy means that some material is lost and lossless means that no data has been lost from the original source material.

You can visibly see the difference in the image below.
Advantages of lossless audio compression

Many lossless comparisons look at only compression ratio and speed.

FLAC decoding is the fastest among lossless codecs and it has the fastest encoding mode. FLAC's compression is within 3% of even the most complex codecs. Note that the compression ratios of all lossless codecs fall in a quite narrow range; the difference between the very best and very worst is only around 7%, and only 4% for the practical codecs.

So the evaluation of lossless codecs typically depends mainly on other features, which is what our first table shows; features like how well it is supported in devices and software, licensing, etc.

Additionally, as archiving is one of the main applications for a lossless codec, of chief importance is the ability to use and recover data in the future.

FLAC stands out as the most widely supported codec, and the only codec that at once is non-proprietary, is unencumbered by patents, has an open-source reference implementation, has a well documented format and API, and has several other independent implementations.

The rest of the tables show in detail the compression ratios and speed of the codecs in different modes. FLAC's high decoding speed is due to very low complexity and is instrumental to its support by dozens of consumer electronic devices.

Reviewed encoders (besides FLAC):

Apple Lossless - A proprietary codec by Apple.
Bonk - An open-source source codec. No player or library support yet.
La - A closed source symmetric adaptive codec. Highest compression ratio but extremely slow.
Monkey's Audio - A symmetric adaptive codec with good compression. Source is available under a non-OSI license.
Ogg Squish - An open source source codec that is no longer maintained.
optimFROG - A closed source, Windows/Linux codec, with Winamp and XMMS plugins. Slow but high compression ratios.
Shorten - A.J. Robinson's well-known codec; source is available here.
Tak - A new and efficient codec, but closed-source and Windows only.
WavPack - A fine open-source codec, released under the BSD license.

The results of comparison, technical details and conclusions you can read here.

Below is brief overview of lossless audio compression formats.

WAV - Wave files
Uncompressed audio format developed by IBM and Microsoft. Became standard audio file used on PCs. WAV don't contain compressed data, so the files have same size as original source.

FLAC - FLAC files
FLAC stands for Free Lossless Audio Codec.
Grossly oversimplified, FLAC is similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality.
This is similar to how Zip/Rar works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player just like you would an MP3 file.

It's advantages are: open source, very fast encoding/decoding, very good software/hardware support, error robustness, streaming, multichannel audio, high resolutions, pipe, RIFF chunks support, and it has only one little disadvange - no hybrid/lossy mode.

APE - Monkey's Audio files
Monkey's Audio is a fast and easy way to compress digital music.
Unlike traditional methods such as mp3, ogg, or wma that permanently discard quality to save space, Monkey's Audio only makes perfect, bit-for-bit copies of your music.
That means it always sounds perfect - exactly the same as the original. Even though the sound is perfect, it still saves a lot of space. (think of it as a beefed-up Winzip for your music)
The other great thing is that you can always decompress your Monkey's Audio files back to the exact, original files.
That way, you'll never have to recopy your CD collection to switch formats, and you'll always be able to recreate the original music CD if something ever happens to yours.
It's advantages are: open source, high efficiency, good software support, simple and user friendly, has multiplatform Java version, RIFF chunks, pipe, high resolution audio support, and it has some disadvanges - no hybrid/lossy mode, no multichannel support, no error robustness and it has limited hardware support.

WV - WavPack files
WavPack is a completely open audio compression format providing lossless,high quality lossy, and an unique hybrid compression mode.
In the default lossless mode WavPack acts just like a WinZip compressor for audio files.
However, unlike MP3 or WMA encoding which can affect the sound quality, not a single bit of the original information is lost and so there's no chance of degradation. This makes lossless mode ideal for archiving audio material or any other situation where quality is paramount.
The compression ratio depends on the source material, but generally is between 30% and 70%.
It's advantages are: open source, very fast encoding/decoding, good efficiency, error robustness, good hardware/software suppor, streaming, multichannel audio and high resolutions support, supports hybrid/lossy mode, pipe, RIFF chunks, ability to create self extracting files and has only one disadvantage: limited hardware player support.

ALAC - Apple Lossless files
ALAC is a proprietary lossless audio compression scheme. Apple never released any documents on the format.
Apple claims that audio files compressed with its lossless codec will use up "about half the storage space" that the uncompressed data would require.
It's good for very fast decoding, Apple hardware support (iPod, AirPort Express), integration with iTunes/iPod and streaming support.
But it has limited software support because of it's proprietary original.

WMAL - Windows Media Audio Lossless files
WMA Lossless is the lossless codec developed by Microsoft to be featured in their Windows Media codec portfolio.
This lossless format has closed source, limited hardware support, doesn't support RIFF chunks, replay gain, has no hybrid/lossy mode, but has streaming, pipe, multichannel audio and high resolutions support and very good Microsoft software support

Which lossless format use to store audio ? This question is quite hard, because the enormous amount of lossless audio compressor choices available, and it is a very difficult task to choose the one most suited for each person's needs.

Several people only take into consideration compression performance when choosing a codec. But as the following table and article shows, there are several other features worth taking into consideration when making that choice.

For example, users wanting good multiplatform compatibility and robustness (E.G, people sharing live recordings) would favour WavPack or FLAC. Another user, looking for the very highest compression available, would go with OptimFROG. Someone wanting portable support would use FLAC or ALAC, and so on.

En fin, this is not a matter worth getting too worked up about. If you later find out the codec you chose isn't the best for your needs, you can just transcompress to another format, without risk of losing quality.

Features FLAC WavPack TAK Monkey's OptimFROG ALAC WMA
Encoding speed fast very fast very fast fast slow average average
Decoding speed very fast very fast very fast average average fast average
Compression* 58.70% 58.0% 57.0% 55.50% 54.70% 58.50% 56.30%
Flexibility** very good very good very good very good very good bad bad
 
Error handling yes yes yes no yes   yes
Seeking yes yes yes yes yes yes yes
Tagging Vorbis tags ID3/APE APEv2 (exp.) ID3/APE ID3/APE iTunes ASF
Hardware support very good limited no limited no good limited
Software support very good good average good average average good
Hybrid/lossy no yes no no yes no no
Replay Gain yes yes yes no yes sort of no
RIFF chunks yes yes   yes yes   no
Streaming yes yes yes no yes yes yes
Pipe support yes yes yes yes yes yes yes
Open source yes yes no yes no yes (third-party) no
Multichannel yes yes no no no yes yes
High resolution yes yes yes yes yes yes yes
OS support All All Win/Linux Wine All Win/Mac/Linux All Win/Mac

(table continued below)

Features Shorten LA TTA LPAC MPEG-4 ALS MPEG-4 SLS Real Lossless
Encoding speed very fast slow very fast average average slow slow
Decoding speed very fast slow fast fast fast slow fast
Compression* 63.50% 53.50% 57.10% 57.20% 57.10%  ? 57.0%
Flexibility** bad average bad bad very good bad bad
 
Error handling no no yes no yes yes  
Seeking yes yes yes slow yes yes yes
Tagging no ID3v1 ID3 no yes yes proprietary
Hardware support limited no limited no no no no
Software support very good bad average average bad bad bad
Hybrid/lossy no no no no no yes no
Replay Gain no no yes no yes yes no
RIFF chunks yes yes no yes      
Streaming no   no no yes yes yes
Pipe support yes yes no       no
Open source yes no yes no yes yes no
Multichannel no no yes no yes yes no
High resolution no no yes yes yes yes no
OS support All Win/Linux All Win/Linux/Sol All All Win/Mac/Linux

* The Compression ratio is calculated with the division of compressed size by uncompressed size * 100. So, lower is better.

Encoding speed, Decoding speed and Compression ratio are based on each encoder's default settings.

** Flexibility refers to the amount of encoding choices offered to the users (Fast/low compression, Slow/high compression and everything inbetween)

MPEG-1 Audio Layer 3, which is more commonly known as MP3, is definitely the most popular lossy audio format out there.
Development started in 1987, led by members of Fraunhofer IIS in Germany. It quickly became the unacknowledged standard for lossy audio encoding as it provides high compression rates while still retaining relatively respectable quality.

The MP3 format applies a series of filters that remove some upper frequency content. This is often acceptable to the human ear as the upper limits of a human's hearing is considered 20 kHz, with a much lower cutoff frequency being fairly standard particularly as we age.

The MP3's biggest advantage is the acceptance it has already achieved.
While other formats are trying to gain ground, more audio is being encoded in MP3 format every day.

It is widely supported in almost all relevant software and hardware. It also provides fast decoding which is key for efficient playback.
Still, it’s performance is a little sub-standard when compared to other more modern formats.

It does have a maximum bit rate at which it can rip which may fall below your desire (320 kbit/s) and it’s sampling rate does not lend well to high definition audio (doesn’t support sampling at a rate higher than 48 kHz).

Below are alternatives to the MP3:

1. AAC – Advanced Audio Coding. This is the default format for anything and everything Apple, including the iPhone, iPod, and iTunes, but it's supported on pretty much every portable player out there. This format was developed in part by Fraunhoffer IIS, who were the original developers of the MP3 algorithm, and has been touted as the successor to the MP3. It's deviation from MP3 includes:

- Supports 48 channels of audio, whereas MP3 supports 2 channels in MPEG-1 mode and 5.1 channels in MPEG-2 mode.
- Has a wider bandwidth of sample frequencies. Where MP3 can range from 16 kHz to 48 kHz, AAC can range from 8 kHz to 96 kHz. This is very good for getting an accurate digital representation of the original source.
- Higher coding efficiency for both stationary signals and transient signals.
- Handles audio frequencies above 16 kHz significantly better than MP3. - Supports a bit rate between 8 and 529 kbit/s.
- Supports Digital Rights Management.

2. RA – Real Audio. This format was developed by RealNetworks, the makers of Real Media Player, amongst other things. It's most commonly used in streaming media from the internet. Real Audio supports several different codecs of varying sample and bit rates. It hasn't been widely adopted as a method of transferring digital audio outside of the occasional streaming audio website. The likely cause for this is that there aren't many media players that support the format outside of RealNetworks' own player.

3. Ogg – Ogg Vorbis was initially developed as a response to the MP3 when it was announced that there were plans to charge licensing fees for the MP3 audio format. It is an open-source approach, meaning it is completely free and unrestricted by patents.

- Ogg is extremely flexible in the sampling rates it supports, ranging from 1 Hz to 200 kHz.
- Ogg also supports a wide variety of bit rates. If you assume a sampling rate of 44.1 kHz (the standard CD sampling frequency), an Ogg encoder will output a variable bit rate between 45 and 500 kbit/s, depending on the quality setting that is specified.
- Independent listening tests have suggested that at mid to high bitrates Ogg has better quality than MP3 encoded audio.
- Ogg is largely DRM free.

4. WMA – Windows Media Audio is a proprietary format developed by, surprise, Microsoft. There have actually been a few revisions of the original format to create WMA Pro, WMA Lossless, and WMA Voice. This is considered one of the most supported formats, in direct competition with MP3 and AAC.

- WMA Standard supports stereo output (ie. two discrete channels).
- Offers a sample rate of up to 48 kHz.
- At lower bit rates, WMA has been interpreted as better than MP3, although not quite as good as AAC in terms of quality.
- At higher bit rates, the differences become less distinguishable.
- Supports Digital Rights Management.

So you can see the alternatives to the MP3 format are out there. They were all developed as an alternative to MP3 due to perceived disadvantages of the format.

Lossy audio is pretty much standard across the internet. As of late, it has seen some considerable popularity as the bandwidth each user has access to increases, as does the storage space available in both computers and portable devices.

Converting from lossy formats