Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to add ShoutCast Radio Directory as a playlist (sort of...) (Read 5246 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to add ShoutCast Radio Directory as a playlist (sort of...)

As a very old user of foobar2000, it always bothered me, that there isn't a plugin to load ShoutCast into a playlist or something similar. So I've hacked together a script to generate a PLS playlist by using the ShoutCast API. Unfortunately the ShoutCast API doesn't tell you the direct stream URLs, only URLs to playlists, and foobar2000 won't load playlists linking to playlists. The script also can't go and fetch all the playlists, because there's a 1000 request limit for the API and 500 channels... Two refreshes would max it out. I solved this by providing a temporary URL which, when accessed by foobar2000, redirects to the actual stream URL.

To load the top 500 channels into foobar2000:
  • Create a new playlist, preferably name it "ShoutCast"
  • File -> Add location
  • [font= "Lucida Console"]http://lab.rolisoft.net/playlists/shoutcast.php?proxy=true[/font]
  • Enjoy.

The underlying ShoutCast API request URL can be customized. For example to request the top channels from a specific genre. See the link below. I created playlist generators for TuneIn, Soma FM, Digitally Imported/Sky.FM/JazzRadio, etc. Also, BBC's AAC+ streams have an expiring token, and it always bothered me, that I have to load the playlist from their URL to listen to a stream. Load the BBC playlist from the generator I wrote, and due to the URL redirector, your player will always get a fresh token, and the streams in your playlist will always work.

Documentation of the generator API

To clarify something: The [font= "Lucida Console"]proxy[/font] parameter won't proxy the streams, it'll only redirect your player to the actual stream URL.