Liquidsoap supports various playlists formats. Those formats can be used for
input.http streams and manually using
Most supported playlists format are strict, which means that the decoder can be sure that is has found a correct playlist for that format. Some other format, such as
m3u, however, may cause false positive detections.
All formats are identified by their mime-type or content-type. Supported formats are the following:
- Text formats: *
audio/x-scpls: PLS format, strict
- Xml formats: *
audio/x-ms-asx: ASX, strict
Playlist files are parsed automatically when used in a
input.http operator. Each of these two operators has specific options to specify how to pick up a track from the playlist, e.g. pick a random track, the first one etc.
Additionally, you can also manually parse and process a playlist using
request.resolve and some programming magic. You can check the code source for
playlist.reloadable in our standard library for a detailed example.
Special case: CUE format
The CUE format originates from CD burning programs. They describe the set of tracks of a whole CD and are accompanied by a single file containing audio data for the whole CD.
This playlist format can be used in liquidsoap, using a
cue_cut operator. By default, the CUE playlist parser will add metadata from cue-in and cue-out points for each track described in the playlist, which you can then pass to
cue_cut to play each track of the playlist. Something like:
The metadata added for cue-in and cue-out positions can be customized using the following configuration keys: