Tag/tag.png

Needs Updating
This article needs updating to include the latest versions of Ubuntu. More info...

MediaTomb UPnP Media Server

Introduction

"MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface, it allows you to stream your digital media through your home network and listen to/watch it on a variety of UPnP compatible devices."

Website: http://mediatomb.cc/

Installation Instructions

If you are using Ubuntu 8.04 (Hardy Heron) or later, install the ''mediatomb'' package from the Universe repository using the previous link or your preferred package manager (e.g. Synaptic Package Manager, apt-get, etc.). If you are using an earlier version of Ubuntu, you should follow the instructions on the MediaTomb website to add the MediaTomb repository to your software sources.

Setup

Depending on the UPnP client you will be using to play media from your MediaTomb UPnP server, you may need to edit the MediaTomb configuration file. The following terminal command will open the configuration file for editing on Ubuntu, Kubuntu, or Xubuntu.

sudo nano /etc/mediatomb/config.xml

Alternatively, you can use a GUI text editor.

  • Ubuntu (gedit)
     gksudo gedit /etc/mediatomb/config.xml
  • Kubuntu (kate)
     kdesudo kate /etc/mediatomb/config.xml
  • Xubuntu (mousepad)
     gksudo mousepad /etc/mediatomb/config.xml

To uncomment XML code, remove the "<!--" and "-->" from before and after the commented text. The following code is shown as it would appear after the necessary edits.

Enabling Web Interface

MediaTomb provides a web interface to help with configuration. To enable:

    <ui enabled="yes" show-tooltips="yes">

With any changes to the configuration file, the MediaTomb service will need to be restarted for them to take effect.

Allowing Accounts

As of version 0.12.1 to be able to 'Login', it appears like having accounts enabled now is mandatory. To do this change:

      <accounts enabled="no" session-timeout="30">

to yes. Here you can change the password too. However since MediaTomb only runs on a local network you may want to consider whether privacy is an issue. Default login/password is: mediatomb/mediatomb.

Playstation 3 (PS3) Compatibility

    <protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->

    <!-- Uncomment the line below for PS3 divx support -->
    <map from="avi" to="video/divx"/>

    <!--
       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
    -->
    <custom-http-headers>
      <add header="X-User-Agent: redsonic"/>
    </custom-http-headers>

    <manufacturerURL>redsonic.com</manufacturerURL>
    <modelNumber>105</modelNumber>

        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <map from="avi" to="video/avi"/>

ZyXEL DMA-1000 Compatibility

        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <map from="avi" to="video/avi"/>

Getting Started With MediaTomb

Running MediaTomb as a Service

MediaTomb will by default run as a service at boot. You can start and stop the service manually from the terminal using the following commands:

  • Stop the MediaTomb service

     sudo service mediatomb stop
  • Start the MediaTomb service

     sudo service mediatomb start
  • Restart the MediaTomb service

     sudo service mediatomb restart

Running MediaTomb Manually

You may run MediaTomb manually, but you must first remove the service using the following terminal commands.

sudo mv /etc/init.d/mediatomb /etc/init.d/mediatomb.backup
sudo update-rc.d mediatomb remove

Once the service is removed, you may run MediaTomb using the following command in the terminal.

mediatomb

Defining MediaTomb Shared Media

MediaTomb uses a web-based interface for setting your shared media directories. By default MediaTomb will select a free port starting with 49152, however you can specify a port of your choice in the configuration file. You may access the interface by directing your web browser to the URL "http://localhost:49152" (or the port currently in use by MediaTomb if you have changed the port in the configuration file, or 49152 was already in use by another application). Installing MediaTomb through the Ubuntu repositories will add a launcher in the Applications menu that will open the MediaTomb web interface in your browser.

Sharing Media

To share media files, first open the MediaTomb web interface. In the left column, select "Filesystem", and navigate to the directory containing the media you want to share. Your media files will be shown on the right. Click the plus sign ("+") to the right of the media file or directory to share the directory using the default settings, or the plus sign surrounded by the circular arrows to set advanced sharing options.

Editing or Removing Shared Media

You can view your shared media by selecting "Database" in the left column.

To edit or remove media, select "PC Directory" and navigate to the directory containing the media files you want to edit or remove. Click the X to the right of the file or directory to remove it from MediaTomb's media database. Click the edit icon to the right of a media file to edit the description or mime type used when sharing the media. Click the plus sign surrounded by circular arrows to the right of a directory to change the advanced sharing options.

Multilingual Characters Support

Multilingual characters of the media are supported by configuring MediaTomb as below:

Edit /etc/mediatomb/config.xml:

  ...
  <import hidden-files="no">
    <filesystem-charset>UTF-8</filesystem-charset>
    <metadata-charset>UTF-8</metadata-charset>
    <playlist-charset>UTF-8</playlist-charset>
    <scripting script-charset=”UTF-8″>
  ...

After edited the configuration file, restart MediaTomb. Then remove the indexed folders and files in web interface. Add them again to show the correct filename.

Transcoding

MediaTomb supports on-the-fly transcoding using external encoders such as ffmpeg and mencoder. Complete documentation on transcoding with MediaTomb can be found at the MediaTomb website.

Help and Documentation

Complete documentation for MediaTomb is available on the MediaTomb website

Related Pages


CategorySoftware

MediaTomb (last edited 2014-12-23 01:07:30 by 202)