There are different versions of mp3 tags. A standard is id3v1

Mp3 tags reside at the end of an mp3 file, after the actual music. Tags hold meta information about the mp3 song itself such as author and title. This information is independent from the actual recording itself. At the beginningof the mp3 file lies information regarding the structure of the file such as bitrate, songlength.

This node outlines the structure of an id3v1 tag. However, id3v2 tags are becoming increasingly popular. Both formats are supported by Winamp.

An id3v1 tag is a static size of 128 bytes. All bytes are stored as type char except for genre which is an 8-bit integer.

The first three bytes of a tag are always the same. They are the chars 'T','A','G'.

The 'T' is 128 bytes before the end of the file. A tagger module can look in these three bytes offset from the end of the file to ensure that an mp3 tag is valid.

The following 30 bytes store the title of the song. If all 30 bytes are not used, the end of the string should be padded with '/0' or the string terminator char.

The next 30 bytes store the artist.

The next 30 bytes store the album title.

The next 4 bytes comprise the year of the recording. This is not stored as a number. It holds the literal charecters corresponding to the year. '1','9','9','4' for example.

The next 30 bytes are reserved for any comments.

The last 1 byte is stored as a number. There are 128 possible values, and they each correspond to a differend genre

Field    Bytes
'TAG'    0-3
title    3-32
artist   33-62
album    63-92
year     93-96
comments 97-126
genre    127

Log in or register to write something here or to contact authors.