An introduction to computer audio
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:
FLAC's metadata system supports tags, cover art, seek tables, and cue sheets.
It runs on Windows, OSX and Linux.
The integrity of the audio data is insured by storing an MD5 signature of the original uuencoded 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 and their proprietary audio formats.
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
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 people 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.
From 14.1 on, dBpoweramp supports uncompressed FLAC
This sounds like we finally have WAV with excellent tagging options.
The integrity of a file can be easily tested by running
FLAC –t FileToTest.FLAC
Flac will exit with an exit code of 1 (and print a message, even in silent mode) if there were any errors during decoding, including when the MD5 checksum does not match the decoded output. Otherwise the exit code will be 0.
You don't like typing command lines?
Try this one: FLAC frontend