IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Fix gapless playback in mp3 files in LAME without transcoding?
Trondis
post Mar 24 2009, 11:11
Post #1





Group: Members
Posts: 53
Joined: 19-September 06
From: Trondheim
Member No.: 35393



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?
Go to the top of the page
+Quote Post
robert
post Mar 24 2009, 11:30
Post #2


LAME developer


Group: Developer
Posts: 788
Joined: 22-September 01
Member No.: 5



LAME can't just fix broken(?) tags, you'll ending up transcoding your broken file.
Go to the top of the page
+Quote Post
Trondis
post Mar 24 2009, 12:50
Post #3





Group: Members
Posts: 53
Joined: 19-September 06
From: Trondheim
Member No.: 35393



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

This post has been edited by greynol: Mar 24 2009, 16:39
Reason for edit: Removed useless quote. We're all capable of reading what's above your post.
Go to the top of the page
+Quote Post
rpp3po
post Mar 24 2009, 14:08
Post #4





Group: Developer
Posts: 1126
Joined: 11-February 03
From: Germany
Member No.: 4961



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.

This post has been edited by greynol: Mar 24 2009, 16:39
Reason for edit: Removed useless quote. We're all capable of reading what's above your post.
Go to the top of the page
+Quote Post
greynol
post Mar 24 2009, 16:41
Post #5





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



The encoder delay is just half the information needed.

To the OP, you're out of luck.


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
timcupery
post Mar 24 2009, 17:06
Post #6





Group: Members
Posts: 780
Joined: 19-December 01
From: Tar Heel country
Member No.: 683



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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 21:25