Adding an Internet radio stream (such as RadioFreeFedi) to mpd
I am using mpd
, running on an Intel NUC, connected to some old speakers, for playing music in my office, controlled by ncmpcpp
on my laptop, or an app on my phone.
This means I can easily control and play music from my own media library, but I’ve only just got around to looking at playing Internet radio streams this way.
Fortunately, it is easy.
On the machine running mpd
, go to the playlists directory. For me, this was /var/lib/mpd/playlists
, but you can check your path in your config file (in my case, /etc/mpd.conf
).
If your Internet radio station offers a .m3u file, just copy it here.
If it does not - for example, RadioFreeFedi, which I used to test this, and which only offers .mp3 or .xspf files - you’ll need to create your own.
This is easy - just put the URL of that file into a file with a .m3u extension.
For example:
echo "http://relay.radiofreefedi.net/listen/rff/rff.mp3" > /var/lib/mpd/playlists/RadioFreeFedi.m3u
I needed to restart ncmpcpp
before it would show in the playlists tab (5), but I did not need to restart mpd
.
In the ncmpcpp
interface, this shows up as the file name, rff.mp3
. Functional, but not attractive.
If you want to make it a bit nicer, you can do more with the .m3u file:
#EXTM3U
#EXTINF:-1, RadioFreeFedi - Main
http://relay.radiofreefedi.net/listen/rff/rff.mp3
#EXTINF:-1, RadioFreeFedi - Comfy
http://relay.radiofreefedi.net/listen/comfy/comfy.mp3
This now includes both of the RadioFreeFedi streams, and they show up as “RadioFreeFedi - Main” and “RadioFreeFedi - Comfy” in the ncmpcpp
interface.
You may also like:
- Getting the Sierra Wireless EM7455 LTE modem working in a ThinkPad with Debian 12 Linux (with GPS)
- Fixing dropbear-initramfs '/scripts/init-premount/dropbear: cat: not found' error
- Keeping bash history in sync using atuin and a self-hosted sync server
- Keyboard shortcut for adding random albums to the playlist in ncmpcpp
- This is a test post
- Fixing Mastodon 'Error processing thumbnail for uploaded media' video uploading
- Upgrading the glitch-soc fork of Mastodon
- Very, very initial thoughts of the Xreal Air 2 Pro glasses and Debian 12
- Using Bitwarden as an AppImage on Debian with GNOME
- A web UI for label creation and printing on a Brother QL-710W on Linux
- Getting a Brother QL-710W label printer working via CUPS on Debian
- Desktop Linux: the software I'm currently using
- Fixing apt yarn key deprecation warning in Debian 12
- Making my ThinkPad LED flash 'decoded.legal' in morse code
- Fixing SOGO error NSDataMalloc(instance) does not recognize stringByTrimmingSpaces