Switch to unified view

a b/doc/upmpdcli-or-mpdupnp.txt
1
= MPD and UPnP
2
3
There are two different approaches for integrating MPD in an UPnP
4
context. They are very different, it makes no sense to use both, and they
5
are often confused anyway. Here follows a tentative explanation.
6
7
8
== Pure MPD (no UPnP)
9
10
By default, MPD accesses audio data through a file-level protocol, either
11
reading from the local file system, or from a network disk shared through
12
NFS or Windows sharing (SMB). 
13
14
You tell MPD where the data is by setting a directory path in the MPD
15
configuration file (e.g. `music_directory "/home/me/MyMusic"`.
16
17
There are also standard plugins for fetching data in other ways, mostly
18
used for internet radios. One of them, which I'll mention because it is
19
used by the UPnP integration solutions, is the *curl* plugin, used for
20
fetching data through HTTP (the WEB protocol).
21
22
MPD manages its own tags catalog, which it builds from metadata extracted
23
from the audio files.
24
25
You browse the catalog and control playing with an MPD client, which uses
26
an MPD-specific protocol to talk to the *mpd* daemon. There are many clients,
27
from Linux command-line ones, to GUIs, to WEB/PHP based ones.
28
29
30
== Why would you want to change this ?
31
32
The main possible reasons:
33
34
 - You want to use an UPnP control point for browsing and playing music,
35
   because you are used to it, because you use it for other things, or
36
   because you just prefer it to native MPD clients.
37
 - Your audio data is stored on an UPnP Media Server, you took a
38
   lot of care to organize the tags, and you don't like the way the MPD
39
   database is organized.
40
 - You have / want several music players, and duplicating the catalog on
41
   each of them seems wasteful (which would happen with multiple MPD
42
   instances in their default configuration). 
43
 - Your media server does not have a file-level interface (unlikely), so
44
   you can't use bare MPD with it. Or you just don't want to set it up.
45
46
There are two approaches to insert MPD in an UPnP context. They are very
47
different, but from the user point of view, the only question which matters
48
is: 
49
50
 - _Do you want to use an MPD client (e.g. MPDroid, Cantata, etc.) to
51
   control the playing, or an UPnP one (e.g. Bubble UPnP, PlugPlayer,
52
   Lumin, etc.) ?_
53
54
If you want an MPD client, you will choose the mpd-upnp approach (back-end
55
integration)
56
57
If you want an UPnP Control Point, you will choose the front-end one.
58
59
Both solutions are described in more detail below. Note that once you've
60
decided the kind of control software that you want to use, there is no real
61
need for more details: just go install the right one.
62
63
== Front-end integration: upmpdcli, MediaPlayer
64
65
These are applications which sit in front of MPD.  Upmpdcli is C++,
66
MediaPlayer is Java, they both do mostly the same things, the choice is
67
largely about which will be easier to install on your particular Linux
68
distribution.
69
70
Both present a standard UPnP/DLNA/OpenHome interface to the network, and
71
are usable with most UPnP Control Points.
72
73
They talk the MPD client protocol behind the scenes to control actual music
74
playing.
75
76
Your UPnP Control Point (your user interface) directly browses catalog data
77
from an UPnP Media Server (e.g. Minim Server, MiniDlna, Asset, Twonky,
78
etc.), and tells upmpdcli or MediaPlayer what to play. upmpdcli/MediaPlayer
79
then controls MPD, which fetches the audio data through an HTTP URL
80
(pointing to the Media Server).
81
82
MPD remains directly usable from an MPD client. It could also manage
83
local audio data and a catalog, even if this does not make much sense.
84
85
== Back-end integration: mpd-upnp
86
87
This is implemented as an MPD Database plugin. Instead of reading files and
88
building its own catalog, MPD accesses an UPnP Media Server both for tag
89
and audio data. Tags are accessed through UPnP, and data is retrieved
90
through HTTP.
91
92
MPD then translates the UPnP catalog data to the native MPD client
93
protocol, so that MPD clients think that they are talking to a normal MPD
94
(but instead they are browsing the UPnP Media Server _through_ MPD).
95
96
In this configuration, MPD can't manage local data and tags. The file and
97
UPnP database plugins are mutually exclusive.