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: Duration estimate of CBR MP3 w/o VBR header off by 529 (Read 3316 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.