IPB

Welcome Guest ( Log In | Register )

> foobar2000 Tech Support Forum Rules

Please read foobar2000 Tech Support Forum Rules before posting and comply with all the points.
Failure to provide all the information pointed out in the above document in your post is considered wasting other people's time and in extreme cases will lead to your topic getting locked without a reply.


See also: Hydrogenaudio Terms of Service.

"Fix VBR MP3 Header" on CBR files?
kidnukey
post Jun 1 2012, 20:47
Post #1





Group: Members
Posts: 9
Joined: 31-May 12
Member No.: 100297



The verify file integrity tool gives me a lot of "Warning: Reported length is inaccurate" results on my mp3 files. This is strange because I encoded most of them myself and maintain a checksum database of all my files, so I know corruption is not the issue. I'm assuming it was an old version of the LAME encoder which caused the problem.

I am aware of the "Fix VBR MP3 Header" utility to repair this issue, however, many of the files being flagged are CBR, not VBR. I've also read about a lot of issues with this feature in general (fixing the lengths in foobar but breaking them in another player, etc). I'm just wondering if there are any known problems with using a VBR utility to repair a CBR file, and any other information about what exactly this feature does would be helpful.
Go to the top of the page
+Quote Post
 
Start new topic
Replies
mjb2006
post Jun 2 2012, 05:42
Post #2





Group: Members
Posts: 706
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



CBR files can have VBR headers; it doesn't hurt to "fix" those that don't. Then they'll have one, and the duration will actually be written into the file, rather than being guessed.

"Reported length" is the length reported by fb2k. For a CBR file without a VBR header, this number will be an estimate based on (I think) the file size (minus tags) and the parameters of the first frame. If this estimate is wrong, or if some frames are actually undecodable, then the reported length is going to be deemed "inaccurate" by the verifier.

Some experimentation reveals that the estimate will be always be wrong in this situation (CBR file, no VBR header), because fb2k apparently doesn't account for the 529 samples of decoder delay that it strips during decoding. I consider this to be a bug in foobar2000. It should be reporting durations 529 samples smaller than what it is actually reporting.

That's not to say there maybe aren't other problems with your files smile.gif

This post has been edited by mjb2006: Jun 2 2012, 06:08
Go to the top of the page
+Quote Post
markanini
post Jun 2 2012, 13:27
Post #3





Group: Members
Posts: 534
Joined: 22-December 03
From: Malmö, Sweden
Member No.: 10615



QUOTE (mjb2006 @ Jun 2 2012, 06:42) *
Some experimentation reveals that the estimate will be always be wrong in this situation (CBR file, no VBR header), because fb2k apparently doesn't account for the 529 samples of decoder delay that it strips during decoding. I consider this to be a bug in foobar2000. It should be reporting durations 529 samples smaller than what it is actually reporting.

It's not correct to think that the encoder delay is always 529, in fact it varies between different encoders.

(I'll posit though the reason the length is inaccurately reported on an otherwise error-free mp3 is related to the either encoder and/or padding. A fun exercise would be cropping the encoder delay and/or padding of an mp3 with the length error and seeing if the remaining length matches the reported length.)

I have mp3s like this and I don't bother fixing them, the error is merely cosmetic AFAIC, foobar2000 decodes the file the same either way.

This post has been edited by markanini: Jun 2 2012, 13:39
Go to the top of the page
+Quote Post
mjb2006
post Jun 3 2012, 05:20
Post #4





Group: Members
Posts: 706
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (markanini @ Jun 2 2012, 06:27) *
It's not correct to think that the encoder delay is always 529, in fact it varies between different encoders.

Encoder delay is the delay added by the encoder. Like padding, encoder delay is silence (or junk) samples actually encoded into the MP3. It's not normally removed during playback or conversion, unless the # of samples is written into a LAME tag.

But I was talking about decoder delay, the delay added by the decoder to the output stream as the MP3 is processed. The decoder used by foobar2000 has a 529-sample delay, and foobar2000 always strips these samples during playback or conversion. When estimating the duration of CBR files, though, it's not subtracting those samples.

This post has been edited by mjb2006: Jun 3 2012, 05:51
Go to the top of the page
+Quote Post

Posts in this topic


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: 20th April 2014 - 00:23