[ID3 Dev] ID3v2 Best Practices

Mathias Kunter mathiaskunter at yahoo.de
Sat Jul 25 04:31:18 PDT 2009

Regarding point 4):

From the specs (version 2.3.0):

>ID3v2 header
>The ID3v2 tag header, which should be the first information in the file, is 10 bytes as follows: [...]
>The ID3v2 tag size is the size of the complete tag after unsychronisation,
>including padding, excluding the header but not excluding the extended
>header (total tag size - 10).

This means:
*tag* header size field = size of ID3 tag *data* (excluding the tag header size of 10 bytes).
*tag* header size field + 10 = size of entire ID3 tag = offset in bytes of first MPEG frame (start of audio data).

>All the frames consists of a frame header. [...]
>The size is calculated as frame size excluding frame header (frame size - 10).

This means:
*frame* header size field = size of current frame *data* (including possible additional flag data, excluding the frame header size of 10 bytes).
*frame* header size field + 10 = size of entire current frame (including possible additional flag data, including the frame header size of 10 bytes).

Hope it is clear now.

Mathias K.

Von: Glenn Someone <ggrotz73 at hotmail.com>
An: id3v2 at id3.org
Gesendet: Samstag, den 25. Juli 2009, 11:23:43 Uhr
Betreff: [ID3 Dev] ID3v2 Best Practices

A few questions that I have:
1) Obvious one is if this place is still active, since I have not received any e-mails from this list since I joined it....if it is...
2) Is there a list of best practices on implementing ID3v2 anywhere, which describes all the possible nuances/problems that might be encountered between other implementations?  For example, dealing with the wierd DWord format describing the structure size?  Or some of the other stuff that seems to be unimplemented in most of the MP3 file examples I have.  Or some of the v4 features (I started off the v3 documentation), that seem even more confusing...
3) For that matter, any good way to validate a tag structure?  Like a program to show errors & deviations from the "standard"?
4) While I find much convoluted/confusing in the documentation on the website, the biggest one that I still have yet to resolve is this: I understood the size value (the wacky DWord) to be the size of the Frame Headers and Data to follow, but figured out after much time and failure in testing that it was the size of the data between the main header and the start of the MP3 data.  
Furthermore, I notice if I change this value (correctly, so that the MP3 data starts at the spot in question) upon rewriting the MP3 file that most other software (Winamp, WMP) will not honor the ID3v2 Frames.  Upon playing with Winamp and adding much tag data, I found that it creates tag data based on KB boundaries.  Is there a rule that states that this is so?  Or is there some other likely error that I'm not catching upon studying the dump I am writing out of the ID3v2 data I have changed?
Anyway, I hope to hear back soon.

Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. Check it out.


To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org

More information about the ID3v2 mailing list