mp3 tags

This page tries to give an overview about the different methods to embed meta information in MP3 files and the different open source implementations allowing to read and modify them.

ID3V1 tags

These tags are added to the end of the mp3 file. Description about these tags is in Wikipedia. A technical specification can be seen here: http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm#MPEGTAG I would propose that only tagging tools should support version 1 tags any longer and tools should not support writing them any longer.

ID3V2 tags

The version 2 tags are a complete new development. Numerous tags are supported starting from four versions of the song and album title (can be confusing) to very useful tags like the popularimeter and relative audio gain tags. However currently those are not widely supported by implementations. e.g. Windows Media Player and Itunes completely ignore the popularimeter tags and instead store the popularity in their own databases only.
The specification can be found here: http://www.id3.org/Developer_Information The latest version is from 1999 and not fully implemented anywhere. That should be a clear indication that it is over designed.

The following table lists the tags used by itunes and windows media player. I am listing those because they are partially non-standart and on the other hand widely used.

id3v2 tag name itunes usage wm-player usage note
COMM comment
COMM iTunNORM binary data for volume adjustment
TIT1 Grouping Music category description spec says: content group description
TIT2 Name Title
TIT3 Video description Subtitle
TOAL Original Album
PRIV WM/Mood music mood (e.g. Happy)
TCON Genre
TRCK Track number, Track count Track number (track count is not handled)
TBPM BPM Beats per minute
TPOS Disc number Set (disc count is not handled)
TLAN language
TPE1 Artist Artist
TPE2 Album artist Album artist
WOAF Conductor spec says: Audio file web page
APIC Picture Picture
TCOM Composer Composer
TEXT Lyricist
TOLY Original lyricist
TOPE Original artist
TCMP Compilation (flag, either 0 or 1)

Xing tag

The Xing tag was invented for variable bit rate mp3s to allow a kind of table of content. This tag is added to the front of the mp3 and is in itself a kind of dummy mp3 frame. The xing tag does not contain any meta information, however it was extended by Lame with the Lame tags.

Lame

The Lame tag is an extended xing tag with some meta information. Description is here: http://gabriel.mp3-tech.org/mp3infotag.html Meta information contains audio gain and crc checksum.

Ape tags

Ape tags seem to be everything that id3v2 should be. The specification is short and simple. The tags can contain binary data and unicode text. The tags are free form so it is easy to add more for your needs. See the specification here: http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification

Lyrics tags

Lyrics tags contain Lyrics (obviously) but also title name, author name and some other meta information. More details here: http://www.id3.org/Lyrics3v2 The Lyrics tags are placed before id3v1 tags and it seems that they can only contain ASCII texts.

Replay gain

When playing audio from different sources the apparent loudness will be different. The reason is mostly that the audios are dynamic compressed to appear louder when they are mastered on the CD. Some even break the CD specification by just blowing up the values until they need to be cropped.
Meta information can be stored in the mp3 to give information how the file should be adjusted to appear at a consistend loudness. This "replay gain" is actually part of the id3v2 specification. It can be also contained in the Lame tags and in a id3v2 comment field with special strings. The special strings are replaygain_track_gain, replaygain_album_gain, replaygain_track_peak and replaygain_album_peak.
In addition ape tags REPLAY_GAIN_TRACK_GAIN and REPLAYGAIN_TRACK_PEAK contain replay gain information.

Implementation name homepage Licence read id3v1 write id3v1 read id3v2 write id3v2 read lame audio gain read id3v2 audio gain (via RVAD) read id3v2 audio gain (via comment) read ape tags read id3v2 popularimeter
MP3Info http://www.ibiblio.org/mp3info/ yes yes no no no no
gtkpod http://www.gtkpod.org/ yes yes yes no no only gain no
mpd http://www.mpd.org/ yes yes yes no
amarok http://amarok.kde.org/ yes yes yes yes no no no no
'