In my case Volumio is at 192.168.0.70 adjust ip addresses as reuired for your system.
volumio-ip.local:9000 etc
final product, open VLC / open media / network stream and enter 192.168.0.70:9000/volumio.ogg
Volumio Pi 4 ? Icecast Streaming Setup
Objective
Replace Volumio's native stream:
Plain Text
http://IP:8000
with a proper Icecast mount:
Plain Text
http://IP:9000/volumio.ogg
Benefits observed during testing:
Plain Text
? VLC survives track changes
? VLC survives station changes
? Icecast maintains a persistent mount point
? Configuration survives Volumio reboots
Architecture
Plain Text
Volumio
?
?
MPD (Shout Output)
?
?
Icecast2
?
?
http://IP:9000/volumio.ogg
?
?? VLC
?? Browser
?? Kodi
?? Network Audio Players
Step 1 - Install Icecast
Shell
sudo apt update
sudo apt install icecast2
Step 2 - Configure Icecast
Edit:
Shell
sudo nano /etc/icecast2/icecast.xml
Change Listening Port
Locate:
XML
<port>8000</port>
Change to: "Reasoning" - if/ you may have setup a volumio stream prior to this on port 8000 - refer Volumio Streaming page.
XML
<port>9000</port>
Configure Authentication
Use:
XML
<authentication>
<source-password>volumio</source-password>
<relay-password>volumio</relay-password>
<admin-user>admin</admin-user>
<admin-password>admin123</admin-password>
</authentication>
Restart Icecast
Shell
sudo systemctl restart icecast2
Verify Icecast
Shell
sudo ss -tulpn | grep icecast
Expected:
Plain Text
0.0.0.0:9000
Step 3 - Backup Volumio MPD Template
Volumio rebuilds:
Shell
/etc/mpd.conf
from:
Shell
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
Never edit /etc/mpd.conf directly.
Create a backup:
Shell
sudo cp \
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl \
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl.bak
Step 4 - Edit MPD Template
Open:
Shell
sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
Locate the existing HTTP block:
Apache Config
audio_output {
type "httpd"
name "HTTP Stream"
encoder "vorbis"
port "8000"
bitrate "320"
format "44100:16:2"
}
Immediately underneath add:
Apache Config
audio_output {
type "shout"
name "Icecast Stream"
host "127.0.0.1"
port "9000"
protocol "icecast2"
mount "/volumio.ogg"
password "volumio"
encoder "vorbis"
bitrate "320"
format "44100:16:2"
}
Save the file.
Step 5 - Restart Volumio
Shell
sudo systemctl restart volumio
or
Shell
sudo reboot
Step 6 - Verify Source Connection
Open Icecast status:
Plain Text
http://YOUR-IP:9000/status.xsl
Expected:
Plain Text
Sources: 1
and
Plain Text
Mount Point: /volumio.ogg
If Sources remains:
Plain Text
0
then MPD is not connecting to Icecast.
Step 7 - Stream URL
Use:
Plain Text
http://YOUR-IP:9000/volumio.ogg
Examples:
Plain Text
http://192.168.0.70:9000/volumio.ogg
Testing Results
Native Volumio Stream
Plain Text
http://192.168.0.70:8000
Observed:
Plain Text
Change track
?
Client disconnects
Change station
?
Client disconnects
Icecast Stream
Plain Text
http://192.168.0.70:9000/volumio.ogg
Observed:
Plain Text
Change track
?
Brief pause
?
Playback continues
Change station
?
Brief pause
?
Playback continues in VLC
Rollback Procedure "If Required"
Restore original template:
Shell
sudo cp \
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl.bak \
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
Restart Volumio:
Shell
sudo systemctl restart volumio
If you wish to Remove Icecast:
Shell
sudo apt purge icecast2
sudo apt autoremove
Critical Lesson Learned
Do not edit:
Shell
/etc/mpd.conf
Volumio automatically regenerates this file.
Always edit:
Shell
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl
This was the key discovery that made the Icecast solution work.
Results in testing realtime:--
Results
VLC
- Successfully reconnects during song changes.
- Successfully reconnects during station changes.
- Recommended client.
Web Browsers
- Large buffer may mask source changes.
- Can eventually stop when the buffer empties.
- Behaviour varies by browser.
moOde Audio Player connected to the radio stream ( create new radio station / add:- http://192.168.0.70:9000/volumio.ogg
- Receives Icecast stream correctly.
- Stops playback when source interruption occurs.
- Appears to treat interruption as end-of-stream.
