Area: Computing
Audio Library for Audiophiles HowTo

MP3, WAV, FLAC?This article is meant for the ones who decided to “experience the digital world” and want to store all their CD library into the Hard Disk. Of course there’s not a single way to do it, so the hope of this article is giving you an help doing the right thing in the right way, avoiding to waste a lot of time.

Choosing the right compression format

Choosing the right compression format is actually a lifestyle philosophy more than just a choice. There are tons of so called audio compressor that allows to store the data in several ways… so just let me employ my little knowledge to shade a bit of light on this argument.

WAV (uncompressed audio) format is definitely the rawest and quality-proof way to store music tracks. It does not imply any form of compression, it just stores ordered sequence of bits as they arrive from the source. Choosing WAV as a storage for your album, as far as this introduction could ever suggest, is, in my opinion, the worst way to build up  your album collection. WAV format requires a large amount of space (about 500-600 MBytes for a single album), it’s heavy to transport and stream and, at last, does not support tagging (so generally you can’t organize/explore your wav files collection by Artist name, Album name, Year, etc…).

A good idea is to compress somehow audio tracks and… here we go!

Absolutely the first big risk in this cases is to get lost in the chaos of audio codecs. Actually various codecs are available... so what's the right one for you? Well the answer is not simple... it really depends on your expectations and your audiophile skills.

Actually audio codecs may be mainly divided in to two groups:

Lossy vs. Lossless compressors.

Lossy compressors
A nice variety of lossy compressor is nowadays available (let’s cite OGG Vorbis, Microsoft WMA,MP3…). As, indeed, there are several differences across them, lossy compressors are generally based on psychoacoustic models that try to degrade in an “inaudible” manner the original signal in order to reduce the space required to store the file. The most common one is absolutely MPEG Layer 3 compressor, widely known as MP3.

MP3, used with a decent bit rate (192 kbps or more) is a very popular choice. The high compression ratio (it can store an entire album in about 100 MBytes) as well as the good space/quality tradeoff made this codec the standard de facto for handheld music. Nowadays it’s absolutely the most supported audio format (nearly every software and hardware music player has a support for MP3 files). Of course MP3 is a lossy format. It’s algorithm is mainly based on psychoacoustic models that discard certain frequencies, apparently less audible by human ears. So, aside from the bit rate used (of course an higher bit rate can improve the overall quality), compressing an audio signal using MP3 (or any other lossy compressor) implies a certain loss of information and an overall degrading of the original waveform.

Lossless compressors
Apart from the lossy encoders there is another way to compress audio tracks: Lossless compressors.
Differently from the previous ones a lossless compressor (as per definition) does NOT alter, filter or change in ANY WAY the acoustic data.
What I mean is that compressing an original WAV soundtrack with a lossless compressor and decoding it back into another wav file (Original WAV
-> Compressed file -> Decompressed WAV) will give back an exact bitwise copy of the original source file.
On the other side lossless compressor does not generally offer an high compression ratio compares to lossy ones (it's really variable but is really hard to go under 50%)

Now, let me guess what would be the obvious question: “How can lossless compressors achieve space saving without degrading in any way the original waveform?". The answer is somehow simpler than the lossy case.

Lossless compressor generally does not use any form of audio processing, psychoacoustic models or other. They just act on the raw byte data of the files. The main idea is to compress data in a completely reversible manner.

To convince yourself just think on zip-software… they compress and decompress data without loosing any kind of information achieving sometimes very high compression ratios.
Now, lossless audio compressors works in a very similar way. The trick is to optimize the compression algorithm in order to give better performances when used with audio files.

The choice of lossless codecs is a bit restricted. At the time of the writing these are the mainly available lossless compressors: Microsoft WMA Lossless codec, Apple Lossless Encoder, Monkey’s Audio and FLAC (Free Lossless Audio Codec).

The first three are proprietary formats. FLAC is on the other side an Open Source compressor. I’ll not spend many words on comparison of these compressor and how they work. I’ll just say that in my opinion FLAC it’s probably the best choice: it’s has a large software support (supported by Winamp, Windows Media player and many other software players as it is an open patent…) and is experiencing a growing acceptance on hardware devices (actually several high end hardware players support FLAC, such as Squeezebox, etc)

As told before, the kind of compressor is really a lifestyle choice. Most of the people can’t take the difference between an original soundtrack and a low quality 128kbps MP3. Some others can’t stand the “wavy water sound” coming even from 320 kbps MP3s.

So if you’re a wary audiophile and want to rip and store your beloved CD collection on your hard disk, FLAC should be definitively  the best approach to do this.

At this point we have two choices:

  1. You’re still won over by the idea that lossless compressors will compromise somehow  dynamic response or sound emphasis or responsiveness of middle-high ranges or whateveryoucaneverthink. So all I can do at this time is thanking you for the time spent reading this article and, at most, suggest you a good brand of high capacity hard disks to store your wav file album collection (Please, please, please avoid Maxtor ones… they extremely suffer heat like penguins at the Equator).
  2. I’ve persuaded you to rip all your CD collection using FLAC compressor… so… let me ask you another bit of patience and I’ll explain the quickest and simplest way to do it.

 

How to RIP (and play of course) your CD collection using FLAC compressor.

  • Download and install FLAC (http://flac.sourceforge.net/). This will install various tools. The one we need is the flac.exe command line compressor. You should find it into C:\program files\flac\flac.exe (keep in mind its path as you’ll need it later).
  • Now you need a rip software that extracts audio tracks from CD. The choice is quite limited. The best-known (and free of course) software that will help us to do so is Exact Audio Copy (also known as EAC). You can freely download a copy on its homepage http://www.exactaudiocopy.de/ (download the windows installer version)
  • Setup EAC in order to use FLAC compressor:
    • Launch EAC. When the guided configuration wizard appears, select the right CD-Drive and when it asks to “Install and configure the external LAME.EXE compressor” UNCHECK the checkbox and press next.
    • The next page should ask you for an e-mail address to use with freedb. Fill this field as it is very important in order to automatically get CD Data (Artist, titles, year) from the internet without manually insert them. Once the guided configuration process is completed Click on the menu EAC -> Compressor options.
    • Click on the second pane “External compression” and check the “Use external program for compression” checkbox.
    • Under the “parameter passing scheme” select  “User defined encoder”.
    • Type “.flac” (without quotes) in “Use file extension” textbox.
    • Set the full path to the flac.exe into the “Program, including path, used for compression” box. It should be something like “C:\program files\flac\flac.exe” (without quotes).
    • Now type the below exact text into the “Additional command line options”:
      -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" -5 %s
    • Don’t mind about the bit rate combo box as it makes nonsense when using FLAC compressor
    • Uncheck all the checkboxes except the “Delete WAV after compression”.

    After these steps your compression dialog box should look very close to this:
    EAC configuration


    Press OK to confirm the configuration
    Now click on the menu EAC -> EAC options and another configuration dialog will appear.
    • Click on the Filename tab and fill the Naming scheme with this
      %D\%C\%N - %T
    • Click on the “Directories” tab, check the “Use this directory” checkbox and browse to the folder where your music will be stored.
    • Click OK and confirm the dialog.
  • Now you’re ready to directly rip CD into FLAC format
    • In order to rip an audio CD insert an audio CD into the drive, and wait some seconds in order to let EAC recognize it. It will report all tracks into the CD.
    • Now press the Alt-G keys on your keyboard… if you’re lucky CD data will be gathered from the Freedb database and the form will auto fill with correct Artist, Album title etc…
      If this does not happened you’ve to manually type Artist, Album and track titles by hand.
    • Once you’re ready press Control-A to select all the tracks and click the MP3 button (don’t worry mp3 is just the button title, you tracks will be saved using the  FLAC compressor).
    • If all went well EAC will start ripping your CD and after some minutes you’ll get the .flac files into the directory you’ve previously set.
  • Now you’ve all your album collection ripped in .flac files let me guess you want somehow listen your files  Of course there are a lot of programs that could do this, anyone has it’s favorite one. A good think is using Windows Media Player (the version 11 is really well done).
    In order to let Windows Media Player play your .flac files you need a little more work.
  • Download and install “Illiminable  Directshow filters” from http://www.illiminable.com/ogg/ (download is free) This is a collection of libraries that will allow Windows Media Player to recognize and play FLAC format.
  • Download and install WMPTagSupport from http://www.softpointer.com/WMPTagSupport.htm (download is free). This plugin will allow Windows Media Player to recognize FLAC tags in order to organize your album collection by Artist,Genre, or whatever else.
  • Finally open Windows Media Player, click on “Multimedia Catalog” and add your music folder to the catalog. After some minutes you’ll see your media catalog growing and indexing all your .flac files.
  • If you want to play files directly double clicking from Windows Explorer, just double click a .flac file. When the “choose program” dialog will open, select Windows Media Player, and make sure to check the “Always use this program” checkbox.

That’s all,
It’s now time to enjoy your “quality and space proof” album collection !