A .wpl file is XML built from a small part of SMIL. Microsoft defines
thirteen elements in its
Windows Media Playlist Elements Reference,
all requiring Windows Media Player 9 Series or later. This page covers the seven that
every playlist uses. The six that define a dynamic playlist are on
Smart playlists.
Overall shape
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player -- 12.0"/>
<meta name="Author" content="Frank Lee"/>
<title>Party Playlist</title>
</head>
<body>
<seq>
<media src="..\Music\First Song.wma"
cid="{ABCDEFAB-ABCD-1234-ABCD-ABCDEF000000}"
tid="{12345678-1234-ABCD-ABCD-123456ABCDEF}"/>
<media src="..\Music\Second Song.mp3"/>
</seq>
</body>
</smil>
The elements nest strictly: smil holds head and
body; head holds title and meta;
body holds seq; seq holds media
elements for a static playlist or a smartPlaylist for a dynamic one.
The first line is the processing instruction
<?wpl version="1.0"?>, which is what marks the file as a Windows
Media playlist rather than general SMIL. It is not defined by the reference beyond
its use in the examples, and 1.0 is the only version Microsoft shows.
Encoding and identification
| Property | Value |
|---|---|
| Extension | .wpl |
| Media type | application/vnd.ms-wpl, registered with IANA in the vendor tree |
| Encoding | Text in XML rules, registered as UTF-8 |
| Magic number | None registered. In practice, look for <?wpl at the start and <smil> as the root. |
| Case | Microsoft’s pages do not say whether names are case-sensitive. Its examples write names in camel case but vary inside themselves: the head example writes CONTENT where the meta page writes content, and the argument names appear as condition and Condition. VLC compares names without regard to case; Kodi’s XML parser does not; real files write ItemCount (Windows Media Player) and itemCount (Zune). A reader should accept any case, as this site’s does, and a writer should use the spellings of the reference. |
Because the file is XML, the characters &, < and
quote marks inside an attribute must be escaped.
smil
The root element. Every playlist must have it. No attributes. Children:
head, body. It does not use a namespace.
head
Metadata for the whole playlist. No attributes. Parent: smil. Children:
title, meta; typically one title and one or
more meta elements.
title
The playlist’s title, as text. No attributes and no children. Parent:
head. Microsoft suggests basing it on the logic of the playlist’s
argument elements if the list is dynamic.
meta
One item of metadata for the whole playlist. Parent: head. No
children. There can be any number of these.
| Attribute | Value | Meaning |
|---|---|---|
name | any string | The name of the item. |
content | string | Its value, for example Rock for Genre. |
A playlist can use any name. Microsoft lists these as typical:
| Name | Holds |
|---|---|
Author | Who made the playlist |
Category | A category, such as Party Music |
Genre | A genre, such as Pop |
UserName | A user; Microsoft’s example uses the numbered form UserName1 |
UserRating | A rating by that user; numbered UserRating1 in the example, with the value 82 |
Generator | The program that wrote the file |
Real files carry names outside this list. Microsoft does not document them; what the files and open players show is below, each with its source.
| Name | What is seen | Source |
|---|---|---|
ItemCount | The number of items (the sample on docs.fileformat.com has 3 items and 3; the Zune file below has 20 items and 20); Strawberry writes it as the count of its songs | fileformat.com sample, forum-posted Zune file, Strawberry source |
TotalDuration | A whole number: 1102 in the fileformat.com sample, 4400 for 20 items in the Zune file, so seconds (4400 is 73 minutes for 20 songs); VLC reads it as a number and shows it as “Total duration” | fileformat.com sample, forum-posted Zune file, VLC wpl.c |
AverageRating | A whole number (33 in the fileformat.com sample, 0 in the Zune file) | same two files |
Author, Genre, Rating | VLC reads these three, besides TotalDuration, and ignores every other meta name | VLC wpl.c |
Generator | The program and version, for example Microsoft Windows Media Player -- 10.0.0.3646 (Kodi), Zune -- 4.2.202.0 | Kodi PlayListWPL.cpp, Zune file |
creatorId | A GUID, all zeros in the Zune file | forum-posted Zune file |
The Zune file (extension .zpl, first line <?zpl version="2.0"?>)
uses the same elements and lower-case names (itemCount,
totalDuration, averageRating, generator), and adds
feedUrl and guid elements in head. Kodi’s sample and the
fileformat.com sample (generator “Microsoft Windows Media Player -- 11.0.5721.5145”) both
have an empty author element in head, next to title; that sample’s third
media has a tid only. VLC opens .zpl files with the
WPL reader. None of this is in Microsoft’s reference, so it is described here as observed.
No source states the unit of TotalDuration; the two real files fix it as
seconds, because 1102 for three organ works and 4400 for twenty songs would be about
a second and about four seconds an item in milliseconds.
body
Holds the content of the playlist. No attributes. Parent: smil. Child:
seq. Typically one seq.
seq
The playlist itself. No attributes. Parent: body. Children:
media, smartPlaylist. A seq holding only
media is a static playlist; one holding a smartPlaylist is
dynamic.
media
One item in the playlist, played in file order. Parent: seq. No
children.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
src | yes | URL | The media item: a URL, an absolute path or a path relative to the playlist, usually with backslashes on Windows. |
cid | no | WPL_GUID | Content ID, unique to the media item. The Player fills this in so that it can recognise the same content on another computer even if its metadata changes. |
tid | no | WPL_GUID | Tracking ID, tied to the file system object. The Player uses it to repair the path when the file is renamed or moved. |
Microsoft’s example GUIDs for cid and tid are written
without braces and contain letters beyond hexadecimal, so they are placeholders.
Real values are ordinary GUIDs in braces (as in the samples posted on
docs.fileformat.com). The media element in Microsoft’s
reference has only these three attributes. Real files written by Windows Media Player and
Zune carry more, which Microsoft does not document:
| Attribute | What is seen |
|---|---|
albumTitle, albumArtist, trackTitle, trackArtist | Text, the album and track names and artists; media src="C:\Music\MyFolder\SongNameA.mp3" albumTitle="Album A" albumArtist="Artist A" trackTitle="Song Name A" trackArtist="Artist A" in a file posted on Microsoft’s own Q&A site, and the same attributes in a Zune file |
duration | A whole number: 124798, 126923 and 220296 on that site, 181106, 214831, 236285 and 263407 in the Zune file; the values sit beside song titles of two to four minutes (in seconds they would be over 34 hours), so the unit is milliseconds. No source states it; this is read from the real files |
serviceId | A GUID in braces, in the Zune file (Zune subscription tracks) |
trackNum | A track number inside a file; written by Strawberry, not read by VLC or Kodi |
VLC and Kodi read only src of a media element. This site’s viewer
lists these attributes in the Playlist tab, labelled as not part of the reference.