TAGS IN DIGITAL MEDIA FORMATS
---------------------------------------------------------
CONTENTS:
Metadata Tags in Digital Media
Formats
What's a Metadata tag?
Why metadata tags are crucial
Types of Metadata tags
Tagging Tools
Next Time...
---------------------------------------------------------
Recently, a user on the Audiotron (a
digital media device) "help" forum posted the following query:
I have a question I am hoping someone
can help me out with.
All of my Grateful Dead songs in iTunes
have the Artist as
"Grateful Dead". But, in the AudioTron, the songs show up
under "Grateful Dead" and
"Gratefull Dead". A search in
iTunes for "Gratefull" shows
nothing. Does anyone have
any idea what may be going
on?
This question comes up at least
twice a week on that alias alone. Users
edit the artists' names over and over, but the changes don't show up in their
devices. They blame their device or
media player, but in reality the problem resides in their mp3 metadata tags. I
thought a general primer on the cause of this and related problems would be
useful to reviewers on this list. This
week I'll discuss what tags are and how they work, and next week I'll discuss
some tagging hassles, their causes, and solutions.
WHAT'S A METADATA TAG?
Metadata Tags (or more simply,
“Tags”) are packets of information that are included in an mp3 or wma file
along with the audio. Metadata (“data
about data”) includes artist name, song title, album title, genre, etc… about
the music in the file. Different file
formats use different tagging schemes, but the basic procedure when a CD is
ripped is always the same: the ripping tool creates a file “container” and puts
metadata into the tags. Then it
transcodes the music into either mp3 or wma format and adds the music to the
file.
Why tags are crucial
Tags make it possible to organize
and use media libraries. When a user scans their hard drive for new music files
using a media player or device, the player finds the files, reads the tags, and
constructs a media library index. After
that, instead of a flat list of thousands of files, users can then easily play
music from a particular genre, artist, or album. The same is true in a device -
the Audiotron, for example, reaches out across the network to find music files,
scans them, and builds a local index file.
My Nomad Zen does the same on its local hard drive as media is moved
onto it. Tags make all of this possible.
So even though most users have never
heard of them, tags are very important - so important that most enthusiast
users spend many hours "cleaning up" the tags in their media
libraries. But tags are only as good as the data they contain, and are also
only useful if everyone creates and reads them in the same way - and often
neither of these conditions is met. But
before I talk about that, let's talk about the major tags standards in more
detail.
TYPES OF TAGS
MP3 Tags - ID3v1 and ID3v2
The inventors of early digital media
formats didn't imagine users would have enough music to need tags. MP2 and later MP3 files initially didn't
include tags, but as users' media collections grew, an informal - and very
limited - tagging standard called ID3v1 (ID3 version 1) emerged. Because it was limited in size (ID3v1 used
fixed-length "padding space" at the end of an mp3 file) it included
only very basic information, and limited the fields to 30 characters. Initially, ID3v1 didn't even include track
numbers, so albums would be played in alphabetical or random order. An illustration of an id3v1 tag is shown
below in Figure 1.
Figure
1 – an ID3v1 footer

Subsequently, some folks defined
ID3v2, which allowed longer names, custom genres, and fixed some other nagging
problems. An ID3v2 tag is illustrated below
in Figure 2.
Figure 2 - An id3v2 Tag Header

The most recent ID3 version is
ID3v2.3 (for more information, see www.id3.org), and
further versions have been proposed.
A typical mp3 file includes *both*
id3v1 and id3v2 tags. Thus, the file
starts with an ID3v2, then the music data, and then ends with the id3v1. See http://www.caulton.org/mp3_tags.jpg
for the structure of a file shown in one of Microsoft’s internal testing tools
- first the ID3v2 tag, then the music data, and finally the ID3v1 tag.
Figure 3 - An mp3 file – first id3v2,
then the song, then id3v1 tag

Almost all digital media players and
devices that support MP3 audio also support some or all parts of the ID3
tagging scheme.
WMA tags
WMA files use the Advanced Systems
Format (ASF) file container, which includes a rich tagging scheme. Literally hundreds of types of metadata and
bitmaps are specified within the format.
See Figure 4 for an illustration of a WMA file in the MP9s Tag editor.
Most WMA-enabled media players use code from the Microsoft Format SDK to read
and write WMA tags, which simplifies development and reduces versioning
problems (more on that in my next mail) that plague ID3 tags. With the new ASF license and spec, it's easy
for ISVs to create WMA reading and writing tools appear on any platform. For
more details, see the ASF spec at http://www.microsoft.com/windows/windowsmedia/format/asfspec.aspx).
All devices that support WMA also support the ASF/WMA tag standard.
Figure 4 – WMA tag in the MP9s Tag
editor

TAGGING TOOLS
If tags were simple and the standards
were carefully followed, tagging tools would be unnecessary. Unfortunately, as we'll see in my next mail,
things are often not that simple. As a
result, there are tag editing tools for every purpose. I'll go into their use for solving various
problems later, but for now wanted to at least mention them.
The Windows XP Format SDK
Many people don't realize that
Windows XP includes the Windows Media Format SDK, which provides ID3 and WMA
tag reading and writing functions to the Windows Shell and ISVs. Thus, most media players and ID3 editors on
Windows need not reinvent the wheel by researching and interpreting the ID3 and
WMA specs and writing their own code. As
we'll see, Windows exposes this functionality to users in a number of useful
places.
The Windows XP file Properties dialog
The Windows XP file properties
dialog utilizes the Format SDK to read and write tags. Users can simply select a file, click
properties, and view/edit the tags in the file (Figure 5). This also enables bulk-editing for multiple
selections. I use this all the time for
quick-and-dirty changes to tags without booting up an editor or player while
I'm navigating through my media library.
Figure 5 – id3 tag editing in the
Windows XP Shell

Windows XP Shell "details" view
The shell uses the Format SDK to
allow users to view and sort based on nearly every detail about their files
right in the shell in the details view.
This view can be customized from a context menu from the column heading (Figure
6). Even more detail is accessible from the "more..." item on that menu
(Figure 7). I find this extremely useful
for sorting and filtering through files based on format, bitrate, album, etc...
right inside of the shell.
Figure 6 – Windows XP Shell
“Details” View

Figure 7 – “Details” View Customize
Dialog

Digital Media Players
Most digital media players include
at least rudimentary tagging tools (many also built on the Windows Format SDK),
and recently some have become quite powerful.
Windows Media Player 9 Series and MusicMatch both have nice ones that
are useful for both bulk and individual file editing. In MP9S, you access the through a context
menu in the media library (Figure 8), and can do bulk or individual editing of
over a hundred tag fields (Figure 9)
Figure 8 – Context Menu Access to the
Tag Editor

Figure 9 – Bulk Tag editing in MP9s

Power User Editors
Sadly, these are often needed by
most users for resolving complex tagging problems. My personal favorite is Tag&Rename, which
can edit WMA, ID3v1, and ID3v2 tags. There are many others. Beyond the functions offered by media
players, it also has very powerful tools for:
* Creating folder hierarchies based on tags
* automatically applying serial track numbers to files
* Case Correction of tag content (Title, lower, or upper)
* many other essential but geeky features.
I love these tools and use them
often, but wish they were unnecessary.
Single-Purpose Editors
Just for fun, I can't resist
mentioning one other class of tag tools, built by hobbyists. One example is Otter (http://otterbarn.tripod.com/), a
utility for organizing and tagging files from Old Time Radio shows. The program
actually includes a database of the dates and show titles of every episode of
hundreds of different radio shows from the 30's to the 60's. Point it at a directory full of OTR files,
and it parses the filenames to determine the title or date and classify the
show. Then it can fill in missing data,
rename the files, and advise collectors of what shows they're missing that are
known to be available. This sort of tool
is a tribute to the doggedness of some user communities and the importance of a
strong specialized developer community.
NEXT TIME...
I'll discuss the many hassles and
problems caused by missing tag data, inconsistent tag implementations, and the
"informal" nature of the ID3 specification. Then I'll show how to use the tools above to
resolve many of the most common ones.