ID3

ID3 is a metadata container most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be stored in the file itself.

There are two unrelated versions of ID3: ID3v1 and ID3v2. ID3v1 takes the form of a 128-byte segment at the end of an MP3 file containing a fixed set of data fields. ID3v1.1 is a slight modification which adds a "track number" field at the expense of a slight shortening of the "comment" field. ID3v2 is structurally very different from ID3v1, consisting of an extensible set of "frames" located at the start of the file, each with a frame identifier (a three- or four-byte string) and one piece of data. 83 types of frames are declared in the ID3v2.4 specification, and applications can also define their own types. There are standard frames for containing cover art, BPM, copyright and license, lyrics, and arbitrary text and URL data, as well as other things. Three versions of ID3v2 have been documented, each of which has extended the frame definitions.

ID3 is a de facto standard for metadata in MP3 files; no standardization body was involved in its creation nor has such an organization given it a formal approval status.[1] It competes with the APE tag in this arena.

Lyrics3v1[2] and Lyrics3v2[3] were tag standards implemented before ID3v2, for adding lyrics to mp3 files. The difference with ID3v2 is that Lyrics3 is always at the end of an MP3 file, after the ID3v1 tag.

ID3v1

The MP3 standard did not include a method for storing file metadata. In 1996 Eric Kemp had the idea to add a small chunk of data to the audio file, thus solving the problem. The method, now known as ID3v1, quickly became the de facto standard for storing metadata in MP3s.[4]

The ID3v1 tag occupies 128 bytes, beginning with the string TAG 128 bytes from the end of the file. The tag was placed at the end of the file to maintain compatibility with older media players. Some players would play a small burst of static when they read the tag, but most ignored it, and almost all modern players will correctly skip it. This tag allows 30 bytes each for the title, artist, album, and a "comment", four bytes for the year, and a byte to identify the genre of the song from a predefined list of 80 values (Winamp later extended this list to 148 values).

One improvement to ID3v1 was made by Michael Mutschler in 1997. Since the comment field was too small to write anything useful, he decided to trim it by two bytes and use those two bytes to store the track number. Such tags are referred to as ID3v1.1.[4]

ID3v1 and ID3v1.1[5]

Strings are either space- or zero-padded. Unset string entries are filled using an empty string. ID3v1 is 128 bytes long.[6]

Field Length Description
header 3 "TAG"
title 30 30 characters of the title
artist 30 30 characters of the artist name
album 30 30 characters of the album name
year 4 A four-digit year
comment 28[7] or 30 The comment.
zero-byte[7] 1 If a track number is stored, this byte contains a binary 0.
track[7] 1 The number of the track on the album, or 0. Invalid, if previous byte is not a binary 0.
genre 1 Index in a list of genres, or 255

ID3v1 pre-defines a set of genres denoted by numerical codes. Winamp extended the list by adding more genres in its own music player, which were later adopted by others (though some are of dubious value: e.g. "Primus" is one specific band, not a genre, and "Negerpunk" appears to be a racist joke in Swedish). However, support for the extended Winamp list is not universal. In some cases, only the genres up to 125 are supported.[8][9]

Enhanced TAG[10]

The Enhanced tag is an extra data block before an ID3v1 tag, which extends the title, artist and album fields to 60 bytes each, offers a freetext genre, a one-byte (values 0–5) speed and the start and stop time of the music in the MP3 file, e.g., for fading in. If none of the fields are used, it will be automatically omitted.

Some programs supporting ID3v1 tags can read the extended tag, but writing may leave stale values in the extended block. The extended block is not an official standard and is only supported by few programs, not including XMMS or Winamp. The Enhanced tag is sometimes referred to as the "extended" tag.

The Enhanced tag is 227 bytes long, and placed before the ID3v1 tag.

Field Length Description
header 4 "TAG+"
title 60 60 characters of the title
artist 60 60 characters of the artist name
album 60 60 characters of the album name
speed 1 0=unset, 1=slow, 2= medium, 3=fast, 4=hardcore
genre 30 A free-text field for the genre
start-time 6 the start of the music as mmm:ss
end-time 6 the end of the music as mmm:ss

ID3v1.2[11]

ID3v1.2 purpose is to add small improvements to ID3v1.1 informal standard without breaking the ID3v1 informal standard The ID3v1.2 tag will not cause any issues in legacy decoders/players (old ones)[11]

Genre list in ID3v1[12]

standard

NumberGenre
00Blues
01Classic rock
02Country
03Dance
04Disco
05Funk
06Grunge
07Hip-Hop
08Jazz
09Metal
10New Age
11Oldies
12Other
13Pop
14Rhythm and Blues
15Rap
16Reggae
17Rock
18Techno
19Industrial
NumberGenre
20Alternative
21Ska
22Death metal
23Pranks
24Soundtrack
25Euro-Techno
26Ambient
27Trip-Hop
28Vocal
29Jazz & Funk
30Fusion
31Trance
32Classical
33Instrumental
34Acid
35House
36Game
37Sound clip
38Gospel
39Noise
NumberGenre
40Alternative Rock
41Bass
42Soul
43Punk
44Space
45Meditative
46Instrumental Pop
47Instrumental Rock
48Ethnic
49Gothic
50Darkwave
51Techno-Industrial
52Electronic
53Pop-Folk
54Eurodance
55Dream
56Southern Rock
57Comedy
58Cult
59Gangsta
NumberGenre
60Top 40
61Christian Rap
62Pop/Funk
63Jungle
64Native US
65Cabaret
66New Wave
67Psychedelic
68Rave
69Show tunes
70Trailer
71Lo-Fi
72Tribal
73Acid Punk
74Acid Jazz
75Polka
76Retro
77Musical
78Rock ’n’ Roll
79Hard rock

Winamp Extended List

Genres 142–147 were added in the 1 June 1998 release of Winamp 1.91; genres 148–191 were added in Winamp 5.6 (30 November 2010).

80–99
NumberGenre
80Folk
81Folk-Rock
82National Folk
83Swing
84Fast Fusion
85Bebop
86Latin
87Revival
88Celtic
89Bluegrass
90Avantgarde
91Gothic Rock
92Progressive Rock
93Psychedelic Rock
94Symphonic Rock
95Slow rock
96Big Band
97Chorus
98Easy Listening
99Acoustic
100–119
NumberGenre
100Humour
101Speech
102Chanson
103Opera
104Chamber music
105Sonata
106Symphony
107Booty bass
108Primus
109Porn groove
110Satire
111Slow jam
112Club
113Tango
114Samba
115Folklore
116Ballad
117Power ballad
118Rhythmic Soul
119Freestyle
120–139
NumberGenre
120Duet
121Punk Rock
122Drum solo
123A cappella
124Euro-House
125Dancehall
126Goa
127Drum & Bass
128Club-House
129Hardcore Techno
130Terror
131Indie
132BritPop
133Negerpunk
134Polsk Punk
135Beat
136Christian Gangsta Rap
137Heavy Metal
138Black Metal
139Crossover
140–159
NumberGenre
140Contemporary Christian
141Christian rock
142Merengue
143Salsa
144Thrash Metal
145Anime
146Jpop
147Synthpop
148Abstract
149Art Rock
150Baroque
151Bhangra
152Big beat
153Breakbeat
154Chillout
155Downtempo
156Dub
157EBM
158Eclectic
159Electro
160–179
NumberGenre
160Electroclash
161Emo
162Experimental
163Garage
164Global
165IDM
166Illbient
167Industro-Goth
168Jam Band
169Krautrock
170Leftfield
171Lounge
172Math Rock
173New Romantic
174Nu-Breakz
175Post-Punk
176Post-Rock
177Psytrance
178Shoegaze
179Space Rock
180–191
NumberGenre
180Trop Rock
181World Music
182Neoclassical
183Audiobook
184Audio theatre
185Neue Deutsche Welle
186Podcast
187Indie-Rock
188G-Funk
189Dubstep
190Garage Rock
191Psybient

ID3v2

In 1998, a new specification called ID3v2 was created by multiple contributors.[13] Although it bears the name ID3, its structure is very different from ID3v1.

ID3v2 tags are of variable size, and usually occur at the start of the file, which aids streaming media as the metadata is essentially available as soon as the file starts streaming instead of requiring the entire file to be read first as is the case with ID3v1. ID3v2 tags consist of a number of frames, each of which contains a piece of metadata. For example, the TIT2 frame contains the title, and the WOAR frame contains the URL of the artist's website. Frames can be up to 16MB in length, while total tag size is limited to 256MB. The internationalization problem was solved by allowing the encoding of strings not only in ISO-8859-1, but also in Unicode.

Textual frames are marked with an encoding byte.[14]

$00 – ISO-8859-1 (LATIN-1, Identical to ASCII for values smaller than 0x80).
$01 – UCS-2 encoded Unicode with BOM, in ID3v2.2 and ID3v2.3.
$02 – UTF-16BE encoded Unicode without BOM, in ID3v2.4.
$03 – UTF-8 encoded Unicode, in ID3v2.4.

However, mojibake is still common when using local encodings instead of Unicode. In particular, some Japanese editors are known to use Shift JIS encoding, which usually has disastrous effects: it will not work with any standard-compliant software regardless of local settings (since it is not supported by the standard), will not work outside Japan (since Shift JIS has very little support outside Japan), and will not even work on all Japanese computers even with a specifically non-compliant reader (as it is software-dependent and settings-dependent).

There are 83 types of frames declared in the ID3v2.4 specification,[15] and applications can also define their own types. There are standard frames for containing cover art, BPM, copyright and license, lyrics, and arbitrary text and URL data, as well as other things. There are three versions of ID3v2:

ID3v2.2
v2.2 was the first public version of ID3v2. It used three character frame identifiers rather than four (TT2 for the title instead of TIT2). Most of the common v2.3 and v2.4 frames have direct analogues in v2.2. Now this standard is considered obsolete.[16]
ID3v2.3
v2.3 expanded the frame identifier to four characters, and added a number of frames. A frame can contain multiple values, separated with a null byte. This is the most widely used version of ID3v2 tags.[17]
ID3v2.4
v2.4 was published on November 1, 2000, and remains the latest version. It allows textual data to be encoded in UTF-8 rather than UTF-16, which was a common practice in some parts of the world in earlier tags (despite the standard, since it was not supported yet) because UTF-8 unfairly disadvantages Asian scripts against basic Latin, unlike UTF-16. Another new feature allows the addition of a tag to the end of the file before other tags (like ID3v1).[18]
No version of Windows Explorer or Windows Media Player—up to and including Windows 10 (initial release) and WMP 12, respectively—interprets ID3v2.4 tags correctly. These programs can interpret ID3v2.3 and earlier, however.[19][20] Windows Explorer finally supports reading ID3v2.4 tags with the Windows 10 Creators Update (version 1703), but the new Windows 10 version still cannot interpret the ID3v2.4 tag correctly with some of non-English and Asian characters.

ID3v2 rating tag issue

There is a loose de facto standard for implementation of song ratings. Most apps will display 0 to 5 stars for any given song, and how the stars are expressed can vary. For instance, when rating a song in iTunes, the rating is not embedded in the tag in the music file, but is instead stored in a separate database that contains all of the iTunes metadata. Other media players can embed rating tags in music files, but not necessarily the same way, so as a result a song which is rated on one media player sometimes won't display the rating the same way, or at all, when played on other software or mobile device.

However, there is a "Popularimeter" frame in the ID3v2 specification meant for this purpose. The frame is called POPM and Windows Explorer, Windows Media Player, Winamp, foobar2000, MediaMonkey, and other software all map roughly the same ranges of 0–255 to a 0–5 stars value for display.

The following list details how Windows Explorer reads and writes the POPM frame:

  • 224–255 = 5 stars when READ with Windows Explorer, writes 255
  • 160–223 = 4 stars when READ with Windows Explorer, writes 196
  • 096-159 = 3 stars when READ with Windows Explorer, writes 128
  • 032-095 = 2 stars when READ with Windows Explorer, writes 64
  • 001-031 = 1 star when READ with Windows Explorer, writes 1

Windows Explorer uses the following syntax:

Windows Media Player 9 Series | 255 | 0

The 0 is the play counter portion of POPM as per the ID3v2 POPM specification, which is not to be confused or conflated with the PCNT frame, which is a separate frame meant entirely for playcounts. If an app supports granularity however, it should write 1 for one full star, and then 2–31 would be granular points under one full star. Notably, the ID string Windows uses is not an email address, as called for in the specifications. Further, Windows Explorer and Windows Media Player up to and including Windows 7 and WMP 12 (possibly beyond) contain a bug such that, if one were to use them to rate files, any Replay Gain tags one would have will be corrupted. WMP also writes the same values as described above, and reads the same way as well, EXCEPT for the cutoff between 4 and 5 stars, which is slightly different and basically of no consequence. WMP uses 221/222 instead, for reasons that are not clear.

ID3v2 chapters

The ID3v2 Chapter Addendum was published in December 2005 but is not widely supported as yet. It allows users to jump easily to specific locations or chapters within an audio file and can provide a synchronized slide show of images and titles during playback. Typical applications include Enhanced podcasts and it can be used in ID3v2.3 or ID3v2.4 tags.[21]

ID3v2 embedded image extension

The metadata can contain an "Attached Picture" ID3 frame ('PIC' or 'APIC') containing an image. A field in this frame can indicate the picture type. The following types are defined:[22]

$00     Other
$01     32x32 pixels 'file icon' (PNG only)
$02     Other file icon
$03     Cover (front)
$04     Cover (back)
$05     Leaflet page
$06     Media (e.g. label side of CD)
$07     Lead artist/lead performer/soloist
$08     Artist/performer
$09     Conductor
$0A     Band/Orchestra
$0B     Composer
$0C     Lyricist/text writer
$0D     Recording Location
$0E     During recording
$0F     During performance
$10     Movie/video screen capture
$11     A bright coloured fish
$12     Illustration
$13     Band/artist logotype
$14     Publisher/Studio logotype

ID3v2 frame specification

Description Frame
v2.3 v2.4
Audio encryption AENC
Audio seek point index N/A ASPI
Attached picture APIC
Comments COMM
Commercial frame COMR
Encryption method registration ENCR
Equalization EQUA EQU2
Event timing codes ETCO
General encapsulated object GEOB
Group identification registration GRID
Involved people list IPLS TIPLa
Linked information LINK
Music CD identifier MCDI
MPEG location lookup table MLLT
Ownership frame OWNE
Private frame PRIV
Play counter PCNT
Popularimeter POPM
Position synchronisation frame POSS
Recommended buffer size RBUF
Relative volume adjustment RVAD RVA2
Reverb RVRB
Seek frame N/A SEEK
Signature frame N/A SIGN
Synchronized lyric/text SYLT
Synchronized tempo codes SYTC
Album/Movie/Show title TALB
Beats per minute (BPM) TBPM
Composer TCOMc
Content type TCON
Copyright message TCOP
Date TDAT TDRCb
Encoding time N/A TDEN
Playlist delay TDLY
Recording time N/A TDRCb
Release time N/A TDRL
Tagging time N/A TDTG
Encoded by TENC
Lyricist/Text writer TEXTc
File type TFLT
Time TIME TDRCb
Content group description TIT1
Title/songname/content description TIT2
Subtitle/Description refinement TIT3
Initial key TKEY
Language(s) TLAN
Length TLEN
Musician credits list N/A TMCLa
Media type TMED
Mood N/A TMOO
Original album/movie/show title TOAL
Original filename TOFN
Original lyricist(s)/text writer(s) TOLYc
Original artist(s)/performer(s) TOPEc
Original release year TORY TDOR
File owner/licensee TOWN
Lead performer(s)/Soloist(s) TPE1c
Band/orchestra/accompaniment TPE2
Conductor/performer refinement TPE3
Interpreted, remixed, or otherwise modified by TPE4
Part of a set TPOS
Produced notice N/A TPRO
Publisher TPUB
Track number/Position in set TRCK
Recording dates TRDA TDRCb
Internet radio station name TRSN
Internet radio station owner TRSO
Size TSIZ Dropped
Album sort order N/A TSOA
Performer sort order N/A TSOP
Title sort order N/A TSOT
International Standard Recording Code (ISRC) TSRC
Software/Hardware and settings used for encoding TSSE
Set subtitle N/A TSST
Year TYER TDRCb
User defined text information frame TXXX
Unique file identifier UFID
Terms of use USER
Unsynchronized lyric/text transcription USLT
Commercial information WCOM
Copyright/Legal information WCOP
Official audio file webpage WOAF
Official artist/performer webpage WOAR
Official audio source webpage WOAS
Official internet radio station homepage WORS
Payment WPAY
Publishers official webpage WPUB
User defined URL link frame WXXX

Notes:

  1. IPLS of ID3v2.3 maps both to TIPL (the "involved people list") and to TMCL (the "musician credits list").
  2. TDRC (recording time) consolidates TDAT (date), TIME (time), TRDA (recording dates), and TYER (year).
  3. TCOM, TEXT, TOLY, TOPE, and TPE1 can contain multiple values separated by a foreslash ("/").[23]

Version 2.4 of the specification prescribes that all text fields (the fields that start with a T, except for TXXX) can contain multiple values separated by a null character. The null character varies by character encoding.

Editing ID3 tags

ID3 tags may be edited in a variety of ways. On some platforms the file's properties may be edited by viewing extended information in the file manager. Additionally most audio players allow editing single or groups of files. Editing groups of files is often referred to as "batch tagging". There are also specialized applications, called taggers, which concentrate specifically on editing the tags and related tasks. Some, such as puddletag offer advanced features such as advanced batch tagging or editing based on regular expressions.

Non-MP3-implementation and alternatives

ID3 tags were designed with MP3 in mind, so they would work without problems with MP3 and MP3Pro files. However, the tagsets are an independent part of the MP3 file and should be usable elsewhere. In practice, the only other formats which widely uses ID3v2 tags are AIFF and WAV. In AIFF the tag is stored inside an IFF chunk named "ID3". Windows media ASF files (WMA, WMV) have their own tagging formats but also support ID3 Tags embedded as attributes.[24]

MP4 also allows the embedding of an ID3 tag.[25]

gollark: Yes, I am generally against killing people for having different political views.
gollark: PoliticalCompassMemes *says* that sort of thing, doesn't make it true.
gollark: I mean, that probably wouldn't work, but I'm not sure how you get "pedophilia" from "unregulated markets".
gollark: *All* of them? I doubt it.
gollark: Er, torture, that is.

See also

References

  1. "History - ID3.org".
  2. "Lyrics3 - ID3.org". id3.org. Retrieved 2018-04-13.
  3. "Lyrics3v2 - ID3.org". id3.org. Retrieved 2018-04-13.
  4. Practical Common Lisp, p. 335.
  5. "ID3v1 - ID3.org". id3.org. Retrieved 2018-04-12.
  6. For an implementation of ID3v1 in Python, see Dive Into Python, Chapter 5. Objects and Object-Orientation Archived 2013-08-31 at the Wayback Machine
  7. The track number is stored in the last two bytes of the comment field. If the comment is 29 or 30 characters long, no track number can be stored.
  8. "ID3 Tag Genre ID List". Archived from the original on 15 March 2015.
  9. "ID3 Genre List".
  10. "MP3 TAG & Enhanced TAG description (english)". 2012-03-10. Archived from the original on 2012-03-10. Retrieved 2018-04-12.
  11. "ID3v1.2".
  12. "d3v2.3.0 - ID3.org". id3.org. Retrieved 2018-04-13.
  13. "Contributors - ID3.org".
  14. "id3v2-00 - ID3.org".
  15. "ID3v2.4.0 Native Frames". Retrieved 2012-12-27.
  16. Nilsson, Martin. "ID3 Developer Information". ID3.org. Retrieved 9 April 2011.
  17. "ID3 tag version 2.3.0".
  18. "ID3 tag version 2.4.0 – Native Frames".
  19. Bright, Peter (28 October 2012). "Music and Video in Windows 8: a work in progress". arstechnica.com. Retrieved 2012-10-29.
  20. "Microsoft support community". 11 January 2011.
  21. Newell, C. (2 December 2005). "ID3v2 Chapter Frame Addendum". ID3.org. Retrieved 2008-02-06.
  22. "id3v2.3.0 - ID3.org".
  23. "TPE1 The 'Lead artist(s)/Lead performer(s)/Soloist(s)/Performing group' is used for the main artist(s). They are separated with the "/" character".
  24. "Windows Media Developer Center: ID3 Tag Support". Microsoft Developer Network. Microsoft. Retrieved 2010-03-24.
  25. "The 'MP4' Registration Authority". Archived from the original on 2012-08-26. Retrieved 2007-10-18.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.