Generate playlist (m3u, pls, qtl, asx, wax) for audio streaming servers (icecast / shoutcast).
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead of ChoiZ:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
generate.php
playlist.php
station.php

README.md

php-playlist-generator

Generate playlist files for audio streaming servers (i.e. Icecast or Shoutcast).

Formats supported:

  • M3U
  • PLS
  • QuickTime (qtl)
  • Windows Media Player (asx or wax)
  • XML Shareable Playlist Format (XSPF)

Web server configuration examples

Nginx

Example rewrite within a location. This will allow /example-stream.mp3.m3u to be translated to /playlist-generator/generate.php?stream=example-stream&format=m3u

   location ^~ / {
        rewrite ^/(\w+[-]\w+[-]\d+).(\w+).pls$ /playlist-generator/generate.php?stream=$1.$2&format=pls last;
        rewrite ^/(\w+[-]\w+[-]\d+).(\w+).m3u$ /playlist-generator/generate.php?stream=$1.$2&format=m3u last;
        rewrite ^/(\w+[-]\w+[-]\d+).(\w+).asx$ /playlist-generator/generate.php?stream=$1.$2&format=asx last;
        rewrite ^/(\w+[-]\w+[-]\d+).(\w+).xspf$ /playlist-generator/generate.php?stream=$1.$2&format=xspf last;
    }