Help - Search - Members - Calendar
Full Version: Making mp3 gapless - Maybe i know a workaround ?!
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
soulsearchingsun
As i read some discussion on audiohq.de (in german), members are talking about a fixed frame size in mp3-files of 1152 samples per framed which makes a postgap normally eneviteble when encoding wav tracks coming from an audio-cd with a frame size of 588 samples.
Now what about having a programm filling the ripped wave-file (which has afaik no fixed "frames") with samples from the next track of this cd to have 1152*x samples in every wave of an album, except the last one?
Now it should theoretically possible to have gapless playback, because there are no longer post-gaps.
Other workarounds like --nogap in lame just store the information about the real track length in the header, so eg portable players can't take advantage.

/edit: IŽd liked to discuss this topic in audiohq.de, but its closed for new registrations and you can't even contact the administrator without registration.
dev0
QUOTE(soulsearchingsun @ Jan 27 2005, 03:34 PM)
Other workarounds like --nogap in lame just store the information about the real track length in the header, so eg portable players can't take advantage.
*


Wrong. --nogap does exactly what you described and is deprecated in favour of the much cleaner solution of using LAME tags, which LAME writes by default.
soulsearchingsun
QUOTE
Wrong. --nogap does exactly what you described and is deprecated in favour of the much cleaner solution of using LAME tags, which LAME writes by default.


So then i'm sorry for my stupid question.
But who "deprecated" nogap, what does this mean ? (sorry, my english's too bad)
And why's anybody still talkin about mp3 were not gapless then ?
Afaik lame-tags are not supported in most cases. Are they ?
PoisonDan
QUOTE(soulsearchingsun @ Jan 27 2005, 05:01 PM)
And why's anybody still talkin about mp3 were not gapless then ?
Afaik lame-tags are not supported in most cases. Are they ?
*


Anybody who claims that MP3s cannot be played back gaplessly is probably just uninformed.

For example, MP3 playback is perfectly gapless with foobar2000 and Winamp with the in_mpg123 plugin. More in this thread.

And there is even a hardware MP3 player that uses the LAME tag method to get gapless playback: the Rio Karma.

Of course, it would be better if it were more widely supported...
Gabriel
QUOTE
Now what about having a programm filling the ripped wave-file (which has afaik no fixed "frames") with samples from the next track of this cd to have 1152*x samples in every wave of an album, except the last one?
Now it should theoretically possible to have gapless playback, because there are no longer post-gaps.

That would not work because MP3 is using MDCT, and this is an overlapping transform.
This solution (similar to the --nogap way) is requiring cooperation from the player which must decode all the files as a contiguous stream. Otherwise you will loose the beginning and end of your tracks.

The Lame tag way stores the offsets, so a player can use them. In case of a player not using them, there is simply the "usual" gap, without any sound data missing.
soulsearchingsun
Okay, now i think i'm convinced.
The --nogap solution makes me loose some samples too, in players not supporting that ?
This means there is really no way to have gapless playback with for example an ipod?
thanks.
Otto42
An iPod will have a gap no matter what you do, simply because it pauses for a split second between each song.

The --nogap option will help only when the player was designed to play tracks gaplessly from one to the next but not designed to eliminate the extra bits added to the end of the last frame. This is pretty low in number, I feel.
soulsearchingsun
So possibly there's no hardware supporting the --nogap option.

Couldn't the --nogap option make the gap at least shorter ?
Anyone to explain why this should make me loose the beginning or the end of my tracks ? In the worst case, the next track starts 23 msec later and with albums with live-recordings or transitions between songs (like pink floyd) this would not matter, because songs do not start immedietly. (but when these 23 msec add from track to track this gives us 230msec missing at the beginning of the 11 track, don't know how lame handles this)

Isn't using --nogap better than doing nothing?
thanks
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.