Skip to main content
Topic: Duration estimate of CBR MP3 w/o VBR header off by 529 (Read 2159 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Duration estimate of CBR MP3 w/o VBR header off by 529

A foobar2000 bug was mentioned in [a href='index.php?showtopic=95297']another thread[/a]. Here's a new thread just for the bug report. Actually it's not so much a bug as an interesting issue:

When estimating the duration of a CBR MP3 which has no VBR info header, foobar2000 correctly (as best it can) estimates the total duration of the audio data in the file. However, this estimate is typically 529 samples more than what one actually gets when playing, converting, or otherwise decoding the file. I assume this is because of decoder delay being trimmed.

What brought this to our attention is the fact that it manifests in foo_verifier as a "Reported length is inaccurate" warning for this type of file. This warning shouldn't be appearing, and foo_verifier probably shouldn't be doing a length check on this type of file at all; there's nothing wrong with the file if the reported length is just a guess and didn't actually come from metadata in the file.

Nevertheless, since for other types of MP3s, foobar2000 would be reporting actual playback duration, it seems like it should be doing so (as best it can) in this case, too. So I propose that a "fix" is for foobar2000 to just subtract 529 samples from the estimated duration for this type of file.

 
SimplePortal 1.0.0 RC1 © 2008-2020