Monday, July 7, 2008

Ubuntu, Mediatomb, VLC and the PS3 - a match made in heaven.

Today, in the space of a couple of hours, I successfully setup media serving to my PS3 under Ubuntu 8.04. Not only that, but the media server works with:

Multiple video and audio codecs and

Media scanning (tracking forwards and backwards).

The following discusses how I accomplished this feat.

Introduction:

Firstly it should be noted that the PS3 is a DLNA (Digital Living Network Alliance) compatible device, this basically means you can share media to it. Currently under Ubuntu there is a limited number of DLNA compatible media server programs, these programs include mediatomb and fuppes. I chose mediatomb as it has an installer through the symantic package manager, and for that reason updates should be automated.

Installation:

First, make sure you have VLC installed, if you don't you can install it using the following command: sudo apt-get install vlc

Also install ffmpeg for good measure: sudo apt-get install ffmpeg

I performed the installation of mediatomb via the Add/Remove programs (symantic package manager) application in Ubuntu.Simply search for mediatomb in the "All available programs" category and select install. Having completed the previous install step, mediatomb is now successfully installed and is avaliable under "Application/Sound & Video", that said, don't open it yet!

Configuration:

Now we need to setup mediatomb, to do this we first need to run and close mediatomb, this will cause mediatomb to do some basic setup. To run mediatomb, go to a terminal and type: sudo mediatombAfter you do this wait for some text to output, the text should look something like:

MediaTomb UPnP Server version 0.11.0 - http://mediatomb.cc/

===============================================================================Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.MediaTomb is free software, covered by the GNU General Public License version 2

Now edit the mediatomb configuration file, to do this simply edit the config.xml file for mediatomb using your text editor: gedit ~/.mediatomb/config.xml

Note that the file has some comments which instruct you where to change things for PS3 support.

Line 23: Change the no to a yes, protocolInfo extend = yesBefore:<protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->After:<protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->

The above gives you the basic mediatomb PS3 support, this basic support will not transcode your files. This means that if a media file isn't encoded using one of the "few" supported codecs then tough luck.

To enhance the PS3 support enable transcoding, as VLC is installed, enable transcoding via VLC.

Line 87: Change the no to a yes, transcoding enabled="yes"Before:<transcoding enabled="no">After:<transcoding enabled="yes">

All that remains is to re-run the mediatomb via the terminal and add media to share. Simply run mediatomb in a terminal:mediatomb. Now go to the URL stated in the mediatomb output, this is likely to be http://localhost:49152. Once at the URL you should see the mediatomb interface, to add media simply select the media you want to share from the Filesystem and press the + symbol in the top right. All shared media is shown in the Database.

Finish:

Now startup your PS3 and search for media servers, your PS3 should find the mediatomb server with your shared media, virtually all the media should be watchable via the VLC transcoding.. Enjoy!

Regular expression is really wonderful to parsing HTML or matching pattern. I use this a lot when i code. Actually when I learn any new langauge, first of all I first try whether it supports regex or not. I feel ezee when I found that.

I have been trying to watch mp4 with an h264 encoded video. But it is really jerky. I know this has something to do with vlc in Jaunty wondering if there was a way to change the transcoding to mplayer or any other player.

Thank you so much! I recently switched from windows to linux (circa 5 days ago), didn't know what the hell ubuntu was prior to that. I found your post about mediatomb/ps3/vlc and I am up and running; worked like a charm.