An internet radio player is one of the most practical and satisfying Raspberry Pi builds: plug it in, and it plays your favourite music streams continuously without needing a phone, laptop, or subscription app. Whether you want a minimalist headless audio box or a full-featured player with an OLED display, physical buttons, and a decent speaker, this guide covers all approaches — from a simple one-hour build to a polished weekend project.
Table of Contents
- Why Use a Raspberry Pi for Internet Radio?
- Hardware Options and Requirements
- Software Options: MPD, VLC, Pi MusicBox
- Basic Setup with MPD and mpc
- Adding an OLED Display and Physical Buttons
- Improving Audio Quality with a DAC HAT
- Autostart and Web-Based Control
- Frequently Asked Questions
Why Use a Raspberry Pi for Internet Radio?
Commercial internet radios exist, but they cost ₹4,000–15,000, support a limited set of stations, and often stop working when the manufacturer discontinues support. A Raspberry Pi-based radio plays any stream URL — BBC World Service, Radio Mirchi, Jazz FM, or a local college station — forever, because you control the software. It also costs less, can be upgraded, and serves as a platform for further tinkering.
Practical advantages of the Pi radio build:
- Unlimited stations: Any M3U, PLS, or direct stream URL works
- No subscription: Free-to-air internet radio streams have no ongoing cost
- Offline music too: MPD plays local MP3/FLAC files from a USB drive
- Always on: The Pi idles at 2–3W — cheaper to run 24/7 than leaving a laptop on
- Expandable: Add Spotify, Bluetooth audio, or a home assistant integration later
Hardware Options and Requirements
Option 1: Minimal Headless Build (Simplest)
- Raspberry Pi Zero 2 W (or Pi 3B/4)
- MicroSD card (8GB or larger)
- USB audio adapter (₹200–500) or USB DAC
- Active speakers or bookshelf speakers with amplifier
Option 2: Display + Buttons Build (Recommended)
- Raspberry Pi 4 or Pi 5 (any RAM)
- MicroSD card 16GB+
- I2C OLED display (128×64, SSD1306 controller) for station name and track info
- 3–5 tactile pushbuttons (next/prev station, volume up/down, play/pause)
- USB audio adapter or I2S DAC HAT for better audio
Option 3: Full Hi-Fi Build
- Raspberry Pi 4/5
- HiFiBerry DAC+ or IQAudio DAC HAT (I2S, 24-bit/192kHz)
- 2.1 amplifier board or powered speakers
- Colour TFT LCD for album art and station info
- Rotary encoder for volume control
Software Options: MPD, VLC, Pi MusicBox
MPD (Music Player Daemon) — Recommended
MPD is a headless audio server that runs in the background and is controlled via the mpc CLI tool or any MPD-compatible client app (MALP on Android, M.A.L.P., ncmpcpp on terminal). It handles internet streams, local files, and playlists. It’s lightweight (30MB RAM), extremely stable, and restarts cleanly after power cuts.
VLC — Quick and Easy
VLC handles virtually any stream URL from the command line with no configuration. Best for a one-off proof of concept or when you just want something playing in 5 minutes: cvlc --no-video http://stream.url. Not ideal for production use as it lacks station management and remote control features.
Pi MusicBox — Feature-Rich All-in-One
Pi MusicBox is a pre-built Raspberry Pi image that installs MPD, Mopidy (Spotify/SoundCloud plugins), a web UI, and Airplay/DLNA support. It’s the fastest way to a fully featured music server. Drawback: the project has limited recent updates, so it runs best on older Pi models.
Mopidy — Modern Alternative
Mopidy is a Python MPD server with plugins for Spotify, YouTube, SoundCloud, and internet radio streams. The mopidy-iris web frontend gives a polished Material Design UI accessible from any browser on your network. More setup required than Pi MusicBox, but actively maintained.
Basic Setup with MPD and mpc
Step 1: Install MPD and mpc
sudo apt update
sudo apt install -y mpd mpc
Step 2: Configure MPD
Edit the MPD configuration file:
sudo nano /etc/mpd.conf
Key settings to set or verify:
# Music and playlist directories
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
# Audio output — use ALSA for built-in/USB audio
audio_output {
type "alsa"
name "ALSA Output"
device "hw:1,0" # hw:0,0 for onboard, hw:1,0 for USB audio
}
# Allow network connections (for mpc from other devices)
bind_to_address "any"
port "6600"
Step 3: Add Radio Stations as Playlist Files
Create M3U playlist files in the playlists directory:
sudo tee /var/lib/mpd/playlists/bbc-worldservice.m3u <<EOF
#EXTM3U
#EXTINF:-1,BBC World Service
http://stream.live.vc.bbcmedia.co.uk/bbc_world_service
EOF
sudo tee /var/lib/mpd/playlists/radio-mirchi.m3u <<EOF
#EXTM3U
#EXTINF:-1,Radio Mirchi 98.3
https://radio-streams.zbotic.in/radiomirchi # use actual stream URL
EOF
Step 4: Start and Control MPD
sudo systemctl enable mpd
sudo systemctl start mpd
# Load and play a station
mpc load bbc-worldservice
mpc play
# Volume control
mpc volume 70
# Stop
mpc stop
Adding an OLED Display and Physical Buttons
A small OLED display showing the current station and track makes the radio far more user-friendly. Connect a 128×64 I2C OLED to the Pi’s I2C pins:
| OLED Pin | Raspberry Pi GPIO |
|---|---|
| VCC | Pin 1 (3.3V) |
| GND | Pin 9 (GND) |
| SDA | Pin 3 (GPIO2) |
| SCL | Pin 5 (GPIO3) |
Enable I2C via sudo raspi-config → Interface Options → I2C. Then install the Python display library:
pip3 install luma.oled
For physical buttons, connect them between GPIO pins and GND (use internal pull-up resistors in software). A simple Python script using RPi.GPIO or gpiozero reads button presses and calls mpc commands:
from gpiozero import Button
import subprocess
btn_next = Button(17, pull_up=True)
btn_prev = Button(27, pull_up=True)
btn_vol_up = Button(22, pull_up=True)
btn_vol_down = Button(23, pull_up=True)
btn_next.when_pressed = lambda: subprocess.run(['mpc', 'next'])
btn_prev.when_pressed = lambda: subprocess.run(['mpc', 'prev'])
btn_vol_up.when_pressed = lambda: subprocess.run(['mpc', 'volume', '+5'])
btn_vol_down.when_pressed = lambda: subprocess.run(['mpc', 'volume', '-5'])
Improving Audio Quality with a DAC HAT
The Raspberry Pi’s built-in 3.5mm audio output is serviceable but not hi-fi — it uses a PWM-based DAC with audible background noise. For serious listening, a proper I2S DAC HAT bypasses the onboard audio entirely and routes digital audio directly to the DAC chip.
Popular I2S DAC options in India:
- HiFiBerry DAC+: PCM5122 chip, 24-bit/192kHz, excellent audio quality
- IQAudio Pi-DAC+: TI PCM5242 chip, balanced output option
- Generic PCM5102A board: Budget-friendly I2S DAC available from electronics suppliers
To configure a PCM5102A I2S DAC, add to /boot/firmware/config.txt:
dtoverlay=hifiberry-dac
dtparam=audio=off
Then in /etc/mpd.conf, change the device to hw:0,0 (the DAC becomes the first audio device when onboard audio is disabled).
Autostart and Web-Based Control
Autostart MPD on Boot
MPD is already enabled as a systemd service after sudo systemctl enable mpd. To auto-play a specific station on boot, add a script to /etc/rc.local:
sleep 5 # Wait for MPD to start
mpc clear
mpc load bbc-worldservice
mpc play
mpc volume 65
Web Control with ympd
ympd is a lightweight web interface for MPD that requires zero dependencies — it’s a single binary serving a responsive HTML5 UI on port 8080:
sudo apt install ympd
sudo systemctl enable ympd
sudo systemctl start ympd
Access http://RADIO_IP:8080 from any browser on your network to browse stations, control playback, and adjust volume from your phone.
Finding Stream URLs
RadioBrowser API (api.radio-browser.info) provides a free database of 30,000+ internet radio streams. Query it by country, language, or genre to get stream URLs. Indian stations like All India Radio, Radio Mirchi, and Big FM have multiple streams available. Always test a stream URL with VLC or curl before adding it to MPD.
Shop Raspberry Pi and Audio Project Parts at Zbotic.in
Frequently Asked Questions
Which Raspberry Pi model is best for an internet radio?
The Raspberry Pi Zero 2 W is the most power-efficient choice for a headless radio (1.3W idle) and works perfectly with MPD. If you want a display, buttons, and a web UI, the Pi 4 or Pi 5 offers faster boot times and smoother multi-tasking. The Pi 3B+ is a good middle ground if you have one already.
Can I play Spotify on a Raspberry Pi internet radio?
Yes — the easiest method is Mopidy with the mopidy-spotify plugin, which requires a Spotify Premium account. Alternatively, raspotify turns your Pi into a Spotify Connect receiver (appears as a speaker in the Spotify app on your phone). Both work well on Pi 4 and newer.
Can I use Bluetooth speakers instead of wired speakers?
Yes — pair a Bluetooth speaker using bluetoothctl and set it as the ALSA output device. The pairing can be made persistent across reboots with bluetoothd --compat and an autoconnect service. Note that Bluetooth audio introduces 100–300ms latency, which doesn’t matter for radio but may affect synchronised audio setups.
How do I find good internet radio stream URLs for Indian stations?
Visit www.radio-browser.info and search by country (India) or genre. All India Radio streams are available at http://aod.sndtest.prasar-bharati.gov.in/. For commercial stations, their official apps often contain stream URLs that can be extracted using a proxy tool or by checking network traffic in a browser’s developer tools.
Does the radio keep playing if Wi-Fi briefly disconnects?
MPD will stop playback when the stream drops and won’t automatically reconnect. To handle this, add a watchdog script that runs every 30 seconds via cron and restarts the stream if MPD is in stopped state. Alternatively, restart_on_error in newer MPD versions handles this automatically. A wired Ethernet connection is recommended for truly always-on radio builds.
Add comment