This is Inside RadioTime, a website that gives Broadcasters, Developers, OEMs and Advertisers looking for the 411 on the RadioTime guide.

Streaming

Radio Streaming Cookbook

A guide to reliable audio streaming

Introduction

The internet has been a boon to radio. A listener can use a service like RadioTime to browse through tens of thousands of radio stations all over the world, listening to music, sports, news, and talk shows from stations of all sizes. Unfortunately this diversity becomes a nightmare for any developer trying to integrate internet radio into their device or application. That is because every station broadcasts their audio differently. Some use progressively downloaded MP3s, some WMA streamed over RTSP using UDP, some use PLS playlists, or ASX, or M3U, or they turn their streams off at night, or they use malformed XML, or they expect a certain user-agent, etc., etc.

Another reason for the complexity of integrating Internet radio is that most broadcasters have a “desktop-first” mindset that does not think of other devices. They are generally designing for Windows Media Player (WMP) and are often exploiting its specific features, such as looser support for malformed playlists and embedded web content. As a result, understanding Microsoft’s implementation is key to being able to stream many Internet radio stations. You may want to check out some of the Microsoft resources listed in Appendix A.

Here at RadioTime we have had to deal with all these issues, and many more. Over time, we’ve learned how to reliably stream the maximum number of radio stations out there. The purpose of this guide is to pass that knowledge on to you, the developer, so that you can avoid figuring these things out through trial-and-error.

This document gives an overview of the concepts necessary to understand audio streaming and describes the four major components of an audio stream: the playlist, the protocol, the container, and the codec. In each section, all known exceptions to the rules are noted, and solutions for dealing with them discussed. There are also some appendices that give you an overview of how common different technologies are in the radio streaming world, and how often various issues tend to appear. There is also information on licensing concerns and how to mitigate issues using the RadioTime API. Finally, there is some sample code given for parsing playlists.

Chapter 1: Playlist