PLS has no official specification. It is an INI-style text file whose rules were worked out from what players write and accept, recorded in an unofficial description and in Lucas Gonze’s survey of playlist formats. This page gives that shared understanding and marks what remains unknown.
Layout
[playlist]
File1=https://radio.example.com/stream
Title1=Example Radio
Length1=-1
File2=Music/First Song.mp3
Title2=Artist Name - First Song
Length2=215
NumberOfEntries=2
Version=2
The file begins with a section header. The entries follow as numbered
key=value lines, with the two summary keys at the end. Each
value runs to the end of the line.
Keys
| Key | Required | Value | Meaning |
|---|---|---|---|
[playlist] | yes | a section header | Marks the file as a playlist. Gonze’s survey shows the capitalised form [Playlist], and mpv matches it without regard to case. |
FileN | yes | path or URL | The location of entry N. A local path, an absolute path, a path with environment variables, or a URL. It may point to another playlist. |
TitleN | no | text | A title for entry N. If the file has its own title in its metadata, some players show that instead. |
LengthN | no | integer | The length of entry N in seconds. -1 means indefinite, as for a stream. |
NumberOfEntries | yes | integer | How many entries there are. It equals the number used for the last entry. |
Version | yes | 2 | The playlist version. 2 is the only valid value. |
Numbering and matching
- Entry numbers begin at 1 and are the link between a
Fileand itsTitleandLength. - Wikipedia’s description says the format is case-sensitive. Players are more relaxed
than that. mpv matches the section and the
Filekey without regard to case and strips quotes around the value. A careful reader should accept either; a careful writer should use the capitalisation above. - mpv ignores
TitleandLength. Other players use them for display, and a player may also read a title from the file itself.
Paths and portability
Windows and Unix-like systems differ in path separators (\ and
/), drive letters and environment variables, so a playlist with absolute
paths, or paths outside the playlist’s folder, works on only one kind of system. URLs
work on all of them.
Identification and encoding
| Property | Value |
|---|---|
| Extension | .pls |
| Media type | audio/x-scpls |
| Recognising a file | A first line of [playlist], in any case |
| Text encoding | Not specified anywhere. Files follow whatever the writing program used. |
| Line endings | Not specified. |
Some history is uncertain too. Wikipedia credits the format to the museArc player by codeArts, with later use by SHOUTcast and Icecast; that part of the article is flagged as lacking citations. The two unofficial descriptions it cites date from 2001 and 2010–2012.