Thursday, October 20, 2005

ID3 Tag Explained

ID3 v 1.0

MP3 stores information about its contends in a Tag called the ID3 tags.ID3 tags are essentially small chunk of data added to the end of the mp3 file.
In order to make it easy to detect and read these tags, the size of tag was fixed as 128 Bytes. Additionally the it was made sure that the first three bytes of tag are "TAG"
The basic structure of the ID3 v 1 Tag is as follows

Song title30 characters
Artist30 characters
Album30 characters
Year4 characters
Comment30 characters
Genre1 byte

The easiest way to find a ID3v1/1.1 tag is to look for the word "TAG" 128 bytes from the end of a file.

You would wonder how one could include Genre information in 1 byte ?? thats the interesting part. The genre byte corresponds to a value in a already defined list created by Eric Kemp. Later on , winmap too added on new Genre items to this list.

Why ID3 v 1.1 ?/strong>

Problem with ID2 v1.0 was that as it was fixed size and there was no space left as "Reserved for future", there was no scope of improvement.
Michael Mutschler made a minor improvement in this regard. As all non-filled spaces were filled with zeroes , we could assume that the Tag reading program will stop reading after encountering the first zero. As the comments field is to short to write anything useful in the ID3v1.1 standard declares that this field should be 28 characters. The 29th byte would be zero and next byte would contain the track number of the song in original cd.