MP3: Born to Skip

by James Duncan Davidson

In my A Week with the iPod article that ran last month, I complained about both the iPod and iTunes inserting space between tracks on "mix" discs. Several people wrote in with suggestions. I tried all of them and more, but the problem still shows up when listening to my favorite live mix DJ albums.


To get to the bottom of this, I've done quite a bit of experimenting and research. I've tried a variety of rippers and encoders as well as ripping entire discs to one MP3 file. The ripping of entire discs to one MP3 file worked well, but bumped into a bug in the iPod where the hard drive keeps spinning when a song larger than its buffer is played. I have hopes that this problem will be fixed in an upcoming iPod Software Update, but that seems to be still in the future.


Recently, Jason Hunter (who is currently also in the midst of iPod ownership joy) sent a link to the LAME Technical FAQ which talks about this exact issue. Apparently, the silence at the start and end of an MP3 file is inserted by most encoders due to the way that the way the format works. To not insert these silences would compromise the sound of the first and final few frames of music.


So, from the standpoint of the encoder makers, I can understand why the silence is inserted. After all, who wants to compromise the sound of the material that you are encoding? But, I can't understand why the encoder designers went with this design choice knowing that it would make it impossible to have adjacent tracks play seamlessly together. Even if they don't listen to electronic music like I do, many classical albums have continuous tracks and you would think that at least a few of them would have tried out a bit of Mozart at some point. I hope that the Ogg-Vorbis designers have paid attention to this little detail.


In any case, it seems that the gap problem is inherent in the format. But, it also seems (at least from my standpoint as someone who's never written a MP3 player or encoder) that a smart player could (if it were reading data for the next song ahead of time) merge the data of tracks together and ignore the padding. This might result in a clean mix between tracks. But what do I know? :)


Since I'm not a MP3 player software genius, I'm just waiting for the long song fix to appear for the iPod. And I've put in a feature request to Apple (via http://bugreport.apple.com/) to add an option to rip all the music from a CD into a single MP3 track. If this functionality would be valuable to you, please also let Apple know either using the link above or sending feedback via other mechanisms such as Apple's Discussion Forums.


Do know more about how the MP3 format works or have other ideas? Let us know!


3 Comments

karlie
2002-01-02 09:16:51
MP3 Format

The MP3 encoding system like most of the "Hi Quality" perceptual encoders, uses an analysis of the frequency information contained in the music stream.


Unfortunately, it is not possible to get this frequency information instantaneously, just like it takes at least two beats to get the tempo of the music.


So the frequency information is extracted, say, every 20ms. If your music piece is not a multiple of 20ms, you will either have to add or remove up to 20ms of sound.


The bad news is there nothing much that can be done at the algorithmic level.
The good news is: there is no need to do anything at the algorithmic level. Everything could be done at the metadata (IDV3, anyone?) and player system level. The metadata could contain the number of valid samples in each (the last) frame; thus the player could discard those extra samples and paste the beginning of the next track instead.
The rest is just a bit of input buffer management when reading from cache/disc, but nothing more complex than what exists now.


The next 2c question is: are the tracks extracted by the CD ripper continuous?

anonymous2
2003-07-23 19:35:36
Try ACL...
Audio Cleaning Lab (ACL) allows you to create a "project" from a mixed CD, then delete the track break tags (ie. convert the CD to a single track), then export as a single MP3 file. Voila!
jim
2006-04-06 19:21:43
let's go to http://www.yaodownload.com/audio-mp3/
many audio & mp3 tool are waiting for you!