How internet radio works: streams, formats and finding stations
Tens of thousands of radio stations broadcast online, from national networks to a single enthusiast's room. Behind almost all of them are a few simple, open technologies. Here is how a station gets from a studio to your speakers.
From studio to stream
A radio studio produces a continuous audio signal: the presenter's microphone, the music, the adverts and the jingles mixed together. For FM, that signal goes to a transmitter. For the internet, it goes to an encoder, a program that compresses the audio into a format such as MP3 or AAC and sends it, without stopping, to a streaming server. Listeners connect to that server, and the server sends each of them a copy of the stream as it arrives.
Unlike a song on a streaming service, a live stream is not a file. It has no beginning and no end. When you connect, you join the broadcast at whatever moment it has reached, just like turning on a radio.
The two main kinds of stream
Icecast and SHOUTcast: one long download
Most stations use Icecast (free, open-source software) or SHOUTcast. To the listener, the stream looks like an endless audio file at an address such as https://stream.example.com/live.mp3. The player opens the connection and starts playing as soon as a little audio has arrived. This is simple and works in every browser and almost every device, which is why it has been the standard for over twenty years.
HLS: the stream in small pieces
Larger broadcasters increasingly use HLS (HTTP Live Streaming), the same technology used for live video. The stream is cut into short segments of a few seconds each, and a playlist file ending in .m3u8 lists the latest ones. The player keeps downloading the playlist and fetching new segments. HLS copes better with mobile networks and can offer several quality levels, but it adds a delay of ten to thirty seconds compared with FM.
Formats and quality
| Format | Typical bitrate | Notes |
|---|---|---|
| MP3 | 64 to 320 kbps | The most compatible. 128 kbps is the common default. |
| AAC / AAC+ | 32 to 128 kbps | Sounds better than MP3 at the same bitrate; AAC+ at 48 to 64 kbps is popular for mobile listening. |
| Ogg Vorbis / Opus | 48 to 192 kbps | Open formats, efficient, used mostly by community and enthusiast stations. |
The bitrate is how much data the stream uses per second. A 128 kbps stream uses about 58 MB an hour, which matters on a mobile data plan.
How a player knows the song title
Icecast and SHOUTcast streams can carry short text messages inside the audio, known as ICY metadata. Every few seconds the server slips in a line such as StreamTitle='Artist - Song';, and players that ask for it show the title. Not every station fills it in, and some put the station name or a slogan there instead. HLS streams can carry similar information in their segments.
Why some stations will not play in a browser
- Mixed content: a website loaded over https cannot play a stream served over plain http. Many older stations still only offer http streams.
- Geo-blocking: some broadcasters only stream to their own country because of music rights.
- Unsupported formats: HLS needs extra code in some browsers; a few stations use formats browsers do not play at all.
- Overloaded or offline servers: small stations run on small servers, which may have a listener limit or be switched off overnight.
How stations are found: open directories
There is no official worldwide list of online radio stations. The largest open one is Radio Browser, a community-run database with tens of thousands of stations, each with its stream address, country, language, tags and a record of whether it was working recently. Anyone can add or correct a station, and the data is free to use through a public API. Many radio apps are built on it.
Because it is community-maintained, the quality varies: some entries are out of date, some have the wrong country, and many streams stop working over time. Good apps check a stream before offering it and prefer stations that other listeners have recently played.
How Earshot uses this
Earshot picks its stations from Radio Browser every night. It keeps only stations with a known location that stream over https in a format every browser plays (MP3, AAC or Ogg) and that passed Radio Browser's most recent check. What you hear is the station's live broadcast at that moment. Then it is up to you to work out where it is. The guide on telling a station's country by ear covers the clues to listen for.
Common questions
Is listening to internet radio legal?
Yes. Stations stream on purpose so people can listen; they pay the music rights for their broadcasts. Recording and redistributing a stream is a different matter.
Why is online radio behind FM?
Encoding, the server and the player's buffer each add a few seconds. With HLS the delay can reach half a minute.
How much data does radio use?
At 128 kbps, about 58 MB per hour; at 64 kbps AAC+, about 29 MB.