Table of Contents

Coherence DLNA/UPNP MediaServer

What is Coherence?

The media server supports Transcoding (experimental). The toolkit is known to work on various Linux flavors, BSD, (Open)Solaris and Windows. It can be installed either as a standard python source-code download or through various OS-specific packages.

Configuration

The Ampache backend has the following options:

Example config file

<plugin active="yes">
  <url>ampache/ampache/server/xml.server.php</url>
  <backend>AmpacheStore</backend>
  <name>Ampache</name>
  <key>llama</key>
  <user>username</user>
  <password>username</password>
</plugin>

The <user> and <password> are the same as the username and password you use to log into the web interface.

Python code

coherence.add_plugin('AmpacheStore',
                     name='MyAmpache',
                     url='http://ampache-host/ampache/server/xml.server.php',
                     key='yourpassword')

DBus

coherence_service = dbus.SessionBus().get_object('org.Coherence','/org/Coherence')
coherence_service.add_plugin('AmpacheStore',
                             {'name':'MyAmpache,
                             'url'='http://ampache-host/ampache/server/xml.server.php',
                             'key'='yourpassword'},
                             dbus_interface='org.Coherence',
                             reply_handler=add_plugin_callback,
                             error_handler=error_callback)

Commandline

coherence --plugin=backend:AmpacheStore,url:http://ampache-host/ampache/server/xml.server.php,key:yourpassword

Multicast routing

You must setup a multicast route for UPnP messages, in this example with eth0 as the interface you want them to travel over.

route add -net 239.0.0.0 netmask 255.0.0.0 eth0

Troubleshooting

Running from the command line

To see of Coherence can connect to Ampache, run the following command. Be sure to change “ampache-host” to your Ampache host and add your RPC key after “key:”

coherence --plugin=backend:AmpacheStore,url:http://ampache-host/ampache/server/xml.server.php,key:YOURPASS_FROM_RPC_ACL

Then you should see something that resembles the following:

Coherence UPnP framework version 0.5.8 starting... (coherence/base.py:251)
WARN  webserver                   Oct 22 09:31:44  WebServer on port 59615 ready (coherence/base.py:106)
WARN  mediaserver                 Oct 22 09:31:45  Ampache MediaServer (Ampache storage) activated (coherence/upnp/devices/media_server.py:521)