Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Fix gapless playback in mp3 files in LAME without transcoding? (Read 4476 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Fix gapless playback in mp3 files in LAME without transcoding?

This is a quote from the user manual of a program I have, and it is discussing gapless playback: "LAME (and apps that use it) can ofte be used to fix mp3 files that will not parse in DBC, and does so without any loss in quality (no transcoding is needed; only the mp3 file structure is updated)." If I understand this correctly he says that it is possible to reencode mp3 files to set the gapless tag in LAME, without transcoding. Is this right, and how should it be done?

Fix gapless playback in mp3 files in LAME without transcoding?

Reply #1
LAME can't just fix broken(?) tags, you'll ending up transcoding your broken file.

Fix gapless playback in mp3 files in LAME without transcoding?

Reply #2
I was hoping that LAME would add the missing gapless tag in mp3 files encoded with other mp3 encoders.

Fix gapless playback in mp3 files in LAME without transcoding?

Reply #3
The tag contains a value that is only known at encoding time: encoder delay. But it could be reconstructed from the version information, if that's embedded, because the encoder delay should be constant for at least every version.

 

Fix gapless playback in mp3 files in LAME without transcoding?

Reply #5
If you're OCD enough, you can do what I do (sometimes, when I really care about it) and edit them in foobar2000, which can write gapless info in the way that LAME writes it. The context-menu command is "edit mp3 gapless playback information" from the Utils menu.

If I get mp3 files that I really want to play gaplessly, I first figure out the encoder delay, usually by decoding and seeing when the "real" music starts. Common delays are 576 samples (LAME), 528 or 529 (iTunes), or 672 (FGH used by Windows Media Player). There are other delays out there as well.
Figuring out the enc_padding value, to screen out null samples at the end of the file, is the trickier part.
Just depends on how much time you want to spend. Odds are very high (at least if the source was a CD rip) that total length of the track will be in multiple of 588 samples.
God kills a kitten every time you encode with CBR 320