Born out of necessity: why I built Radio 2.0

Radio 2.0

You know the moment. You press play on a station you love and get nothing: a spinner, then silence. Or the station plays, but the logo next to it is a blurry square that looks like it was photocopied ten times, or belongs to a name the station dropped years ago.

I have seen that moment more times than I can count. For a long time I thought it was just how internet radio works. It isn't. It is a problem with a fix, and this post is about where that fix came from.

Who I am #

I'm Wilkin Santana. I build software, most of it around audio and radio. The project closest to my heart is OndaCast, a web player where you can find and listen to live radio stations from all over the world, along with podcasts and audiobooks.

When you build a player like that, you don't carry one station. You carry tens of thousands of them, and every one is a promise to a listener: tap here and you will hear it.

The frustration #

I learned fast that those promises break all the time.

A station moves to a new streaming host. It changes a port, switches from MP3 to AAC, or rebuilds its website. The stream link everyone saved simply dies. Nobody tells the directories or the apps, and the station often doesn't even know which apps carry it. The listener gets silence and assumes the station went off the air.

Logos have the same problem. A station uploads a good logo to one directory. Another directory copies it and shrinks it. A third copies the copy, and an app picks it up from there. By the time it reaches a listener's phone it is a smudge, an old version, or sometimes another station's logo altogether.

This isn't any one group's fault. Station owners are frustrated because they can't control how they show up. Directories fix records by hand, one at a time, forever. Aggregators and app developers like me ship broken links to listeners and take the blame for them.

Everybody had a copy of the station. Nobody had the station itself.

The fix #

For OndaCast I needed one place where a station says who it is and how to hear it, a place the station owns. Not a directory, not an app: the station.

That is Radio 2.0. A station publishes one small JSON file, the manifest, on its own domain. In it the station gives its name, tagline, description, language, genres and location, and its branding: a logo of at least 512 by 512 pixels, an icon, a banner and a theme colour. Those are the originals, straight from the source, at the size they were meant to be.

It also lists the station's streams. Not one link, but a list: Opus at one bitrate, AAC at another, MP3 for older devices, an HLS playlist. Each one names its format and bitrate, one is marked as the default, and a player that can't play the default tries the next.

A stream that follows the station #

This is the part that fixed my dead links.

Every station has a permanent identity, its guid. It is created once, when the station first publishes, and never changes: not when the station changes servers, changes software or even renames itself. Players and directories follow the station by that guid, not by a stream URL. When a station moves its streams, it updates its manifest, and everyone who reads the manifest follows along. The link can't die, because the link was never the identity.

A player can find the manifest even when all it has is an old stream URL from some directory. The stream can answer with a header that points to the manifest, the station's website has a standard address for it, and its homepage can link to it. Three ways in, all leading back to the station.

The station stays in control #

A manifest only counts when the station's own homepage serves it or links to it. Whoever controls the station's website controls its manifest, not whoever reached a directory first. A station can also mark itself locked, which tells directories never to move it to a new owner automatically. The specification spells out how moves and claims work.

Nothing has to be thrown away. Icecast, SHOUTcast and ICY metadata keep working exactly as they do today. The manifest sits next to your streams, and older players never notice it.

The draft goes further, with live "now playing" events timed to when the listener actually hears a song, a schedule, contact details and a way for listeners to support a station directly, wallet to wallet. But the heart of it is simple: the station speaks for itself.

Why it became open source #

I built the first version for OndaCast, for my own problem. The more I worked on it, the clearer it became that it wasn't my problem alone. Every player, every directory and every station owner was fighting the same broken links and the same degraded logos. A fix that only works inside one app doesn't fix radio.

So we opened it up. The specification, the JSON Schemas, the examples and a reference validator and discovery tool written in Go are all MIT licensed, here at radio2.org and on GitHub.

It is a working draft, version 0.2.4, and nothing is set in stone yet. That is on purpose: a standard for radio should be shaped by the people who run radio.

Great projects are usually born out of our own necessity. You hit a wall, you get tired of hitting it, and you build a door. Then you find out how many other people were standing at the same wall.

Where to start #

All blog posts