You are here

UPnP, Mediatomb, PS3, and me

My brother lent me his PS3. I’m not sure why. But I do know I’ve already wasted several hours on it, first playing my old Ratchet and Clank games, then Resistance: Fall of Man, and Flow, and so on.

After I bored of the games (about an hour after turning it on), I decided to explore the home media functions of the PS3. The first thing I noticed was the menu item at the top of the media areas: “Search for Media Servers”.

Three hours later, and a lot of experimenting, I have discovered the wonders of serving up media.

UPnP: The present and future of media sharing

UPnP is a protocol specification designed to provide sharing of media. The media can be anything, but normally you share out the usual suspects: pictures, audio, and video. The PS3 system software has an in-built UPnP client. If there is a compatible UPnP server on the network, the PS3 will detect it.

At this point, I took some time to figure out the ins-and-outs of UPnP. There are some great resources on the net. To learn more, Google is your friend. However, you don’t need to know much about UPnP to benefit from it.

There are several UPnP servers available for GNU/Linux. The popular MythTV media center has a very nice UPnP server. Unfortunately, it doesn’t work with the PS3 at this time. The GNU project has GMediaServer, an easy-to-use UPnP server. However, as far as I can tell, it only serves up audio

There are others, as well, each with their own features and constraints. I despaired of finding a decent, well-rounded UPnP server for GNU/Linux.

Mediatomb installation

Installation of MediaTomb was quite easy, thanks to their pre-packaged repositories. Their download page provides instructions for many major GNU/Linux distributions. Me, I use Ubuntu, so I did this:

wget http://apt.mediatomb.cc/key.asc -O- -q | sudo apt-key add -

This step adds a cryptographic signature for MediaTomb’s apt source. That got added in my next step.

sudo nano /etc/apt/sources.list

This opens the apt repository list in a text editor. (Replace “nano” with your preferred editor.) Now, add this line to the end of sources.list:

deb http://apt.mediatomb.cc/ edgy main

Substitute “feisty” or “dapper” to match your version of Ubuntu. Also, you’ll want to ensure the “universe” component is available.

You can accomplish the same thing by using the “System→Administration→Software Sources” menu item. Make sure the “Community-maintained Open Source software (universe)” item is checked. Then, click the “Third Party Software” tab, and click the “Add” button. Paste in the “deb http...” line, and click the “Add Source” button.

Now, update your repository catalog, and install MediaTomb.

sudo apt-get update
sudo apt-get install mediatomb

Running and configuring MediaTomb

Run MediaTomb from the command line.

mediatomb

There will be a lot of information scrolling by. Ignore it for now. Give it a minute to finish configuring, then type “Ctrl + C” to interrupt the program. Let’s quickly edit our configuration file.

nano ~/.mediatomb/config.xml

Feel free to use another text editor rather than nano. I typically use vi to do minor editing, and really don’t use nano myself.

Immediately after the line that says “<server>” add a new line:

<protocolInfo extend="yes"/>

This is required for full PS3 support. If you find the PS3 doesn’t recognize your MP3s, chances are you need to add this line to the ~/.mediatomb/config.xml config file.

Start MediaTomb again. Once more, a lot of information will scroll by. The most important one is at the end, and it will look something like:

2007-05-28 15:56:36 INFO: http://192.168.1.101:49152/

It’s the “http:...” bit you want. Simply copy that into your browser’s URL entry area, and you will get the MediaTomb configuration screen.

On the left, there are two viewing options: “Database” and “Filesystem”. Click on the “Filesystem” tag, and browse to your media. Click on the “+” button on the right hand side. Choose a full scan, and make sure the “Recursive” option is checked.

That’s it. It isn’t nearly as hard as it seems, really. And once the system is set up, simply use the web-based interface to manage your system. The MediaTomb website has a lot of good documentation.

You’ll have to restart MediaTomb by hand. There are some instructions for configuring it to restart as a service (“daemon”, in Unix parlance), but I won’t cover that here. This should be enough to get you started.

Unfortunately, the PS3 only supports encumbered media formats, like MP3, WMA, and Sony's own ATRAK format. Perhaps in the future they will add support for other formats as well, like Vorbis and Theora.

You can now use your media from any other networked computer in your household. I recommend VLC as a UPnP client. It’s available for MS-Windows, Mac OSX, GNU/Linux, and quite a few other operating systems.

Comments

Thanks for the info, I was searching for a media server to use with PS3 and this post hit the target perfectly :)

And here's one bit of information more for setting up mediatomb. It did not like scandinavic characters in id3-tags of mp3s, and threw errors like "iconv: Invalid or incomplete multibyte or wide character", "... could not be converted to new encoding: invalid character sequence!". These can be fixed by adding following lines to ~/.mediatomb/config.xml in import-section:

Although I don't have a PS3 I do know that Sony Partnered with terrasoft to make a distro of linux for the PS3 the current version is Yellow Dog Linux 5.01 you can find download links here
http://www.terrasoftsolutions.com/resources/downloads.shtml

You should be able to install and have the option to boot into linux or into the PS3 normally for games. It won't have the advanced Graphics in linux though as part of the graphics chipset is locked down.

Is it possible to install this on Ubuntu dapper release? I'm not totally down with Ubuntu and the upgrade process yet, but get the following message when attempting a "sudo apt-get install mediatomb"

Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
mediatomb: Depends: libsmjs1 but it is not installable
E: Broken packages

Excellent write up. If a noob like myself can do it, anyone can. Only problem is... since I am such a noob, I may have botched something up here. My music streams to my PS3 great... for about 20 seconds. After those 20ish seconds pass, the music stops and I'm sent back to the main music stem of the cross media bar on the PS3. Did I break it? :P

i too cannot get images to be imported into the database. everything else, including running as a daemon on my server (ubuntu), works great. i have the file package installed and can test for jpeg files using 'file' in a shell. not sure why mediatomb is ignoring them. any help would be appreciated.

The drives are affordable at about $250 each depending on capacity, and act as servers that can stream to 3 UPnP clients at once. XBox 360 can do it as well.

I saw a demo (Using PS3 and a set top UPnP box with LaCie drive) and was blown away by the easy setup and usefullness of UPnP. I'm not sure why this isn't more widely available in America. In Europe they have LCD TVs with ethernet/wireless and UPnP players built in as well as small set top UPnP player boxes so you can stream to any TV in the house.

Of course a Windows Media PC is also a UPnP server and PS3 will pick it up as such.

Author information

Biography

Tony Taylor was born, causing his mother great discomfort, and has lived his life ever since. He expects to die some day. Until that day, he hopes to continue writing, and living out his childhood dream of being a geek.