Raspberry Pi as headless audio player
Posted: Tue Dec 26, 2017 3:58 am
HowTo setup a raspberry pi (v2) as a headless audio playback device in the LAN:
1) Install Raspbian Stretch image on Raspberry Pi
2) Install Network Time Protocol daemon (ntpd):
In order to make sure that the time on the RPi is correct, install the NTP daemon:
3) Install MPD:
"mpc" is the default reference client used to interact with the MPD on the commandline.
4) Configure "/etc/mpd.conf":
5) Tell MPD to initialize its music database:
NOTE:
I ran into massive issues with MPD being completely unreliable when using pulseaudio
Unfortunately, I would like to keep pulseaudio installed so I can playback from other machines (using module-native-protocol-tcp).
However, even if I remove the "audio_output{}" block for pulse, it still spawns pulseaudio...
Will try to figure out how to run it without pulseaudio (plain, classic ALSA-only), as this should be usable then.
Great thanks to the following sources:
1) Install Raspbian Stretch image on Raspberry Pi
2) Install Network Time Protocol daemon (ntpd):
In order to make sure that the time on the RPi is correct, install the NTP daemon:
Code: Select all
$ sudo apt-get install ntp
Code: Select all
$ sudo apt-get install mpd mpc
4) Configure "/etc/mpd.conf":
Code: Select all
music_directory "smb://your_lan_server/sharename/music"
bind_to_address "any"
# Search for this section and change the following parameters:
audio_output {
type "alsa"
...
mixer_type "software"
...
}
neighbors {
plugin "smbclient"
}
Code: Select all
$ mpc update
NOTE:
I ran into massive issues with MPD being completely unreliable when using pulseaudio
Unfortunately, I would like to keep pulseaudio installed so I can playback from other machines (using module-native-protocol-tcp).
However, even if I remove the "audio_output{}" block for pulse, it still spawns pulseaudio...
Will try to figure out how to run it without pulseaudio (plain, classic ALSA-only), as this should be usable then.
Great thanks to the following sources:
- Raspberry Pi network audio player: pulseaudio, DLNA and bluetooth A2DP – part 1: pulseaudio
- Setting up a headless Raspberry Pi as a Music Player Daemon server
- Music in all rooms: the networked audio home
- Sending an audio stream across the network to a remote Raspberry Pi with Pulseaudio, the easy way
- MPD + NCMPC = Music Nirvana For Command Line Folks
- Music Player Daemon (Archlinux Wiki)