DLNA Server
1. Introduction
2. Mediatomb
2.1 Installing Mediatomb
2.2 Configuring Mediatomb
2.3 Mediatomb Firewall Rules
3. Others
3.1 uShare
3.2 Untested
Introduction
I have introduced a PS3 into my home cinema system, mostly for its media playing potential. Therefore I want to setup a DLNA compliant media server, using Linux, so I can use the PS3 as a wireless media player/jukebox.Mediatomb
After first trying uShare and running into issues I decided to give Mediatomb a whirl, first impressions very positive :-D I will be sticking with Mediatomb for a while as it suits my need perfectly.Installing Mediatomb
See the URL below for more details of how to install Mediatomb on Debian and Ubuntu.Mediatomb Repository
Mediatomb packages for Ubuntu Hardy 8.04 are available in the "Universe" repo, however I add the Mediatomb repo for Hardy so when newer release is made available I will get the updates.sudo nano /etc/apt/sources.list.d/mediatomb.listAdd the following, changing 'hardy' to your Ubuntu/Debian release... Sample
# Mediatomb deb http://apt.mediatomb.cc/ hardy mainNow add the repo key.
sudo wget http://apt.mediatomb.cc/key.asc -O- -q | sudo apt-key add -Once Mediatomb is in your repo list update the repos.
sudo aptitude update
Headless Server
sudo aptitude install mediatomb-common mediatomb-daemon ffmpegthumbnailer
Desktop Workstation
sudo aptitude install mediatomb mediatomb-common mediatomb-daemon ffmpegthumbnailer
Configuring Mediatomb
First thing to do is get the Mediatomb server to run automatically and on the correct interface.sudo nano /etc/default/mediatombFind the following...
# Set whether the daemon should be started. Set this value to anything # but 'yes' to enable the daemon NO_START="yes"...and change 'NO_START' as follows.
NO_START=""If you have multiple network interfaces on your computer you will need to tell media tomb which interface to use. I run VMWare Server and found that media tomb was binding to vmnet1 by default. Set the network interface as required.
# The network interface for MediaTomb to bind to and for which the multicast # routing entry should be added; "" if the route shouldn't be added at all. # For example: INTERFACE="eth0" INTERFACE="eth0"Now we need to enable PS3 compatibility.
sudo nano /etc/mediatomb/config.xmlFind the following and change it to "yes"
<protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->Also find the following and uncomment it as directed to enable DivX/XviD playback on the PS3.
<!-- Uncomment the line below for PS3 divx support --> <map from="avi" to="video/divx"/>Finally, restart Mediatomb.
sudo /etc/init.d/mediatomb restart
File System Structured Video Import Script
I want to display my videos in the same directory structure I file them in, which means it needs to detect the number of sub directories automatically. First of all we have to change the 'config.xml' so it uses the import script.sudo nano /etc/mediatomb/config.xmlFind...
<virtual-layout type="builtin">and replace it with...
<virtual-layout type="js">Now modify 'import.js' as follows.
sudo nano /usr/share/mediatomb/js/import.jsFind the following... ...and replace it with... Finally, restart Mediatomb.
sudo /etc/init.d/mediatomb restart
Video Thumbnails
We have to change the 'config.xml' to enable transcoding and thumbnail generation.sudo nano /etc/mediatomb/config.xmlFind...
<transcoding enabled="no">and replace it with...
<transcoding enabled="yes">Now add the video file type you want to generate thumbnails for to the '<mimetype-profile-mappings>' section of the configuration.
<transcode mimetype="video/divx" using="video-thumbnail"/> <transcode mimetype="video/mpeg" using="video-thumbnail"/> <transcode mimetype="video/mp4" using="video-thumbnail"/> <transcode mimetype="video/x-ms-wmv" using="video-thumbnail"/>Create the 'video-thumbnail' profile.
<profile name="video-thumbnail" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>yes</accept-url>
<thumbnail>yes</thumbnail>
<resolution>128x128</resolution>
<agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 128"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
Finally, restart Mediatomb.
sudo /etc/init.d/mediatomb restart
Mediatomb Firewall Rules
If you run a firewall on your Mediatomb server you should allow the following ports.- udp/1900
- tcp/1900
- tcp/49152
- udp/49152
- http://mediatomb.cc/
- http://mediatomb.cc/dokuwiki/scripting:scripting
- http://my.opera.com/maurice118/blog/how-to-use-the-import-js-with-mediatomb-upnp-server
- http://www.nslu2-linux.org/wiki/Info/MediaTomb
- PS3 firmware 2.35 transcoding and thumbnails
- http://code.google.com/p/ffmpegthumbnailer/
Others
Here are some other potential DLNA server candidates.uShare
I did initially try and get uShare going and the PS3 detects the uShare server no problem but it can't see actually "see" the media files. I know the files are fine since I can put them on USB hard disk and play them. ReferencesUntested
- https://coherence.beebits.net/
- http://fuppes.ulrich-voelkel.de/
- http://elisa.fluendo.com/
- http://www.twonkyvision.de/
$Id: DLNAServer,v 1.25 2008/07/04 07:35:43 martin Exp $
Wiki Index All Recent Edit Top

