INSTALL 5.17 KB
Newer Older
Warren Dukes's avatar
Warren Dukes committed
1 2
                       Music Player Daemon (MPD) - INSTALL

3

4 5
Introduction
------------
6

7
This document is a very small amount of documentation about what is needed to 
8 9 10
install MPD.  If more information is desired, read the user manual:

 http://www.musicpd.org/doc/user/
11

12 13 14
Dependencies
------------

15
gcc 4.6 or later - http://gcc.gnu.org/
Max Kellermann's avatar
Max Kellermann committed
16
clang 3.2 or later - http://clang.llvm.org/
17
Any other C++11 compliant compiler should also work.
18

19 20
Boost 1.46 - http://www.boost.org/

Max Kellermann's avatar
Max Kellermann committed
21
GLib 2.28 - http://www.gtk.org/
22 23 24
General-purpose utility library.


J. Alexander Treuman's avatar
J. Alexander Treuman committed
25 26
Optional Output Dependencies
----------------------------
Warren Dukes's avatar
Warren Dukes committed
27

J. Alexander Treuman's avatar
J. Alexander Treuman committed
28
You will need at least one of these to compile MPD.
Warren Dukes's avatar
Warren Dukes committed
29

J. Alexander Treuman's avatar
J. Alexander Treuman committed
30 31
Most of these are available as packages on major distributions.  Be sure to
install both the library package as well as the development package.
Warren Dukes's avatar
Warren Dukes committed
32

J. Alexander Treuman's avatar
J. Alexander Treuman committed
33 34 35 36 37 38 39 40 41
AO - http://www.xiph.org/ao/
A portable library that abstracts many audio output types as one API.  Should
be used only if there is no native plugin available or if the native plugin
doesn't work.  You will need libao.

ALSA - http://www.alsa-project.org/
The Advanced Linux Sound Architecture.  Recommended audio output if you use
Linux.  You will need libasound.

42 43 44 45 46 47
FIFO
This is a mostly undocumented, developer plugin to transmit raw data.

OSS - http://www.opensound.com
Open Sound System.

J. Alexander Treuman's avatar
J. Alexander Treuman committed
48 49 50
PulseAudio - http://www.pulseaudio.org/
An advanced sound daemon.  You will need libpulse.

J. Alexander Treuman's avatar
J. Alexander Treuman committed
51 52 53
JACK - http://www.jackaudio.org/
A low-latency sound daemon.

J. Alexander Treuman's avatar
J. Alexander Treuman committed
54 55
libshout - http://www.icecast.org/
For streaming to an Icecast or Shoutcast server.
56 57
You also need an encoder: either libvorbisenc (ogg), or liblame (mp3).

58 59 60
OpenAL - http://kcat.strangesoft.net/openal.html
Open Audio Library

J. Alexander Treuman's avatar
J. Alexander Treuman committed
61 62 63 64 65 66 67 68 69 70 71 72

Optional Input Dependencies
---------------------------

You will need at least one of these to compile MPD.

Most of these are available as packages on major distributions.  Be sure to
install both the library package as well as the development package.

MAD - http://www.underbit.com/products/mad/
For MP3 support.  You will need libmad, and optionally libid3tag if you want
ID3 tag support.
Warren Dukes's avatar
Warren Dukes committed
73

74 75 76
libmpg123 - http://www.mpg123.de/
Alternative for MP3 support.

Warren Dukes's avatar
Warren Dukes committed
77
Ogg Vorbis - http://www.xiph.org/ogg/vorbis/
J. Alexander Treuman's avatar
J. Alexander Treuman committed
78 79
For Ogg Vorbis support.  You will need libogg and libvorbis.

80
libopus - http://www.opus-codec.org/
81 82
Opus codec support

J. Alexander Treuman's avatar
J. Alexander Treuman committed
83
FLAC - http://flac.sourceforge.net/
84
For FLAC support.  You will need version 1.2 or higher of libFLAC.
Warren Dukes's avatar
Warren Dukes committed
85

J. Alexander Treuman's avatar
J. Alexander Treuman committed
86 87
Audio File - http://www.68k.org/~michael/audiofile/
For WAVE, AIFF, and AU support.  You will need libaudiofile.
Warren Dukes's avatar
Warren Dukes committed
88

J. Alexander Treuman's avatar
J. Alexander Treuman committed
89
FAAD2 - http://www.audiocoding.com/
90
For MP4/AAC support.
91

J. Alexander Treuman's avatar
J. Alexander Treuman committed
92 93 94 95 96
libmpcdec - http://www.musepack.net/
For Musepack support.

MikMod - http://mikmod.raphnet.net/
For MOD support.  You will need libmikmod.
97

Max Kellermann's avatar
Max Kellermann committed
98
libavcodec, libavformat (ffmpeg or libav) - http://ffmpeg.mplayerhq.hu/ http://libav.org/
99 100
Multi-codec library.

101 102 103
libsidplay2 - http://sidplay2.sourceforge.net/
For C64 SID support.

104
libfluidsynth - http://fluidsynth.resonance.org/
105
For MIDI support.
106

107
libwildmidi 0.2.3 - http://wildmidi.sourceforge.net/
108 109
For MIDI support.

110 111 112
libsndfile - http://www.mega-nerd.com/libsndfile/
WAVE, AIFF, and many others.

113 114 115
libwavpack - http://www.wavpack.com/
For WavPack playback.

116 117 118
libadplug - http://adplug.sourceforge.net/
For AdLib playback.

119 120 121
despotify - https://github.com/SimonKagstrom/despotify
For Spotify playback.

122 123 124
MP4v2 - https://code.google.com/p/mp4v2/
For MP4 playback. You will need FAAD2.

125

Avuton Olrich's avatar
Avuton Olrich committed
126 127 128
Optional Miscellaneous Dependencies
-----------------------------------

J. Alexander Treuman's avatar
J. Alexander Treuman committed
129
Avahi - http://www.avahi.org/
Avuton Olrich's avatar
Avuton Olrich committed
130 131 132 133 134
For Zeroconf support.

libsamplerate - http://www.mega-nerd.com/SRC/
For advanced samplerate conversions.

Max Kellermann's avatar
Max Kellermann committed
135 136 137
libcurl - http://curl.haxx.se/
For playing HTTP streams.

138 139 140
libmms - https://launchpad.net/libmms
For playing MMS streams.

141 142 143
SQLite - http://www.sqlite.org/
For the sticker database.

144 145 146
libcdio - http://www.gnu.org/software/libcdio/
For playing audio CDs.

147 148 149
libsystemd-daemon - http://freedesktop.org/wiki/Software/systemd/
For systemd activation.

Max Kellermann's avatar
Max Kellermann committed
150

151 152 153 154 155 156 157 158 159 160 161 162
pkg-config
----------

MPD uses pkg-config to locate most external libraries.  If you do not
have pkg-config, or if your version of the library does not ship the
".pc" file, you have to provide the library's build options in
environment variables.  These variables are documented in "./configure
--help".  Example:

 FLAC_CFLAGS=-I/usr/include/FLAC FLAC_LIBS=-lFLAC ./configure


Warren Dukes's avatar
Warren Dukes committed
163 164 165
Download
--------

J. Alexander Treuman's avatar
J. Alexander Treuman committed
166
Get the latest release from of MPD from <http://www.musicpd.org/>.
Warren Dukes's avatar
Warren Dukes committed
167 168 169 170

Compile
-------

171
1) unpack the archive
Warren Dukes's avatar
Warren Dukes committed
172

173
$ tar xf mpd-x.x.x.tar.xz
J. Alexander Treuman's avatar
J. Alexander Treuman committed
174

Warren Dukes's avatar
Warren Dukes committed
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
2) change to directory created

$ cd mpd-x.x.x

3) Run configure script (this will determine what dependencies you have)

$ ./configure

4) Compile

$ make

Install (Optional)
-------

(as root)
$ make install

Run
---

1) run mpd:

$ mpd <config file>

200 201 202
First default is $XDG_CONFIG_HOME/mpd/mpd.conf then ~/.mpdconf then
~/.mpd/mpd.conf then /etc/mpd.conf. If neither of these exist a mpd
configuration file must be specified at runtime.
Warren Dukes's avatar
Warren Dukes committed
203

204
A sample config file is included with the source of MPD, mpdconf.example.
Warren Dukes's avatar
Warren Dukes committed
205

206
The first time MPD is run it will attempt to discover all music in your
207 208
music root, recursively. This can be affected by the symbolic link 
options specified in the example mpd.conf.
J. Alexander Treuman's avatar
J. Alexander Treuman committed
209

Warren Dukes's avatar
Warren Dukes committed
210 211 212
Using MPD
---------

Avuton Olrich's avatar
Avuton Olrich committed
213
You can download many different interfaces for MPD at 
Warren Dukes's avatar
Warren Dukes committed
214

215
 http://www.musicpd.org/clients/