On Sat, 11 Dec 2004 20:32:30 +0100, Ivo Woltring <[EMAIL PROTECTED]> wrote:

mmpython will help but not always.
Lets put it this way. I will ALWAYS read through the whole file. In that
order I don't mind evaluating each frame. The thing I don't seem to be able
to find is the timelength-constants for frames for the different mp3
versions, bitrates and layers. Can anybody help me?

From http://www.oreilly.com/catalog/mp3/chapter/ch02.html#71109
"In addition, the number of samples stored in an MP3 frame is constant, at 1,152 samples per frame."



So you only need the samplerate for each frame to calculate the duration of that frame.


1152 samples / 44100 samples per second ~ 0.026 seconds

I don't exactly know whether you need to include mono/stereo into the calculation, you would have to test that out.

Regards,
Florian Schulze

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to