Saturday, December 17, 2005

CD Audio Archiving With FLAC & CDex

This is a follow-up from yesterday's post. I thought I would do some test runs using FLAC through CDex to create lossless archives of my audio CD's. From what I have seen thus far, I estimate it will take approximately 0.4GB per album to encode them to FLAC files. I have already media-shifted about 110 CD's to OGG Vorbis files with CDex--hence, it will take about 44GB of disk space to losslessly encode those same albums into FLAC files. By comparison, the same amount of audio only takes up about 6.6GB in the lossy Vorbis format (most at a quality 6 setting). Pretty dramatic variance in filesize with little difference in audio quality--in my opinion. Still, I am in agreement with the proponents of lossless archiving. With today's cheap HDD space you could easily fit a large collection of CD's in FLAC format on a 250GB HDD (approximately 625 CD's by my estimates). FLAC being a free codec, you accomplish a couple of things by media-shifting your audio CD's into this format:
  1. Archiving & backup. Build a small Linux RAID1 or RAID5 server with 2 or 3 of these big IDE drives and protect your investment.
  2. "Future proofing" your audio. You will easily be able to batch convert the FLAC files into whatever codec you may need in the future for your Portable Audio Devices and/or other equipment. No need to physically rip the CD's again each time something new comes along.
  3. Streaming. You can stream the lossless, pristine audio files throughout your house over you home network.
I have been media-shifting our CD's into Vorbis with CDex and entering the metadata for the tracks manually which is stored locally in CDDB. This it turns out is great for me because I can simply drop in a CD I have previously encoded and I am ready to media-shift to FLAC: with all the metadata (artist, album, song title, year, etc.) intact! Re-encoding the CD audio in FLAC is actually quicker & easier then ripping them the first time around.

OK, on to the technical details...
  1. Get CDex (it's free) and install it
  2. Get FLAC (it's free too) and install it (note: some AV programs think it's got a trojan in it but it doesn't)
  3. Configure your directories, filename formatting, etc. in CDex
    1. Open CDex
    2. Click Options --> Settings
    3. Select the Filenames tab
    4. Enter a directory in the WAV -> MP3 & Recorded Tracks fields. I have mine currently set to Z:\flac\ for both.
    5. Enter your desired Filename Format (for option information click the ? button to the right of this input field). For example, I have set my format to %1\%2\%2-%7-%4. This saves my audio files in the following format: Z:\flac\Band\Album\Album-Track Number-Track Title.flac
  4. Configure Local or Remote CDDB as you wish with those tabs under Options --> Settings. I have mine configured locally (which means I have to input all the artist, album, track data manually). This data is stored at I:\My Documents\My Music\cddb\
  5. Once you have the basics configured above, it's time to set up CDex to use FLAC encoding.
    1. From the main CDex screen click the Options --> Settings --> Encoder tab
    2. I set Thread Priority to Above Normal
    3. In the Encoder drop-down field select External Encoder
    4. Click on the ... button to input the Encoder Path for the FLAC application. If you have used the FLAC installer downloaded from the link above it will most likely be found at: C:\Program Files\FLAC\flac.exe
    5. Enter the following in the Parameter String field (all one line of course):
      -6 -o %2 -T "artist=%a" -T "title=%t" -T "album=%b" -T "date=%y" -T "tracknumber=%tn" -T "genre=%g" -
    6. Bitrate: any value (it doesn't matter)
    7. File Extension: flac
    8. Check all of the boxes:
    • Hide DOS box window
    • On-the-fly Encoding
    • Send WAV header to stdin

  6. Click OK and you are ready to start encoding your CD's into FLAC!
Easy, right? Soon (relatively speaking & depending on your hardware) you will have your entire CD collection archived into pristine lossless audio files on your hard drive--ready to media-shift into whatever other format you may wish without ever needing to physically rip the discs again.

Tags:

3 comments:

Anonymous said...

hi chronicon :)

Awesome instructions, thank you. I want to go the other way tho, convert flac files to mp3. Is there any chance CDEX can do that?

lisa_west oz

chronicon said...

I want to go the other way tho, convert flac files to mp3. Is there any chance CDEX can do that?

I don't believe so, or at least I have not figured out how that would work via CDex.

I believe your best bet would be to use FLAC with the FLAC Fronted GUI to decode the flac files to WAV and then you could use CDex to convert the WAVs to MP3s.

Frankly, if you use Linux I am sure there is a fairly painless command line that you could enter to batch convert them in one step. That would be the ideal route, IMO.

Seth said...

Heello nice blog