1
0
mirror of https://github.com/mbirth/wiki.git synced 2024-11-14 14:06:46 +00:00
wiki.mbirth.de/know-how/software/linux/_posts/2009-08-09-mpd.md

72 lines
2.1 KiB
Markdown

---
title: Music Player Daemon
layout: default
created: 2009-02-21 23:39:43 +0100
updated: 2009-08-09 00:31:02 +0200
toc: false
tags:
- know-how
- software
- linux
- audio
- music
- mpd
---
Instead of playing music through usual audio players, there is the possibility of using the *mpd* - a daemon which
runs in the background and plays music.
The great advantage is: You can choose between various interfaces and always control the same player with the same
playlist(s) - even via TCP/IP from another PC or even a portable device.
Installing the server
=====================
Install the package [mpd](apt://mpd). After that, edit the file `/etc/mpd.conf` and add the following lines, so that it
uses the PulseAudio daemon instead of ALSA:
~~~
audio_output {
type "pulse"
name "My PulseAudio Device"
}
~~~
This allows other sounds (e.g. from Gnome) to be played simultaneously.
You can then symlink your personal music folder to `/var/lib/mpd/music` or - if you are the only user - replace that
directory by the symlink directly.
PulseAudio rights
-----------------
You might encounter the problem that MPD seems playing a song but you don't hear anything at all. This might be a
problem with PulseAudio rights. Install the package [paprefs](apt://paprefs) and enable the *Enable Network Access*
and *Don't require authentication*. If these options are grayed out, do this:
* edit the file `/etc/pulse/default.pa`
* find the line
#load-module module-native-protocol-tcp
and replace it by
load-module module-native-protocol-tcp auth-anonymous=1
* do a `killall pulseaudio`
* restart `mpd`
Installing a client
===================
I found [pympd](http://pympd.sf.net/), [Ario](http://ario-player.sf.net/) and [Sonata](http://sonata.berlios.de/) really
usable (pympd looks a bit like *Rhythmbox*) and for the console: [ncmpc](http://hem.bredband.net/kaw/ncmpc/). For the
latter, you could add an alias: `ncmpc=ncmpc -c -m` to always start it in color-mode and with mouse support.
iPhone
------
Take a look at [MPoD](http://www.katoemba.net/makesnosenseatall/mpod/).