Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Raspberry Pi

Raspberry Pi Internet Radio: Build an Always-On Music Player

Raspberry Pi Internet Radio: Build an Always-On Music Player

March 11, 2026 /Posted byJayesh Jain / 0

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
Recommended: Raspberry Pi Pico 2 — for an ultra-minimal internet radio using VS1053 codec shield and Pico 2’s dual-core RP2350, ideal when you want a microcontroller solution rather than a full Linux build.

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
Recommended: Waveshare 0.49inch OLED Display Module (64×32, I2C) — compact I2C OLED perfect for displaying the current station name on a small internet radio case without adding bulk.

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
Recommended: Raspberry Pi 5 Model 2GB RAM — 2GB is more than enough for an MPD-based internet radio. The Pi 5’s faster boot time means your radio is playing within 20 seconds of power-on.

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).

Recommended: 2.8 Inch Touch Display Module for Raspberry Pi Pico — for a Pico-based minimal radio, this touch display lets you select stations and control volume without any physical buttons.

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.

Tags: Audio Project, DIY speaker, internet radio, MPD, music player, Pi MusicBox, Raspberry Pi
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
RetroPie Setup Guide: Play Ret...
blog retropie setup guide play retro games on raspberry pi 595054
blog arduino sensor shield all in one expansion board guide 595057
Arduino Sensor Shield: All-in-...

Related posts

Svg%3E
Read more

Raspberry Pi Benchmarks: Performance Testing All Models

April 1, 2026 0
Table of Contents Introduction and Use Cases Hardware Requirements Software Installation Configuration and Setup Testing and Validation Advanced Features Troubleshooting... Continue reading
Svg%3E
Read more

Raspberry Pi PoE: Power Over Ethernet Setup Guide

April 1, 2026 0
Table of Contents Introduction and Use Cases Hardware Requirements Software Installation Configuration and Setup Testing and Validation Advanced Features Troubleshooting... Continue reading
Svg%3E
Read more

Raspberry Pi GSM HAT: SMS and Cellular IoT

April 1, 2026 0
Table of Contents Introduction and Use Cases Hardware Requirements Software Installation Configuration and Setup Testing and Validation Advanced Features Troubleshooting... Continue reading
Svg%3E
Read more

Raspberry Pi RS485: Industrial Sensor Network

April 1, 2026 0
Table of Contents Introduction and Use Cases Hardware Requirements Software Installation Configuration and Setup Testing and Validation Advanced Features Troubleshooting... Continue reading
Svg%3E
Read more

Raspberry Pi CAN Bus: Vehicle OBD2 Data Reader

April 1, 2026 0
Table of Contents Introduction and Use Cases Hardware Requirements Software Installation Configuration and Setup Testing and Validation Advanced Features Troubleshooting... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now