个人工具

UbuntuHelp:MediaTomb

来自Ubuntu中文

跳转至: 导航, 搜索

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)
 gksu gedit /etc/mediatomb/config.xml
 
  • Kubuntu (kate)
 kdesu kate /etc/mediatomb/config.xml
 
  • Xubuntu (mousepad)
 gksu mousepad /etc/mediatomb/config.xml
 

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

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"/>

D-Link Media Player Compatibility

    <!--
       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 /etc/init.d/mediatomb stop
 
  • Start the MediaTomb service
 sudo /etc/init.d/mediatomb start
 
  • Restart the MediaTomb service
 sudo /etc/init.d/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

Controlling 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 49125 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.

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