Discussion:
[BitPim-devel] MP3 gurus?
Roger Binns
2005-01-16 03:33:02 UTC
Permalink
If anyone out there is an MP3 guru, I would appreciate you taking
a look at the code in fileinfo for MP3Frame. The problem is
that it sometimes doesn't get the frame length right and
I can't figure out why. In particular use ffmpeg and output
using a sample rate of 22060 and a bitrate of 16 kbits/second.
There is already some disgusting code in there that looks one
back as it seems to always be wrong for ffmpeg output.

If you aren't an MP3 guru and want to have a look anyway (Hi Joe!)
then it is actually pretty simple. It consists of frames just
concatenated together. Sometimes there is a tag at the begining
or end, but the code already copes with that.

You can see the description of a frame at this link (scroll down)
http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm

Roger
d***@netzero.com
2005-01-16 09:20:16 UTC
Permalink
Post by Roger Binns
If you aren't an MP3 guru and want to have a look anyway (Hi Joe!)
Am I getting that predictable? :-)
Post by Roger Binns
problem is that it sometimes doesn't get the frame length right
As it turns out, the sample rate for V2L3 is half that of V1L3, so you've been half-counting the frames for V2L3 files. The problem that you observed occurs when the 1st frame is padded and the 2nd frame is not.

-Joe Pham


______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-01-16 09:29:33 UTC
Permalink
Post by d***@netzero.com
Post by Roger Binns
If you aren't an MP3 guru and want to have a look anyway (Hi Joe!)
Am I getting that predictable? :-)
Yes. You seem to relish the problems that seem hard ...
Post by d***@netzero.com
Post by Roger Binns
problem is that it sometimes doesn't get the frame length right
As it turns out, the sample rate for V2L3 is half that of V1L3, so
you've been half-counting the frames for V2L3 files. The problem
that you observed occurs when the 1st frame is padded and the 2nd frame
is not.
I'd just used the formula in the web page without making any attempt
to understand it. What is really shocking is how many other pieces
of code I found in a Google search that ignored many combinations of
layers and versions, and didn't say that they did that!

Roger

Loading...