MP3 to CD-DA
what's going wrong?

This note is a synthesis of some basics and some material elsewhere in this primer to see what may go wrong when you make a conventional audio disc from MP3s. There's nothing new here, but putting it together may be worthwhile. We will walk through the whole process even though you may only deal with a small portion; imperfections can come from others' contributions. Some other starting notes: different programs deal with deviations in different ways so something that works when you listen with WinAmp may fail when you burn with MusicMatch - or vice versa.

Let's say we start with a cassette of a concert. We digitize it first at the redbook standard of 44.1 Ksps, 16 bits, stereo, uncompressed PCM. Then we split it into tracks and encode it to MP3. (Some programs hide the PCM, some write it out as a WAV, but all which allow splitting or editing go to PCM along the way. If you doubt that, watch how much storage is used while you're recording.) Now you take those MP3s, make an audio layout and burn the disc in DAO so there are no gaps.

But there are. And maybe there are noises in them. And some of those files were not accepted in the layout. Some were accepted, but turn out to be only four seconds long. Others have glitches or bits chopped off the end. What's going on?

We avoided one error: sampling at the wrong rate. Still, when you get a file from the Internet or from a friend, it might have been created at a different sampling rate. If it came from a DAT, it may be at 48 Ksps. Regardless, some programs demand 44.1 Ksps stereo at 16 bits while others are more tolerant, but none will buy 48 Ksps (or 16 or 32) because they cannot resample on the fly. As with other operations which come up later, they might be able to do a competent job for writing at 1x on the fly, but they don't know how fast you'll want to write or how much CPU power will be available, so they avoid the issue by making you do the resampling. But we were smart; we bypassed that problem by recording right in the beginning.

When we split the PCM/WAV file, where did we do it? With most programs - CDWAV, GoldWave, CoolEdit - you split on block boundaries. Other programs are more flexible; with CoolEdit Pro, for example, you can redefine a block (frame) from its nominal audio value of 1/75th of a second to handle film and other rates. Some simply cut where you tell them to, ignoring blocks. If the track ultimately going to the CD does not end on a block boundary, the software will fill it in so it does. Needless to say, it doesn't fill it with music - just silence.

There's another trap when that PCM is made into a WAV. That is adding non-audio data. Like MP3, WAV can carry additional information. However, when you put that in for other purposes, your later programs may not recognize it as a chunk of data and make it into audio. That will not only mean the wrong length of track (not ending on a block boundary), but will also make a very noticable click.

Now we compress the tracks to MP3 and get ready to use them. Along the way, we added the information we'll want in our MP3 player - artist, selection, that sort of thing. Out comes just the thing - a 128-Kbps file that sounds close enough to the tape to suit our needs. Well - maybe. First, it's not really at 128 Kbps. When you told the program to encode for that rate, it set some parameters so that it would get close, then charged ahead. Depending on your encoder, you'll be off by a little. That doesn't matter in most ways and not at all when you listen, but it does mean that the size of the file is not exactly 128 Kbits per second (plus overehad). That becomes more significant still if you encoded with VBR - Variable Bit Rate - which squeezes a little more quality from the compressor.

Now let's make that layout and let's include this introduction your friend sent over. Oops, wrong sample rate, have to resample in an editor. Okay, now why does this extra track seem to be only four seconds long? Oh, it was encoded with VBR which our mastering software won't convert - back to the audio editor or a separate decoder to make it a PCM (WAV) for the layout. We start the burn and the program stops on another file; back to the editor to find the data dropout (just a bit or two - what difference does it make? I can't even hear it) and snip it out. Now it burns and what am I hearing instead of a nice continuous concert? Gaps where the MP3s decoded to incomplete blocks thanks to the losses in compression, bit rate deviation and the like. Clicks from misplaced ID3 information (courtesy of some compressors) or from having silence where sound ought to be. (Huh? Howcum? Well, suppose you have a steady tone and introduce a very short silence. You hear it turn off, then on again - a click.)

One more 'goodie' is that some tracks may be cut off and others may have noticeable silence added. That comes from another "feature" of some encoders: poor reporting of the playing time. Remember, the mastering program cannot play the file to determine how long it really is and the compression is only approximate, so the only way the program knows that this track is 03:24:12 (minutes : seconds : frames) is by reading it from the header. The program has to believe the header whether it wants to or not.

If you've gotten this far, I trust that you will understand why you are the only one who can determine why the disc doesn't sound good and pin down the actual source(s) of your trouble instead of blaming your writer, your mastering software, or any other single component of the process. You should also have a good idea of some of the inaudible differences among mastering and encoding programs.


E-mail me at cdrecording@mrichter.com
Return to Mike's home page