ripping CD’s |
2007-08-24
|
So, before I shell out cold hard cash for new drives, I thought I should at least first figure out how I'm going to actually rip all my CD's.
If the goal of ripping my CD's is to have a perfect copy on disk, then certain logical conclusions present themselves.
- I should rip a CD completely as one file; this avoids problems with CD's with gapless transitions (for example, live cd's) Besides gaps between tracks due to encoding (a lot of lossy compression methods have a windowing algorithm which causes them to actually decode some extra leading and trailing samples), there's also the fact that CD tracks are made up of sectors of 2352 audio bytes or 588 16-bit stereo samples (at 75 sectors per second), and so any audio file that's not a perfect multiple of the sector size will not be able to play back gaplessly on a CD because the sector gets zero-padded. (Arguably they probably would be fine in separate files anyway given that I would expect a rip from CD to have exactly a sector multiple of samples)
- Another reason to rip as one file is that I've come to believe that a good music management system should actually separate the concept of "song" from the concept of "medium".  A lot of "sound files" actually contain more than one song (think hidden track with lots of silence at the end of a regular CD track), and some sound files contain no songs at all (think spacers between songs and the hidden track). If you don't know what I'm talking about then you haven't been sufficiently pissed off yet at how "All Apologies" comes with this incredibly long stretch of silence before a crap bonus track.
- Â So if you're going to separate the concept of "audio file" and "song" anyway, why not go the whole nine yards and rip the whole CD as one track, allowing you to also re-burn a CD from that ?
- "songs" can then be defined as a start and end position in that file in the management system, defaulting to the actual cue points that the CD knows about
Of course, it's probably not going to be that easy yet to handle music like this. I had a hard time finding any tools on Linux that would actually generate a .CUE file from a CD in my cd drive. The closest I got was using cdrdao read-toc to generate a .toc file and then convert with cuetools. Anyone know of other alternatives ?
Also, it didn't look like cdrdao deals with pre-gap tracks correctly. For example, for "Any Minute Now" by Soulwax (I knew that Much Against Everyone's Advice had a pre-gap track, but that CD is locked upi in a box in Belgium. But the internet told me that this album had one too, and lo and behold, there it was in all its crappiness), cdrdao extracts this:
CD_DA
// Track 1
TRACK AUDIO
NO COPY
NO PRE_EMPHASIS
TWO_CHANNEL_AUDIO
ISRC "BEP010400101"
SILENCE 05:29:03
FILE "data.wav" 0 04:35:07
START 05:29:03
So it marks the pre-gap as silence. Annoying. And also, tracks can have different pre-gap size, and it doesn't look like the .toc format takes this into account. Does anyone know ?
(Also, I had completely forgotten about ISRCÂ codes, and I had *NO* idea they were actually recorded on CD tracks - not too old to learn - are FreeDB and MusicBrainz even tracking these codes ? Does anyone know of an on-line database of these things ?)
Once I know I have the tools and the format in place to make an exact copy of a CD, I can start looking at what I'll need to do to make a player support this if it doesn't yet, and maybe add GStreamer support if it's not there yet ?
To sum up - what do people use on Linux to rip a CD to one big audio file plus a .cue file that can be used to make a track-for-track identical copy of a CD, including pregaps ?