Over the years FLAC (Free Lossless Audio Codec) has become one of the most popular open source audio codecs.
It works like Zip; you can compress and decompress the audio without loss.
As FLAC is optimized for audio the compression is much better than with Zip.
Depending on the music the compression rate will be 30%-50%.
FLAC supports linear PCM audio:
It runs on Windows, OSX and Linux.
The integrity of the audio data is 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.
FLAC is very well supported.
There are two exceptions to this rule: iTunes and Windows Media Player.
Both Apple and Microsoft have a strong dislike for open source.
They want you to use their own proprietary formats.
Best solution is not to use their players.
Second best: there are workarounds to enable these players to play FLAC.
Compression
You can choose 0 – 8 where 0 is no and 8 the highest compression.
The compression ratio is a source of misunderstanding.
A lot of people thing that it works like the bitrates in MP3 so more or less loss.
The compression ratio simply tells how many CPU FLAC is allowed to use to find the best possible compression (linear prediction). The more time is allowed the higher the compression.
In practice 5 is often recommended as a nice compromise between coding time and file size.
Going from 5 to 8 in general results in a marginal smaller file.
Regardless of the compression ratio chosen, the result is always lossless
Bit rate
If you play a 16/44.1 track ( CD audio) ripped to WAV you see a bit rate of 1411 Kbit/s.
Play the same track in FLAC format and you will see a lower value , often around 700.
This confuses a lot of people.
If you play MP3 you see a lower bit rate too so they start wondering if FLAC is lossy too.
As FLAC is compressed, the same information is stored using less bits ( otherwise you can't get a smaller file….). The bit rate as displayed by your media player is the amount of bits per second read, not the bit rate after expansion to linear PCM.
From the FLAC website:
With FLAC you do not specify a bitrate like with some lossy codecs. It's more like specifying a quality with Vorbis or MPC, except with FLAC the quality is always "lossless" and the resulting bitrate is roughly proportional to the amount of information in the original signal. You cannot control the bitrate much and the result can be from around 100% of the input rate (if you are encoding noise), down to almost 0 (encoding silence).
Obvious the compression and therefore the bit rate you see varies with the complexity of the signal.
You will see differences between tracks but also within.
In essence it is VBR (Variable Bit Rate) but lossless all of the time.
It works like Zip; you can compress and decompress the audio without loss.
As FLAC is optimized for audio the compression is much better than with Zip.
Depending on the music the compression rate will be 30%-50%.
FLAC supports linear PCM audio:
- 4 – 32 bits fixed point word
- 1 Hz to 655,350 Hz sample rate in 1 Hz increments
- 1 – 8 channels
It runs on Windows, OSX and Linux.
The integrity of the audio data is 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.
FLAC is very well supported.
There are two exceptions to this rule: iTunes and Windows Media Player.
Both Apple and Microsoft have a strong dislike for open source.
They want you to use their own proprietary formats.
Best solution is not to use their players.
Second best: there are workarounds to enable these players to play FLAC.
Compression
You can choose 0 – 8 where 0 is no and 8 the highest compression.
The compression ratio is a source of misunderstanding.
A lot of people thing that it works like the bitrates in MP3 so more or less loss.
The compression ratio simply tells how many CPU FLAC is allowed to use to find the best possible compression (linear prediction). The more time is allowed the higher the compression.
In practice 5 is often recommended as a nice compromise between coding time and file size.
Going from 5 to 8 in general results in a marginal smaller file.
Regardless of the compression ratio chosen, the result is always lossless
Bit rate
If you play a 16/44.1 track ( CD audio) ripped to WAV you see a bit rate of 1411 Kbit/s.
Play the same track in FLAC format and you will see a lower value , often around 700.
This confuses a lot of people.
If you play MP3 you see a lower bit rate too so they start wondering if FLAC is lossy too.
As FLAC is compressed, the same information is stored using less bits ( otherwise you can't get a smaller file….). The bit rate as displayed by your media player is the amount of bits per second read, not the bit rate after expansion to linear PCM.
From the FLAC website:
With FLAC you do not specify a bitrate like with some lossy codecs. It's more like specifying a quality with Vorbis or MPC, except with FLAC the quality is always "lossless" and the resulting bitrate is roughly proportional to the amount of information in the original signal. You cannot control the bitrate much and the result can be from around 100% of the input rate (if you are encoding noise), down to almost 0 (encoding silence).
Obvious the compression and therefore the bit rate you see varies with the complexity of the signal.
You will see differences between tracks but also within.
In essence it is VBR (Variable Bit Rate) but lossless all of the time.