Projekt

Allgemein

Profil

Setup mpd » Historie » Version 2

Jeremias Keihsler, 12.01.2017 16:56

1 1 Jeremias Keihsler
h1. Install MPD
2
3
this is based on http://www.forum-raspberrypi.de/Thread-tutorial-music-player-daemon-mpd-und-mpc-auf-dem-raspberry-pi
4
5
h2. update package-list
6
7
<pre><code class="bash">
8
sudo apt-get update
9
</code></pre>
10
11
h2. install needed packages
12
13
<pre><code class="bash">
14
sudo apt-get install mpd mpc alsa-utils
15
</code></pre>
16
17
h2. sound settings
18
19
<pre><code class="bash">
20
sudo modprobe snd_bcm2835
21
sudo amixer cset numid=3 1
22
</code></pre>
23
24
h2. configuration
25
26
<pre><code class="bash">
27
sudo vim /etc/mpd.conf
28
</code></pre>
29 2 Jeremias Keihsler
30 1 Jeremias Keihsler
to use MPD via network you need to comment following line out
31 2 Jeremias Keihsler
32 1 Jeremias Keihsler
<pre>
33
...
34
#bind_to_address
35
...
36
</pre>
37
38
adjust output
39 2 Jeremias Keihsler
40 1 Jeremias Keihsler
<pre>
41
...
42
audio_output {
43
        type            "alsa"
44
        name            "My ALSA Device"
45
        device          "hw:0,0"        # optional
46
#       format          "44100:16:2"    # optional
47
#       mixer_device    "default"       # optional
48
#       mixer_control   "PCM"           # optional
49
#       mixer_index     "0"             # optional
50
}
51
...
52
</pre>
53
54
h2. load modules after reboot
55
56
<pre><code class="bash">
57
sudo vim /etc/modules
58
</code></pre>
59 2 Jeremias Keihsler
60 1 Jeremias Keihsler
<pre>
61
# /etc/modules: kernel modules to load at boot time.
62
#
63
# This file contains the names of kernel modules that should be loaded
64
# at boot time, one per line. Lines beginning with "#" are ignored.
65
# Parameters can be specified after the module name.
66
67
snd-bcm2835
68
</pre>
69
70
h2. set permissions
71
72
<pre><code class="bash">
73
sudo chmod g+w /var/lib/mpd/music/ /var/lib/mpd/playlists/
74
sudo chgrp audio /var/lib/mpd/music/ /var/lib/mpd/playlists/
75
</code></pre>
76
77
h2. add music
78
79 2 Jeremias Keihsler
h3. files
80 1 Jeremias Keihsler
put .mp3's into directory @/var/lib/mpd/music@
81
82 2 Jeremias Keihsler
h3. playlists for online streams
83 1 Jeremias Keihsler
put .pls or .m3u into directory @/var/lib/mpd/playlists@
84
85
http://wiki.ubuntuusers.de/Internetradio/Stationen#Radiosender-Deutschland
86 2 Jeremias Keihsler
87 1 Jeremias Keihsler
h2. restart and database update
88
89
<pre><code class="bash">
90
sudo /etc/init.d/mpd restart
91
sudo mpc update
92
</code></pre>