
Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.
There are definitely hundreds of ways to use and set up mpd …
I am showing a variant here in which mpd runs as a user and is available as a stream via the local network.
install packages:
sudo pacman -S mpd mpc
mkdir ~/.config/mpd mkdir ~/.config/mpd/playlists
creating config –> nano ~/.config/mpd/mpd.conf
#See: /usr/share/doc/mpd/mpdconf.example
pid_file "~/.config/mpd/mpd.pid"
db_file "~/.config/mpd/mpd.db"
state_file "~/.config/mpd/mpdstate"
# replace with your path to playlist and music directory
playlist_directory "path to playlists"
music_directory "path to music"
auto_update "yes"
#pulseaudio
audio_output {
type "pulse"
name "pulse audio"
}
#local-stream
audio_output {
type "httpd"
name "MPD - Musik Stream Server"
encoder "lame" # optional
port "8000"
quality "5.0"
# do not define if bitrate is defined
#bitrate "128"
# do not define if quality is defined
format "44100:16:1"
always_on "yes"
# prevent MPD from disconnecting all listeners when playback is stopped.
tags "yes"
# httpd supports sending tags to listening streams.
}
now simple start the service as your user:
systemctl --user start mpd
this will be present till next reboot, to enable per default on every boot:
systemctl --user start --now mpd
Stream will be available from many devices and apps, calling it via url. EXAMPLE:
Inside your local network.
Creation of playlist and player input can be done with one of the available mpd player interfaces:
from terminal: nncmpp
graphical interfaces: Ario, Cantata, xfmpc
XFCE4 panel plugin: xfce4-mpc-plugin
More info:
Follow us