UPnP, Mediatomb, PS3, and me

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.

And then I tried MediaTomb.

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.

That’s it! Go out and enjoy your media.

Category: 

Comments

trewas's picture
Submitted by trewas (not verified) on

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:

<filesystem-charset>ISO-8859-1</filesystem-charset>
<metadata-charset>ISO-8859-1</metadata-charset>

Note that you have to delete the database (~/.mediatomb/mediatomb.db) and re-import the tracks for this to take effect.

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Fuppes works well on Linux too, and transcoding of Ogg Vorbis and Flac for the PS3 should be working soon.

Jimmhoo's picture
Submitted by Jimmhoo (not verified) on

excelent tutorial

this is my first day with my ps3 and I was wondering how to stream media

works great with ubuntu feisty

Lord Deonast's picture

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.

Happy Playing.

budda's picture
Submitted by budda (not verified) on

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

How do I get around something like that?

RJO's picture
Submitted by RJO (not verified) on

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

Thanks lots!

HiDef's picture
Submitted by HiDef (not verified) on

Thanks for the article, have got everything working except I have the same problem as RJO - after 20 seconds or so, it flicks back to the media bar on the PS3 :-(

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

Indeed, i experience the same problem, but not only when i am listening music but always when i am connected!

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

cool. thanks for the info. worked right away for me - at least mp3's so far. really cool to have my entire collection on the big screen.

however, i'm having problems getting images (tried .jpgs) to be picked up by the ps3. anyone have any luck w/ this???

thanks,

n8behavior's picture
Submitted by n8behavior (not verified) on

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.

Drew Blogger's picture

I wrote about how to start in daemon mode (start at boot)

If anyone is interested in how to do this you can find it here:
http://passthejager.org/blog/?p=12

Anonymous visitor's picture
Submitted by Anonymous visitor (not verified) on

LaCie Ethernet Disk Mini, Ethernet Disk Big Disk and Ethernet Disk Home Edition all to UPnP very well. www.lacie.com

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

Anthony Taylor's picture

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.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!