The motivation for PiFi Radio

PiFi Radio is a MPD web client focused on playing radio streamings. As I recently open sourced it, I’ll try to explain what made me write it.

The need

I started this project in early 2017. At that time, I wanted to setup a Raspberry Pi for my parents to listen to internet radio and control it with ease.

That Pi also served other purposes, so installing an audio dedicated distro, such as Volumio, wasn’t an option. I installed MPD on top of Raspbian and looked for a client. I needed:

  • A straight-forward user interface that wouldn’t confuse them. Few taps to the desired actions and little room to mistakes.
  • The interface should, at least, present a list of stations from which to pick, and allow to control the volume and stop the current playback.
  • The administrator should have the ability to set a list of streams and make it available to all users.
  • The client should be usable at least from iOS and Android phones, but ideally everywhere.
  • It should be in their native language.

What I found at that time was the following.

Available MPD clients at the time

There were many great MPD clients available on Android, desktop and web. The “forgotten” platform was iOS, for which there was only one (paid) app on the AppStore. This was not a big of an issue, as I could still set up a web client for those devices.

However, I couldn’t find a client that treated radios with much care. The majority of them privileged the music library, with streaming as a hacky, second class citizen (as you’ll see PiFi is the opposite).

The usual experience for radio listening

On most clients, to have a list of radio streams you need to create a playlist on the server and add the stations to it. Then, to choose a radio, the user has to find that playlist on the app and tap the desired streaming. This has many problems for me.

First of all, equating a list of radios to a playlist can be confusing to some users. Also, it has some unexpected behaviours. For example, if the user selects a station with a broken URL, MPD will start to play the next radio. So the user is confused: he asked for one station, but other one is playing. He will probably tap again and won’t understand why this continues to happen.

Other problem is that you usually can’t set a friendly name to the stream. The playlist is presented to the user as a series of URLs or some badly formatted info that the station broadcasted. So, when choosing the radio playlist, the user is presented a list consisting of (possibly giant and frightening) URLs, random song names and, when he is lucky, ugly formatted station names. The same lack of clarity happens when the user open the app to check what station is currently playing.

I also didn’t like that the playlists are editable by the users. This makes sense for song playlists, but I don’t expect them to mess with radio streaming URLs. I wanted this to be reserved to the backend.

One more issue is that, since those clients are focused on the library, someone who uses them just to play radio finds the interface far from straight-forward, actually rather confusing. Many MPD clients are packed with features related to the music library. The result is the screen filled with options that radio listeners don’t care about. This could be very frustrating to them, specially because the same clients lack basic behaviours that you would expect from a radio app. My parents would actually have to memorize steps just to play a station. Not good.

The most promising contenders were some desktop applications. A couple of them had radio lists conveniently fetched from web services such as Soma FM, TuneIn, Shoutcast, etc, and even some sort of local radio bookmarks. However, I wanted the same “favourites” list to be available across all users and devices, and those apps still had the issue of confusing names for the playing stations. Worst of all, desktop wasn’t my priority. So this couldn’t do it.

Finally, few applications were translated to the language I needed. This could be remediable, but at this point it didn’t matter anymore.


The bottom line: while there are tons of great MPD clients, you will hardly have a nice time using software for something it wasn’t designed. Most clients are focused on the MPD music library, and at that time I couldn’t find any that took streaming with care.

It was then obvious to me that I should create my own solution to my problem. I decided to code a simple web app and call it PiFi Radio, a MPD web client for listening to radio. You can see how it went on my Github.

All posts · Show comments