Skip to content
project-owner edited this page Jun 6, 2020 · 17 revisions

Installation

For Linux platform (e.g. Raspbian) the following command installs mpd player in folder /usr/bin

sudo apt-get install mpd

For debugging and updating mpd dictionary it's recommended to install mpc as well. This is a command line client for mpd. To install mpc run this command:

sudo apt-get install mpc

Configuration

Set mpd mixer type to software to control volume from Peppy UI. For that uncomment the line with mixer_type in file /etc/mpd.conf:

audio_output {
        type            "alsa"
        name            "My ALSA Device"
#       device          "hw:0,0"        # optional
        mixer_type      "software"      # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional

After installing mpd it's automatically configured as a service and it will start every time the Raspberry Pi starts. In order to have full control on mpd player it's better to stop mpd service and disable it from starting upon system startup

sudo service mpd stop
sudo update-rc.d mpd disable

The following example shows parameters which should be defined in audio section of the players.txt file in order to use mpd:

[audio]
player.name = mpd
music.folder.linux = /music
music.folder.windows = C:\music

The following parameters defined in players.txt file will be used to run mpd player on Linux platform:

[mpd.linux]
server.folder = /usr/bin
server.command = mpd
client.name = mpdsocket

The following parameters defined in players.txt file will be used to run mpd player on Windows platform:

[mpd.windows]
server.folder = C:\mpd-0.17.4-win32\bin
server.command = mpd mpd.conf
client.name = mpdsocket

Usage

To use file playback functionality with mpd the property music.folder in players.txt should be set to the same value as property music_directory in mpd.conf file.

Peppy player doesn't update mpd's dictionary. Therefore don't forget to run command 'mpc update' whenever new folder/file was added to the music directory.

Communication

The communication with mpd player includes commands which UI sends to the player and notifications which player sends back to UI. The following diagram shows how this communication was implemented:

mpd-client

Functionality

The following table lists the functionality available from mpd on different platforms. The lack of particular functionality doesn't mean that player doesn't provide it. That just means that it's currently not available in Peppy player and probably will be supported in the future.

Features mpd/Linux mpd/Windows
Web Radio x x
File Playback x x
m3u Playlist x x
cue Playlist x x
Audiobooks x x
Podcasts
Streaming Server x x
Streaming Client x x
CD Player x
Support for UTF-8 filenames x
VU Meter Screensaver x *

*VU Meter screensaver will be displayed but it will show randomly generated values.

<<Previous | Next>>

Clone this wiki locally