Skip to content

MPD MPC

Orlin edited this page Apr 1, 2017 · 15 revisions

MPD/MPC

see The ultimate MPD guide by ivanovnegro

sudo apt-get install mpd

sudo apt-get install mpc

sudo service mpd stop

todo: make it permanent (at /etc/rc.local)

sudo update-rc.d mpd disable

sudo update-rc.d -f mpd remove

mkdir -p ~/.mpd/playlists

touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpd.state}

gunzip -c /usr/share/doc/mpd/examples/mpdconf.example.gz > ~/.mpd/mpd.conf

nano .mpd/mpd.conf

music_directory        "/mnt/usb/music"
playlist_directory     "/home/pi/.mpd/playlists"
db_file                "/home/pi/.mpd/mpd.db"
log_file               "/home/pi/.mpd/mpd.log"
pid_file               "/home/pi/.mpd/mpd.pid"
state_file             "/home/pi/.mpd/mpd.state"
....
audio_output {
	type            "alsa"
	name            "My ALSA Device"
	device          "hw:0,0"        # optional
	mixer_type      "hardware"      # optional
##	mixer_device    "default"       # optional
##	mixer_control   "PCM"           # optional
##	mixer_index     "0"             # optional
}

Play

sudo service mpd stop

mpd /home/pi/.mpd/mpd.conf

mpc update

mpc clear

mpc ls

mpc listall "directory 1" | mpc add

mpc volume 100

mpc play

Clone this wiki locally