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>
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