Dr. AIX's POSTS

What’s All The FLAC About?

I learned something interesting the other day thanks to a reader email. While it’s seems counter intuitive, there is such a thing as an “uncompressed” FLAC sound file. I say counter intuitive because FLAC is one of the many codecs for audio that is used to shrink the size of the source file without losing any of the data in the reconstruction or decoding of the compressed file. So if the whole point of using FLAC is to make sound files smaller, then why would you have an option in the compression tool set to output a FLAC file that is exactly the same size as the source. It’s because of the metadata capabilities of FLAC files that are lacking in standard uncompressed .WAV files.

Here’s some background. There are two fundamental types of sound files: uncompressed and compressed. We’re all pretty familiar with the uncompressed varieties. These include raw data files, wave files and audio interchange file format (AIFF) files. A .raw sound file lacks a header, which is a chunk of data that is usually appended to the front of the sound data that provides important information about the data words that follow. WAV and AIFF files both include headers that indicate the sample rate, the word length, the duration of the file and other particulars about the rest of the sound file. Wave files were originally associated with PCs and AIFF (sometimes abbreviated to AIF) files were for MACs.

Within the compressed group, there are also two fundamental types of files: lossy and lossless. The less desirable of the pair is the lossy type. When something is encoded and then decoded using a lossy process, it means that some of the informational from the source file doesn’t survive. Examples of lossy codecs (encode and decode) are the ubiquitous MP3, Dolby Digital and DTS (both found on DVD-Video discs) and AAC (Apples’ iTunes flavor). Lossy codecs have dominated the world of digital music since its inception because of bandwidth and storage restrictions. These days, hard drives are inexpensive and bandwidth is much faster than previously. It’s time for lossless codecs.

There are number of lossless audio codecs. When I ask for examples in my audio recording class, invariably a few students will list PCM, AIF and/or WAV. I mark these wrong because they are not codecs at all. PCM (Pulse Code Modulation) is a method of representing digital audio and the other two are file formats WITHOUT any compression.

The first important lossless codec that I remember learning about was MLP (Meridian Lossless Packing). Back in about 2000, the DVD Forum asked a number of consumer electronics companies to submit technologies that could shrink the bandwidth needed for 5.1 surround sound at 96 kHz/24-bits using PCM to less than about 10 Mbps (the bandwidth of a single speed DVD optical drive) from 13 Mbps (the number of 96/24 5.1 uncompressed PCM)…and they had to be able to do it without losing any information from the source file. In fact, for any technology to be adopted it had to confirm that none of the source data had been lost. This validation step makes the ultimate winner MLP more robust than a standard WAV or AIF file. This was the encoding scheme that was used in the DVD-Audio format. A small audiophile company in the UK called Meridian developed it. They are well known for making very high quality hardware…that is also very expensive. (NOTE: It is interesting that they are the company the Neil Young is working with to bring PONO to market in 2014). MLP was licensed to Dolby Laboratories and is one of the standard codecs in the Blu-ray format.

And there’s FLAC, the FREE LOSSLESS AUDIO CODEC. FLAC is a very widely used open source audio encoding scheme that reduces file sizes and maintains 100% of the original source file. As far as I know however, there is no post decode confirmation of the restoration of the source file like MLP. As a result of this and some other factors, there is some debate whether there is an audible difference between a FLAC file and an uncompressed WAV of the same source file.

I’ll talk more about that tomorrow.

Dr. AIX

Mark Waldrep, aka Dr. AIX, has been producing and engineering music for over 40 years. He learned electronics as a teenager from his HAM radio father while learning to play the guitar. Mark received the first doctorate in music composition from UCLA in 1986 for a "binaural" electronic music composition. Other advanced degrees include an MS in computer science, an MFA/MA in music, BM in music and a BA in art. As an engineer and producer, Mark has worked on projects for the Rolling Stones, 311, Tool, KISS, Blink 182, Blues Traveler, Britney Spears, the San Francisco Symphony, The Dover Quartet, Willie Nelson, Paul Williams, The Allman Brothers, Bad Company and many more. Dr. Waldrep has been an innovator when it comes to multimedia and music. He created the first enhanced CDs in the 90s, the first DVD-Videos released in the U.S., the first web-connected DVD, the first DVD-Audio title, the first music Blu-ray disc and the first 3D Music Album. Additionally, he launched the first High Definition Music Download site in 2007 called iTrax.com. A frequency speaker at audio events, author of numerous articles, Dr. Waldrep is currently writing a book on the production and reproduction of high-end music called, "High-End Audio: A Practical Guide to Production and Playback". The book should be completed in the fall of 2013.

Leave a Reply

Your email address will not be published. Required fields are marked *