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

2.1 KiB

title layout created updated toc tags
Music Player Daemon default 2009-02-21 23:39:43 +0100 2009-08-09 00:31:02 +0200 false
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. 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 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, Ario and Sonata really usable (pympd looks a bit like Rhythmbox) and for the console: 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.