My Mac Meets The PS3
December 23rd, 2007UPDATE! Since writing this post back in Dec 2007, mediatomb has been updated to version 0.11. The build issue has been fixed in this version, and the config.xml file has also been updated with comments. See my follow-up post.
Especially motivated by the recent firmware update rolled out by Sony, I spent most of my available time this past week trying to get a robust media server running on my home network, and it was not quite the simple task as I had hoped it would be. Hence, I felt the need to document some of my learnings and findings here (so someone else trying this setup can hopefully save a few minutes).
All of my photo, audio and video media files live on an external hard drive connected to a Macintosh, which is not in the same room as the TV and PS3 - hence the primary need for a wireless media server. The Mac has yet to be graced with a single full-function UPnP server utility that is easy to setup and configure - this is just a matter of time, however, as I hear that Nullriver is working on developing a PS3 version of their very popular Connect360 program (which plays excellently with the XBox 360).
I have tried pretty much every available Mac/PS3 interconnect solution out there, at least the ones I could try first before buying (which ruled out EyeConnect). I did find reasonable success with Twonky Media Server (30-day demo, $40 license), although this (rather detailed) post is all about MediaTomb - a free, open-source UPnP server application that meets most (if not all) of my needs as far as a wireless media server are concerned.
In order to get things up and running, you will need the following setup preconfigured:
- A Macintosh running OS X 10.3 or newer (I use 10.5)
- An installation of XCode
- An installation of fink (optionally with Fink Commander)
XCode should be available on your Mac OS X installation disc (or you can get it from Apple’s site - free registration required). I didn’t want to get into the installation details here as there are much better tutorials online (such as this one), but felt that I should anyway, since I had some extra steps to endure because things didn’t work out without tweaks and patches. One note here is that a pre-built fink binary is not yet available for OS X Leopard, so you will have to install fink from source using bootstrap mode (which is why you need XCode).
Installing Fink in Bootstrap Mode (for new Fink users on OS X Leopard):
1. Download fink v0.27.8 here, and save it to a convenient location.
2. Fire up Terminal, navigate to the point where you saved fink, and unzip the downloaded package ($ indicates the terminal prompt):
$ tar xzf fink-0.27.8.tar.gz
3. Change to the unzipped directory:
$ cd fink-0.27.8
4. Here, you should find the perl script that enables bootstrap installation. Run the following command (note the preceding period):
$ ./bootstrap
5. For root privileges, choose ’sudo’ and follow the instructions. For the rest of the installation, choosing default values should work just fine (the only customization you might want is for a different installation path, if at all).
6. Lastly, make sure you update fink:
$ sudo fink scanpackages
$ sudo fink selfupdate
This process should get you up and running with fink.Optionally, you could download Fink Commander, which is a graphical frontend application for your new fink installation.
Installing and Configuring MediaTomb:
Using fink (or Fink Commander), download the source for mediatomb. You will have to add the unstable source library to the fink configuration file for this. Using Terminal, navigate to the fink installation directory and type the following commands:
$ sudo open -a TextEdit /sw/etc/fink.conf
This should open the configuration file in TextEdit (replace this with your favorite plain text editor). Locate the following line:
Trees: local/main stable/main stable/crypto
and change it to:
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto
Save the fink.conf file, and proceed to fetch the source for mediatomb. Now, here’s the issue - I had a problem with the direct installation of mediatomb on my Leopard machine, and hence had to locally patch the source files to get it to compile and build. Until this is resolved by the mediatomb source owners, I shall assume you have to do the same (try installing first by running the install command below).
$ fink fetch mediatomb
The mediatomb source code will be fetched and placed in the fink directory. Navigate to this directory at:
$ cd /sw/src/
Unzip the downloaded mediatomb tarball and switch to its directory:
$ sudo tar xzf mediatomb-0.10.0.tar.gz
$ cd mediatomb-0.10.0/src/
In this src directory, you might need to patch the string_converter.cc file. Open this file in a text editor via the following command:
$ open -a TextEdit string_converter.cc
In this file, locate the following preprocessor lines and comment out the #if construct so only the #else case applies, as follows:
// #if defined(HAVE_LIBICONV) || defined(SOLARIS) // ret = iconv(cd, (const char**)input_ptr, &input_bytes, // output_ptr, &output_bytes); // #else ret = iconv(cd, input_ptr, &input_bytes, output_ptr, &output_bytes); // #endif
Once this is accomplished, roll back the unzipped files into the tarball (first delete the originally downloaded file):
$ cd /sw/src/
$ sudo rm mediatomb-0.10.0.tar.gz
$ sudo tar cf mediatomb-0.10.0.tar.gz mediatomb-0.10.0/*
Now, let’s try installing this patched copy of mediatomb. Run the following command:
$ fink install mediatomb
Obviously, the signature from the downloaded file will not match as the downloaded file was patched. Fink will complain about this (to protect you), but go ahead and authorize the installation anyway.
Mediatomb should be installing now - this will take a while, so try keeping up the anticipation as I had to. Once done, mediatomb will be installed in your home directory (under a hidden folder called .mediatomb).
The mediatomb configuration by default is not set up for PS3 compatibility - this is easily resolved by adding the following line to the mediatomb configuration file:
$ open -a TextEdit ~/.mediatomb/config.xml
Insert the following line after the <server> tag in this file:
<protocolInfo extend=”yes” />
You can now run mediatomb by a Terminal command, as follows (the -d switch runs the program as a daemon):
$ mediatomb -d
If you’re still with me at this point, hold on for a few more seconds, for we’re almost there! At this point, you should be able to see the MediaTomb server from the XMB menu on your PS3 (that is, unless you face some of the issues that I did). At this point, you should be able to browse to the MediaTomb web menu by accessing the http://<IP Address>:<Port>/ via your web browser. In my case, this address is at: http://192.168.1.2:49152/

Here is my config.xml file for reference. You will need to edit the IP address tag in this file to the one used by your Mac.
The MediaTomb webpage provides options to add media files to your newly established media server and should be fairly intuitive. If you face problems, please let me know in the comments.
Issues I Faced with MediaTomb:
Incorrect IP Address:
The default IP address for the MediaTomb server in my case was not being assigned correctly - it seemed like the server configuration was picking up a random IP address similar to the one used by VMWare Fusion for the virtualized Windows instantiation. Therefore, I had to add an IP address override command in the config.xml file. In the config.xml file that we edited previously, you can add the following line (replace the IP address with the one that your Mac is currently using):
<ip>192.168.1.2</ip>
The IP address can also be supplied while running the mediatomb program from the command line, as follows:
$ mediatomb –ip=192.168.1.2
Additional Media Types:
The following tags need to be added to the config.xml file within the <extension-mimetype> flags in order to add support for additional media types. Note that the last line is particularly suited only for DivX AVI files, and will only work on a PS3 sporting the 2.1 system update.
<map from=”mpg” to=”video/mpeg”/>
<map from=”m2v” to=”video/mpeg”/>
<map from=”mp4″ to=”video/mp4″/>
<map from=”png” to=”image/png”/>
<map from=”jpg” to=”image/jpeg”/>
<map from=”gif” to=”image/gif”/>
<map from=”m4a” to=”audio/m4a”/>
<map from=”avi” to=”video/x-divx”/>
Port Issues:
Finally, if you encounter poor bandwidth issues, network congestion (lagged streams), or port mapping issues, try accessing your home network router and enable UPnP support (most routers should have a UPnP configuration option). I did not need to open up the port used by MediaTomb (49152/49153) to be mapped directly to the Mac, but this may be one more option to try in case things are not running quite smoothly.
Finally, if you run into trouble getting this stuff to work, let me know in the comments and I shall try and answer questions to the best of my ability. Good luck!







January 1st, 2008 at 1:30 pm
I suggest that instead of specifying the IP address directly, you specify the interface option and choose the appropriate interface. This will jive better with systems that have dynamically changing IP addresses. Just replace <ip>whatever</ip> with <interface>en0</interface> where en0 is the appropriate interface name as presented by the ifconfig command.
January 30th, 2008 at 1:40 pm
Have you decided to run it as a daemon so it will autostart when you boot the machine? I haven’t gotten into that much, but it seems like it would be a pretty simple process to do.
January 30th, 2008 at 1:53 pm
Hi Jody. Yes, I did have a thought about setting the task up as a launch item, although I did not get to executing it. I have not played much around with startup program handling in OS X. I know that OS X Tiger does not have a /etc/init.d directory, but rather uses launchd to handle startup items. I will give it a try soon.
For reference, see http://developer.apple.com/macosx/launchd.html
February 1st, 2008 at 3:33 am
I installed mediatomb couple of days ago on my Macbook running 10.4.8. I followed the instructions on another page ( i wish I had seen ur page first as it seems the process is uch more refined out here as in my case it took quite a long time to understand some of the instructions and compile using fink etc.). Anyway..I got it up and running fine. However I did not add the ip address entry and the protocolInfo extend entry to the config file. Even though I was running mediatomb and could see the browser based UI come up fine (in mozilla…safari had issues) my PS3 could not see it. Mediaservers setting is enabled and in fact it picked up the trial version of twonky server fine when i had it running in the past. My PS3 is running the latest firmware.
I will try tonight with the updated config.xml file and see (with the addition of Ip address entry and protocolInfo entry). So I don’t need to open up any ports on my WiFi router (a belkin 802.11G wireless router). right?
I need to get this to work as I have tons of personal media files on my Mac and a firewire HD that connects to my macbook.
Thanks for the post.
February 1st, 2008 at 10:12 am
Hi Sanjeev. Yes, the protocolInfo extend entry is required before the PS3 can see the media server, due to the way the default protocol has been implemented for mediatomb. Like Zachary mentioned above, the tag is better than the tag - especially if you’re on a laptop where the router might reassign your IP address often.
I did not have to open up any ports - however, my router (Netgear 614) does have a setting to enable UPnP. Check if your router has such a setting. Without the UPnP setting, Netgear routers only support one person playing the same application at one time, so enabling that will definitely help prevent access issues. Good luck!
February 19th, 2008 at 11:36 pm
I have everything installed, I have edited the config.xml file with the protocolinfo tag and my ip tag. However, when I run mediatomb i get the error -203 cannot bind to socket…etc. Can you help me? It would be appreciated.
thank you
Lane
February 19th, 2008 at 11:50 pm
hi Lane, as Zachary suggests in the comments, you might want to replace the tag with the more robust tag. This instructs mediatomb to use a fixed type of connection (instead of relying on an IP address, which is not preferable if you’re using a notebook computer).
As for the 203 error, this likely results from an already open connection to the socket. Try closing Terminal and opening a new session (I have tried killing the open mediatomb task by running the ps command and killing the specific process ID, but only reopening Terminal seems to correctly resolve this).
Hope this helps!
February 20th, 2008 at 12:19 am
Hi Sameer thanks a lot for the info. When I run ifconfig…I get several enX values, 0,1,3,4,5. Some say active and some say inactive. I am not sure which one to use. I tried them all and I get some error -203 errors (nothing new), and I get some errors saying could not find the specified interface.
thanks againg for all your help
Lane
February 20th, 2008 at 12:38 am
en0 is typically the wired ethernet device, and en1 should likely be the wireless interface. I’d guess that those are the only two active interfaces you see. I’d try restarting the network interface (either through the network utility, or through a reboot - if the terminal restart does not help) to get rid of the 203 errors. good luck!
February 20th, 2008 at 10:29 pm
Thanks a lot Sameer. Restarting worked perfectly in conjunction with the en1 setting. Since I converted from windows I haven’t had to restart many times. Now I just have to get my files system setup. I keep getting no track/unsupported error.
March 13th, 2008 at 1:18 pm
Hi,
I try to save the conf file after changing it but it says i dont have access privileges. I go to get info but it says I can read and write to the file. I don’t know what to do now.
cheers
April 5th, 2008 at 9:07 pm
[...] from my computer to the TV via the PS3 has been excellent (I use MediaLink ($20/free demo) and Mediatomb (free, open-source) for wireless streaming from Mac OS X to the PS3). One thing to note, is that [...]
April 5th, 2008 at 10:04 pm
I am having a problem installing MediaTomb. Here is my problem:
GaryMac:fink-0.28.1 ght$ fink install mediatombInformation about 6543 packages read in 2 seconds.fink needs help picking an alternative to satisfy a virtual dependency. Thecandidates:
(1) tetex-base: Base programs for a teTeX installation
(2) ptex-base: ASCII publishing TeX
(3) ptex-nox-base: ASCII publishing TeX
(4) tetex-nox-base: Base programs for a teTeX installation
Pick one: [1]
fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:
(1) ghostscript: Interpreter for PostScript and PDF
(2) ghostscript-esp: Enhanced GNU Ghostscript with better CJK and printer support
(3) ghostscript6: Interpreter for PostScript and PDF, v6.01
(4) ghostscript-nox: Interpreter for PostScript and PDF
(5) ghostscript6-nox: Intrp. for PostScript/PDF, v6.01, no X11 support
Pick one: [1]
Can’t resolve dependency “x11-dev” for package “tcltk-8.4.16-4″ (no matching
packages/versions found)
Exiting with failure.
I am using Leopard, fink-0.28.1. when I tried the fink-0.27.8 (the version posted here) I’m still unable to install mediatomb. In this case it can on find the mediatomb package.
Can you help me here?
Thanks,
-Gary
April 7th, 2008 at 7:57 pm
Hi Sameer,
Thanks for the info. I did install a copy of X11 on my system and the install seems to be working (still going after 20 mins). However, I found a great solution to what I wanted to do (which is to play movies from my mac via my PS3). This link has a neat solution “http://www.avforums.com/forums/showthread.php?t=707579&highlight=Medialink”
All I did was
- enable web sharing
- zip up the files in my /user/sites folder
- copy the files (movies I wanted to watch)
- use my ps3 browser to go to my web site //192.168.1.2/~user/
- select the movie I wanted and play it.
I also saved my link, so I can easily access it the next time.
This works great for what I wanted.
I will still try MediaTomb once it finish installing.
April 7th, 2008 at 8:22 pm
Gary, glad to know your issues have been resolved. Your plan to use the Mac as a web server for the PS3 sounds interesting, I shall give it a shot.
September 28th, 2008 at 9:36 pm
[...] wrote a tutorial back in Dec 2007, on getting the free mediatomb application running (with Fink) on Mac OS X Leopard [...]
September 28th, 2008 at 9:40 pm
Hello Barry,
Thanks for pointing out the missing file - I guess it was lost while I migrated my blog files to a different server. I’ll probably update the file for completeness, but I noticed that mediatomb has now been updated and does not require the workaround that I have outlined in this tutorial.
I’ve posted an update in a new blog post here: http://www.ssaidoor.com/2008/09/28/a-mediatomb-update/
Hope it helps!
December 17th, 2008 at 9:19 pm
Hi guys. Thanks for the advice. I have set up Mediatomb after a bit of headache but it now works without trouble.
I’m on the latest OSx (MacBookPro), latest PS3 update and the latest Fink installed using the package.
I can recommend the following site also for really useful info:
http://www.applesource.com.au/how-to/soa/How-to-Stream-media-to-a-PS3-from-a-Mac/0,2000451082,339287550,00.htm
As an addition to the discussion here I needed the following command.
$ fink selfupdate-rsync
Without this I could not either fetch or install mediatomb, no matter what I did to the *.xml file.
Maybe this helps some folks trying to put this together. Trust me it is worth it. I tried the eyeconnect and it always gave network errors at the PS3 when streaming video… Mediatomb gives no such errors on the same files (sorry don’t know the details, but AVIs approx 350Mb per 30 mins - so it should give an idea of the bit-rate).
Only problem is, I have to scout 500 movies to find the right one cause Mediatomb doesn’t have a sorting routine for movies - as far as I can tell - anyone know better?
Cheers.
JM.
December 18th, 2008 at 3:16 pm
Hi Sameer,
After much toying and time spent trying to install Mediatomb, I’ve been stonewalled after entering the “fink install mediatomb” command with this response:
Can’t resolve dependency “x11-dev” for package “tcltk-8.4.19-1″ (no matching packages/versions found)
Exiting with failure.
Any clues about how to solve this?? I tried reinstalling the X11 package, to no avail. It’s been frustrating to get through this, to say the least.
Many Thanks!
February 9th, 2009 at 3:34 pm
I’ve made a quick and dirty solution to getting Mediatomb to autostart on OS X, using automator. Drop this into your application folder, add to the dock, ctl-click and select “open at login”. this will autostart mediatomb every time you start your mac! (i think you can remove the icon from your dock after selecting open at login, not tested this yet however.) I took the liberty of making an icon for it too, as i couldn’t find a copy of the “official” mediatomb icon anywhere.
you can download the app here: http://www.djbassmonkey.co.uk/MediatombAutostart.zip
this is totally untested except on 10.4.11 Tiger, so use at your own risk, but the automator app is simply a shell call to “mediatomb -d”, so i can’t see why it wouldn’t work in 10.5.x
enjoy, and please let me know how it works out for you!
EDIT: @ Johnny M, i simply browse all my media via the PC directory folder rather than the video folder, this way it preserves the dir structure on your mac, so i have a folder for TV shows, inside which i’ve got a folder for Battlestar, with each series in it’s own folder as well. same with movies, each is in it’s own folder which are in a folder organising them by year. much easier to navigate!