From f69fc4f9762b984d0604da6a1166f3f5d6ef9530 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 5 Nov 2012 22:42:47 +0100 Subject: [PATCH] docs: How to use Mopidy and Rygel with UPnP clients --- README.rst | 7 +- docs/clients/dlna.rst | 15 ---- docs/clients/upnp.rst | 117 +++++++++++++++++++++++++++++++ docs/index.rst | 7 +- docs/modules/frontends/mpris.rst | 2 + 5 files changed, 125 insertions(+), 23 deletions(-) delete mode 100644 docs/clients/dlna.rst create mode 100644 docs/clients/upnp.rst diff --git a/README.rst b/README.rst index 352251fb84..c7eea228dd 100644 --- a/README.rst +++ b/README.rst @@ -11,10 +11,9 @@ Spotify playlists are also available for use, though we don't support modifying them yet. To control your music server, you can use the Ubuntu Sound Menu on the machine -running Mopidy, any device on the same network which supports the DLNA media -controller spec (with the help of Rygel in addition to Mopidy), or any MPD -client. MPD clients are available for most platforms, including Windows, Mac OS -X, Linux, Android and iOS. +running Mopidy, any device on the same network which can control UPnP +MediaRenderers, or any MPD client. MPD clients are available for most +platforms, including Windows, Mac OS X, Linux, Android and iOS. To get started with Mopidy, check out `the docs `_. diff --git a/docs/clients/dlna.rst b/docs/clients/dlna.rst deleted file mode 100644 index e1eeddd27c..0000000000 --- a/docs/clients/dlna.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _dlna-clients: - -************ -DLNA clients -************ - -TODO - - -.. _rygel: - -Exposing Mopidy over DLNA using Rygel -===================================== - -TODO diff --git a/docs/clients/upnp.rst b/docs/clients/upnp.rst new file mode 100644 index 0000000000..567fb04f62 --- /dev/null +++ b/docs/clients/upnp.rst @@ -0,0 +1,117 @@ +.. _upnp-clients: + +************ +UPnP clients +************ + +`UPnP `_ is a set of +specifications for media sharing, playing, remote control, etc, across a home +network. The specs are supported by a lot of consumer devices (like +smartphones, TVs, Xbox, and PlayStation) that are often labeled as being `DLNA +`_ compatible or certified. + +The DLNA guidelines and UPnP specifications defines several device roles, of +which Mopidy may play two: + +DLNA Digital Media Server (DMS) / UPnP AV MediaServer: + + A MediaServer provides a library of media and is capable of streaming that + media to a MediaRenderer. If Mopidy was a MediaServer, you could browse and + play Mopidy's music on a TV, smartphone, or tablet supporting UPnP. Mopidy + does not currently support this, but we may in the future. :issue:`52` is + the relevant wishlist issue. + +DLNA Digital Media Renderer (DMR) / UPnP AV MediaRenderer: + + A MediaRenderer is asked by some remote controller to play some + given media, typically served by a MediaServer. If Mopidy was a + MediaRenderer, you could use e.g. your smartphone or tablet to make Mopidy + play media. Mopidy *does already* have experimental support for being a + MediaRenderer with the help of Rygel, as you can read more about below. + + +.. _rygel: + +How to make Mopidy available as an UPnP MediaRenderer +===================================================== + +With the help of `the Rygel project `_ Mopidy can +be made available as an UPnP MediaRenderer. Rygel will interface with Mopidy's +:ref:`MPRIS frontend `, and make Mopidy available as a +MediaRenderer on the local network. Since this depends on the MPRIS frontend, +which again depends on D-Bus being available, this will only work on Linux, and +not OS X. MPRIS/D-Bus is only available to other applications on the same host, +so Rygel must be running on the same machine as Mopidy. + +1. Start Mopidy and make sure the :ref:`MPRIS frontend ` is + working. It is activated by default, but you may miss dependencies or be + using OS X, in which case it will not work. Check the console output when + Mopidy is started for any errors related to the MPRIS frontend. If you're + unsure it is working, there are instructions for how to test it on the + :ref:`MPRIS frontend ` page. + +2. Install Rygel. On Debian/Ubuntu:: + + sudo apt-get install rygel + +3. Enable Rygel's MPRIS plugin. On Debian/Ubuntu, edit ``/etc/rygel.conf``, + find the ``[MPRIS]`` section, and change ``enabled=false`` to + ``enabled=true``. + +4. Start Rygel by running:: + + rygel + + Example output:: + + $ rygel + Rygel-Message: New plugin 'MediaExport' available + Rygel-Message: New plugin 'org.mpris.MediaPlayer2.spotify' available + Rygel-Message: New plugin 'org.mpris.MediaPlayer2.mopidy' available + + Note that in the above example, both the official Spotify client and Mopidy + is running and made available through Rygel. + + +The UPnP-Inspector client +========================= + +`UPnP-Inspector `_ is a +graphical analyzer and debugging tool for UPnP services. It will detect any +UPnP devices on your network, and show these in a tree structure. This is not a +tool for your everyday music listening while relaxing on the couch, but it may +be of use for testing that your setup works correctly. + +1. Install UPnP-Inspector. On Debian/Ubuntu:: + + sudo apt-get install upnp-inspector + +2. Run it:: + + upnp-inspector + +3. Assuming that Mopidy is running with a working MPRIS frontend, and that + Rygel is running on the same machine, Mopidy should now appear in + UPnP-Inspector's device list. + +4. If you expand the tree item saying ``Mopidy + (MediaRenderer:2)`` or similiar, and then the sub element named + ``AVTransport:2`` or similar, you'll find a list of commands you can invoke. + E.g. if you double-click the ``Pause`` command, you'll get a new window + where you can press an ``Invoke`` button, and then Mopidy should be paused. + +Note that if you have a firewall on the host running Mopidy and Rygel, and you +want this to be exposed to the rest of your local network, you need to open up +your firewall for UPnP traffic. UPnP use UDP port 1900 as well as some +dynamically assigned ports. I've only verified that this procedure works across +the network by temporarily disabling the firewall on the the two hosts +involved, so I'll leave any firewall configuration as an exercise to the +reader. + + +Other clients +============= + +For a long list of UPnP clients for all possible platforms, see Wikipedia's +`List of UPnP AV media servers and clients +`_. diff --git a/docs/index.rst b/docs/index.rst index d9cba72dee..0f5ed16421 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,10 +10,9 @@ also available for use, though we don't support modifying them yet. To control your music server, you can use the :ref:`Ubuntu Sound Menu ` on the machine running Mopidy, any device on the same -network which supports the :ref:`DLNA ` media controller spec -(with the help of :ref:`Rygel ` in addition to Mopidy), or any :ref:`MPD -client `. MPD clients are available for most platforms, including -Windows, Mac OS X, Linux, Android and iOS. +network which can control UPnP MediaRenderers (see :ref:`upnp-clients`), or any +:ref:`MPD client `. MPD clients are available for most platforms, +including Windows, Mac OS X, Linux, Android, and iOS. To install Mopidy, start by reading :ref:`installation`. diff --git a/docs/modules/frontends/mpris.rst b/docs/modules/frontends/mpris.rst index 2984e4c155..e0ec63da8c 100644 --- a/docs/modules/frontends/mpris.rst +++ b/docs/modules/frontends/mpris.rst @@ -1,3 +1,5 @@ +.. _mpris-frontend: + *********************************************** :mod:`mopidy.frontends.mpris` -- MPRIS frontend ***********************************************