Raspberry Pi as headless audio player

Step-by-Step descriptions of how to do things.

Raspberry Pi as headless audio player

Postby peter_b » 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:
Code: Select all
$ sudo apt-get install ntp


3) Install MPD:
Code: Select all
$ sudo apt-get install mpd mpc

"mpc" is the default reference client used to interact with the MPD on the commandline.

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"
}


5) Tell MPD to initialize its music database:
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... :shock: :?
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:
  • 0

User avatar
peter_b
Chatterbox
 
Posts: 302
Joined: Tue Nov 12, 2013 2:05 am
Reputation: 3

Return to HowTo's

Who is online

Users browsing this forum: No registered users and 3 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: No registered users and 11 guests

Reputation System ©'