Author Topic: What is the adress of the "frame header" in mp3 ?  (Read 7184 times)

moon

  • Guest
subj

Sebastian_Mares

  • Guest
Re: What is the adress of the "frame header" in mp
« Reply #1 on: 24 Aug '03 - 11:31 »
I don't understand what you mean. An MP3 file has lots of frames and the byte offsets where a new frame begins is always last frame + 1152 (as one frame has 1152 bytes). You should be able to locate the first frame by detecting a sync. word, which always begins with FFF. The first frame is usually located after the ID3v2 tag, so you can skip this tag if present.
I am not sure if the frame size of MPEG 2(.5) Layer III files is also 1152 bytes, but for the most MP3 files (MPEG 1 Layer III) it is 1152 bytes.
« Last Edit: 24 Aug '03 - 11:32 by Sebastian Mares »

Sebastian_Mares

  • Guest
Re: What is the adress of the "frame header" in mp
« Reply #2 on: 24 Aug '03 - 11:34 »
Anyway, the first frame usually starts either at position 0x00 in the file (it is the first byte), or right after the ID3v2 tag. The ID3v2 tag header contains some information about the tag size. You can then extract this size information and then skip those bytes.