Author Topic: OT: Manually detect ID3v2 tags  (Read 3430 times)

Sebastian_Mares

  • Guest
OT: Manually detect ID3v2 tags
« on: 7 Jun '03 - 13:54 »
Hi there fellows!

I have just restarted the work on a project of mine and was wondering how to check where the first valid MPEG frame is. As far as I know, does BASS ignore ID3v2 size identifiers when they seem boggus (for example ID3v2 tag claims to have 5 MB, but the whole file has only 4 MB). How does BASS handle that MPEG file then? Does it scan byte after byte for a vaild MPEG sync?

Also, I know that an MPEG file can have more than one ID3v2 tag and that they are stored one after another (mostly). Also, the first frame should begin after all tags, so it isn't possible that an MPEG file's layout looks like this: ID3v2...MP3...MP3...ID3v2...MP3. Is this correct?

Finally, how about ID3v2.4 tags? They can be also placed at the end of the file. Is it possible to have more than one ID3v2.4 tag at the end of the file?

Thanks in advance,
Sebastian Mares
« Last Edit: 7 Jun '03 - 13:56 by Sebastian Mares »

Ghostwalker

  • Posts: 35
Re: OT: Manually detect ID3v2 tags
« Reply #1 on: 8 Jun '03 - 07:00 »
hi,

no..there can be only one ID3V2-Tag in a MP3. The ID3V2-Tag is also splitted in Frames. This looks like this

ID3V2-Header
 Frame 1
 Frame 2
   :
 Frame X
MP3-Data
ID3V2-Footer (optional)

if you want to detect if ID3V2 is pressent, you have to read the first 3 Bytes. if this is the string "ID3" there is a ID3V2-Tag.

A more detailed description of the ID3-Tags can be found on

www.id3.org

Hope this helps.


Sebastian_Mares

  • Guest
Re: OT: Manually detect ID3v2 tags
« Reply #2 on: 8 Jun '03 - 10:21 »
Hmm... Well, I could send you a file containing 3 ID3v2 tags. It looks like this: ID3v2.3...ID3v2.2...MP3...ID3v2.4...ID3v1.
« Last Edit: 12 Jun '03 - 17:16 by Sebastian Mares »