gapless mp3 playback...

Please remember the terms of your membership agreement.

Moderators: valis, garyb

Post Reply
eliam
Posts: 1093
Joined: Sat Jan 05, 2002 4:00 pm
Location: Montreal, Quebec
Contact:

gapless mp3 playback...

Post by eliam »

Ok, so, I've finished the final mixes for my new album. Yahoo! Now I'm planning distribution and all that stuff. I have some tracks that are continuous and I'm wondering if/how I can have them play back as mp3s without any gap between the tracks. Has anyone any idea if this is possible?
Thanks
User avatar
braincell
Posts: 5943
Joined: Thu Sep 13, 2001 4:00 pm
Location: Washington DC

Re: gapless mp3 playback...

Post by braincell »

That depends on the mp3 player. Some add a gap and some don't.
eliam
Posts: 1093
Joined: Sat Jan 05, 2002 4:00 pm
Location: Montreal, Quebec
Contact:

Re: gapless mp3 playback...

Post by eliam »

Thanks for the reply, do you know where I can find this info? I'll research some more...
User avatar
braincell
Posts: 5943
Joined: Thu Sep 13, 2001 4:00 pm
Location: Washington DC

Re: gapless mp3 playback...

Post by braincell »

http://en.wikipedia.org/wiki/Gapless_playback

I don't know if this is totally accurate or up to date because they didn't list my RCA mp3 player which is gapless. I see the cue file it created to play without gaps which is mentioned in the wikipedia article.
eliam
Posts: 1093
Joined: Sat Jan 05, 2002 4:00 pm
Location: Montreal, Quebec
Contact:

Re: gapless mp3 playback...

Post by eliam »

thanks, I've read this article, but I don't fully understand the issues... Well, I'll have to experiment I guess and find a way to allow gapless playback for as many people and players as possible... What a mess these multiple formats and players...
User avatar
valis
Posts: 7681
Joined: Sun Sep 23, 2001 4:00 pm
Location: West Coast USA
Contact:

Re: gapless mp3 playback...

Post by valis »

To start off, you can either do separate mp3's per track/song or 1 continuous mix mp3 (like ripping a cd to a single mp3) with a .cue file. If you're selling the album as individual tracks you'd of course have to do the separate mp3's per track, and most services require this anyway (itunes etc).

The second option comes from people 'ripping' cds to re-burn them back. Redbook audio doesn't define the audio cd format in terms of samples, it defines things in 'frames' which are aligned with sectors on the audio CD. These frames are not bitstreams like your typical PCM audio data in a Wav/Aiff/etc digital file but instead have 24 bytes of audio data plus sync, error correction, control and display bits (more technical breakdown here). The frames are 1/75 second long @ 44.1khz, in 16-bit samples for a sector size of 2,352 bytes per frame (the total size of a physical block on a CD).

So basically when you try to burn any old audio file to a cd you might not have the end of your file lined up with the end of a frame, and a gap occurs there. Also on older cd players a 2-second gap was defined after the lead-in and after every track to allow the laser to align itself to the new sectors in time. The 2 second lead-in per track is now optional but the first one is hardcoded into redbook audio standard.

To make matters worse mp3's are NOT pcm audio at all. They are 32bit FFT blocks, each block eferences a FFT lookup table, which gives the frequency content for that fft block. So when ripping something to audio where you might mostly preserve the tracksize from the cd format, mp3 again alters the relationship to the frames due to its own blocksize.

SO, the answer for 'cd rippers' was to rip a cd as a single contiguous track and define your 'index points' in a .cue file (textfile) which allows the 'cd burning' application to use the index points as rough guides when assembling the cd data for burning. The burning applications will automatically realign your index point to line up on a frame or sector boundary, insuring gapless playback of cd's. Modern burning applications are able to figure out how to seamlessly burn separate audio or mp3 files as well if you set the lead-in to 0 (thinking of Toast & Nero for example). So it's less of an issue than it was in the past if you know how to operate your burning software.

CUE files also allow someone to index through an mp3 manually with a player that supports the CUE format. Between burniung cd's and using CUE files as track indexes for a single contiguous mix mp3, These are the reasons why CUE files are referenced when looking up gapless playback.

So back to your question, unless you have a dj mix or an album that is conceptually a single mix, the CUE file isn't the likely option for you. So the info you've gleaned here is more or less correct in regards to how players handle 'gapless' playback. Each player has its own method! Some will crossfade tiny portions of the next track with the current track playing by prebuffering the next track, some simply prebuffer the next track and start its playback (by stuffing that data into the playback buffer) the second that the current one ends, and older players will actually just end the current track and then start buffering the next track (how large of a gap occurs depends upon the storage medium, the buffersize used by the player for playback and the processor speed). To make things even more confusing most software players support more than one decoder, so things will change based on the decoder used. Fraunhofer, Xing & Lame are the 3 most well known mp3 encoder/decoders.

For individual mp3's the best answer you can probably come up with is to just make it work as well as you can in itunes, winamp & media player (and Cog/Foobar2000 if you want to cover the open source players for OSX & Windows).

Also fyi there is a service that handles preparation & distribution of your albums for you: http://www.tunecore.com/
User avatar
braincell
Posts: 5943
Joined: Thu Sep 13, 2001 4:00 pm
Location: Washington DC

Re: gapless mp3 playback...

Post by braincell »

In my case cue is put in by the machine. If you are really concerned about it, then I would suggest using Flac format instead of mp3. People who have gaps are used to it. Eventually they will get a better player anyway. I'm looking forward to hearing it.
eliam
Posts: 1093
Joined: Sat Jan 05, 2002 4:00 pm
Location: Montreal, Quebec
Contact:

Re: gapless mp3 playback...

Post by eliam »

Valis- wow, thanks for all the info, it's really worthwile! Much obliged! I'll read it a couple times more so it sinks in... There's a lot of info and I don't exactly know what to do with it, where to begin and what's involved... Actually some sections of the album have continuous tracks, the 4 last pieces have no gaps between them. So a cue sheet could be appropriate I guess...

Braincell- Yeah, flac is my favourite format, I could offer it to download too, I just want things to be as simple as possible... mp3 format is kind of unavoidable these days...

I'm really eager to release this album too, I put my Heart and soul into it! -3 years in the making... What an adventure! The lyrics' themes are quite spiritually oriented, but usually it's appreciated by many kinds of people, even those who call themselves atheists. I trust you'll enjoy it!
User avatar
valis
Posts: 7681
Joined: Sun Sep 23, 2001 4:00 pm
Location: West Coast USA
Contact:

Re: gapless mp3 playback...

Post by valis »

Well my long-winded explanation of .cue files was basically to make the point that you don't need .cue for mp3's intended to be consumed as mp3, they're really intended for burning to cd and the 'support' that some media players has for them is a byproduct of that. Most modern mp3 playback hardware & software players that I'm aware of have minimal to no gap between mp3's, so if your tracks are setup appropriately there shouldn't be an issue. The only real concern isn't actually the players that can't do gapless playback (due to the slow hardware or being a really old version of winamp etc) but rather the players that crossfade 300-500ms of the 2 tracks to make it 'gapless'. In this case if your tracks have any percussion or rhythmic elements it's best to choose points where the tunes have a 'breakdown' of sorts to do your track edits, or create short pauses in the rhythmic elements where the tracks change. That way crossfades don't give a noticeable jump in the rhythm.

Also, I again might recommend tunecore if you're finding the preparation of the tunes to be at all daunting. The next step after prepping the files is going to be tagging them, and this is where things become really onorous (each format & web retailer has their own tagging & formatting/filenaming scheme). Tunecore makes it all automatic and charges so little that it's a no brainer when compared to something like a label (they tend to take a lot more off the top under the idea that they're handling promotion & distribution for you, even though that's often charged back to you as well).
User avatar
braincell
Posts: 5943
Joined: Thu Sep 13, 2001 4:00 pm
Location: Washington DC

Re: gapless mp3 playback...

Post by braincell »

Why would anyone pay to tag files? I tag them every day, it takes seconds and with no software other than Windows.
User avatar
valis
Posts: 7681
Joined: Sun Sep 23, 2001 4:00 pm
Location: West Coast USA
Contact:

Re: gapless mp3 playback...

Post by valis »

It seems to me that using a service like this to cover the major retailers covers those bases easily and then I can focus my efforts on the niche markets and minor retailers where I care more about having a presence. Also leaving more time for things like promotion, production work etc.

I certainly do tag myself using mp3tag, the tools in Foobar and Cog (OSX) & mass-taggers often enough, but sorting out the registration & formatting details for multiple online retailers can become a bit time consuming. iTunes, Amazon, Yahoo Music, rhapsody and the various MS partners are bad enough, throw in niche retailers like Bleep, Juno, Chemical Records, Beatport etc and there's more than a bit of manual labor involved. id3v2 & an m3u alone isn't going to cover it. And then there's the time spent tracking the accounts across all the retailers you've put stuff on. It's not that it's difficult to do but paying effectively a dollar or two a month per track for someone else to cover the major outlets isn't a horrible price imo.
Post Reply