does anyway know how can i change mp3time to fileoffset.


Posted on 2002-10-03 12:59:38 by eko
Someone wrote a proc for grabbing all the pertinent info (bitrate, time, etc) from an mp3 file. I believe it was Thomas. Check on his site for it, and in the mean time I'll keep an eye out for it.
Posted on 2002-10-03 14:15:51 by Will
The only way to do it (accurately) is scanning all the mpeg frames, adding up the duration of each frame and stop when you're reached the time you were for.
Here's some mpeg info:
Here's the mp3 info thread:
Get the latest version of the mp3info code here:

Posted on 2002-10-03 14:21:37 by Thomas
do you have some more info ?
how can i get the mpeg frames .?


Posted on 2002-10-06 08:48:36 by eko
MPEG frames start with 11 (?) bits set to 1, just scan the file until you find 11 1-bits, read the frame (the website shows the format details), calculate the time the frame takes, and goto the next frame.
The mp3info function scans through all the frames, I think you can use that for your own procedure as well.

Posted on 2002-10-10 15:54:09 by Thomas

a mpeg audio frame regardless of its layer consists of frames. The frame itself consists of a header, error_check, audio_data and ancillary_info. The header always consists of 32 bit:

sync: 12 bits (FFFh)
sync: 1 bit
layer: 2 bitsprotection: 1 bit
bitrate: 4 bits
sampling: 2 bits
padding: 1 bit
private: 1 bit
mode: 2 bits
mode_ext: 2 bits
copyright: 1 bit
original: 1 bit
emphasis: 2 bits

As Thomas stated before: since layer 3 uses a variable length encoding the only way to accurately
get a frame to time conversation is to scan the entire stream (file). Don't think you can scan by the synchronisation since this pattern (FFFh) may also occur outside the header. According to the bitrate information you can use the following equation: N = 144 * (bitrate / sampling frequency).
But you have to take care of possibly padding.

Just search the web for which contains all information or try to get the ISO/IEC 11172-3 from your local university (highschool). Alternatively you can buy it at

Bye Miracle
Posted on 2002-10-11 04:22:06 by miracle