Introduction
XSPF, pronounced “spiff”, is an open XML playlist format from the Xiph.Org Foundation, published in the mid-2000s. It was designed to be shared between programs and people: besides each track’s location it can carry the title, creator, album and duration, so a player can try to find the same song elsewhere when the file path does not work. VLC uses it to save its own playlists.
Structure
The root element is playlist with version="1" and the
namespace http://xspf.org/ns/0/. It may hold a playlist title and creator,
then a trackList of track elements. Each track can give a
location (a URI), title, creator,
album, trackNum and duration in
milliseconds.
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>file:///music/first-song.flac</location>
<title>First Song</title>
<creator>Artist Name</creator>
<duration>215000</duration>
</track>
</trackList>
</playlist>
The reference pages cover the playlist element, the track element and the processing rules for players and generators.
Not described
These pages follow version 1 of the XSPF specification at xspf.org, read in full. The explorer has no XSPF viewer.
Known, not yet covered
- Reference: the media type
application/xspf+xmlwas not confirmed on a page read for this reference. - Viewer: there is no XSPF plugin.
Unknown
- Reference: the specification contradicts itself on
trackNum(greater than zero, or a non-negative integer); the page says so.
Links
Software
- VLC media player – free player for almost any audio or video file, which opens and saves XSPF playlists (Windows, macOS, Linux, mobile)
- Audacious – free, lightweight music player (Windows, Linux)
Reference
- xspf.org – the XSPF specification