Koozali.org: home of the SME Server

Mini HowTo - MediaTomb for use with Windows Media Player 12 (Win7)

Offline Rien

  • *
  • 216
  • +0/-0
    • http://www.taurix.nl
Mini HowTo - Installing the MediaTomb media-server on SME server for use with Windows Media Player 12 on Win7 clients


Tested on Oracle VM VirtualBox and home production server.
Please be carefull and test it yourself first before installing MediaTomb on your production server. I'm a newbe!


See http://mediatomb.cc for additional info!


Server
======
Fresh installed SME server 8.0beta6, updated with 'yum update'

Clients
=======
Win7
Windows Media Player 12
(Windows Media Player 11 on Vista doesn't recognize the MediaTomb server !)


To install MediaTomb you need to have access to the 'DAG' repository. In case you haven't  configured this repository in yum yet, you can do the following:

Code: [Select]

/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag' \
BaseURL 'http://apt.sw.be/redhat/el$releasever/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled


Followed by:

Code: [Select]

signal-event yum-modify



Create the mediatomb database in MySQL:

Code: [Select]

mysql
mysql> CREATE DATABASE mediatomb;
mysql> GRANT ALL ON mediatomb.* TO 'mediatomb'@'localhost';
mysql> exit

(No password by default)


Install the rpm's needed by MediaTomb:

Code: [Select]

yum install --enablerepo='dag' libupnp libdlna expat zlib spidermonkey taglib libexif curl libextractor ffmpeg


Download the 'MediaTomb' and 'LibMagic' rpm's for RHEL 5 from http://pkgs.org. In my case I used the following links:

http://download.fedora.redhat.com/pub/epel/5/i386/mediatomb-0.11.0-2.el5.1.i386.rpm
http://download.fedora.redhat.com/pub/epel/5/i386/perl-File-LibMagic-0.96-1.el5.i386.rpm

Place both rpm's in a directory of your choice and do:

Code: [Select]

yum localinstall mediatomb-0.11.0-2.el5.1.i386.rpm perl-File-LibMagic-0.96-1.el5.i386.rpm


By default MediaTomb will create a 'config.xml' file in a directory called '.mediatomb' in the /root directory. To start MediaTomb for the first time - and let mediatomb create the 'config.xml' file:

Code: [Select]

mediatomb -d

(option -d to run MediaTomb in the background as daemon)


Don't forget to add the following line to the file '/etc/rc.d/rc.local' if you want to start the Mediatomb server automatically:

Code: [Select]

mediatomb -d



Editing the 'config.xml' file
=============================

Open the 'config.xml' file.

If you want to change the name of the server, look for the string:

       <name>MediaTomb</name>  and replace 'MediaTomb' with your own name

Because I use MySQL (instead of Sqlite3), I changed the following:

        <sglite3 enabled="yes">   ==>   <sglite3 enabled="no">
        <mysql enabled="no">   ==>   <mysql enabled="yes">


For PS3 support I changed:

    <protocolInfo extend="no"/>   ==>   <protocolInfo extend="yes"/>


MediaTomb generates several (virtual) containers of the same song. Because I want to use the MediaTomb server in 'Windows Media Player 12' (Win7 clients), I want to force MediaTomb to just follow the structure of my music directory (artist | album | song). To do that, I changed the following:

          <virtual-layout type="builtin">   ==>   <virtual-layout type="disabled">

save the file.

To start your MediaTomb server with the correct settings do:

Code: [Select]

signal-event post-upgrade; signal-event reboot




Adding media files to your MediaTomb server
===========================================

Open your browser and type:

Code: [Select]

http://your-smeserver-ip-adres:49152/

(MediaTomb uses port 49152 by default)


Select "Filesystem" in the menu-bar and select your music directory (in my case /home/e-smith/files/ibays/media/files/music)

click the most right icon on the menu-bar (a "+" combined with a "S"). Then set:

      Scan Mode = Timed
      Scan Level = Full
      Recursive = yes
      Include hidden files/directories = no
      Scan Interval (in seconds): 1800

MediaTomb will scan your music-directory and add the files to your mediatomb database.

Of course you can add more directories if you want.

Open 'Windows Media Player" on your Win7-client. There you will find your MediaTomb-server.



Loose ends
==========
I didn't manage to add the following libraries:

libffmpegthumbnailer (ffmpegthumbnailer is used to generate video thumbnails on the fly)
lastfmlib (last.fm scrobbing)


Please comment !!


« Last Edit: January 11, 2011, 11:28:51 PM by Rien »
Rien
(The Netherlands)......

Offline erroneus

  • **
  • 62
  • +0/-0
Re: Mini HowTo - MediaTomb for use with Windows Media Player 12 (Win7)
« Reply #1 on: January 14, 2011, 05:20:22 PM »
This looks really useful and I thank you for your efforts.  But I am curious.  Beyond Windows Media Player 12, what other devices and softwares are known to use the services provided by MediaTomb as implemented in your guide?

I guess what I am getting at is I have two devices at home that might be able to make use of this media streamer -- an xbox360 and an HV335T put out by a company called Argosy.  (Awesome box, BTW, as it plays every format known so far and will access media across SMB, USB and its local HDD... and also, supposedly UPnP though I have not yet tested this.)

But given that it will work with WMP12 (something I do not use) I wonder if it will work with XBox360 which is also Microsoft..? 

It's okay if no one yet knows the answer to the question -- I will try to implement and find out for myself eventually.  I would just prefer not to duplicate any efforts or to be able to learn from what others already know if it's possible.
« Last Edit: January 14, 2011, 05:28:47 PM by erroneus »

Offline Rien

  • *
  • 216
  • +0/-0
    • http://www.taurix.nl
Re: Mini HowTo - MediaTomb for use with Windows Media Player 12 (Win7)
« Reply #2 on: January 14, 2011, 06:36:22 PM »
Hi,

I first tried UShare, but it didn't work for me. See http://ushare.geexbox.org/ because is has support for XBox360. Very simple to implement. All the rpm's you need are in the 'Dag' repository. Nothing to compile.

Code: [Select]

yum install --enablerepo='dag'  ushare libupnp libdlna




I was surprised that Windows Media Player 12 does work with MediaTomb. Why oter versions don't, I don't know. Maybe I did something wrong.

See http://mediatomb.cc/pages/devices and http://www.rbgrn.net/content/21-how-to-choose-dlna-media-server-windows-mac-os-x-or-linux



Rien
(The Netherlands)......