I had been looking at some commercial solutions to stream media from my Mac Pro running OS X 10.5 to my Xbox 360. I had tried Rivet but didn’t have any luck with it. While discussing streaming media solutions with a co-worker, he mentioned that I should try out MediaTomb and get it streaming to my PS3. Luckily I didn’t have to do much to get it installed. I have MacPorts installed so installing MediaTomb was as simple as running:
-
$ sudo port install mediatomb
-
—> Fetching mediatomb
-
—> Verifying checksum(s) for mediatomb
-
—> Extracting mediatomb
-
—> Applying patches to mediatomb
-
—> Configuring mediatomb
-
—> Building mediatomb with target all
-
—> Staging mediatomb into destroot
-
—> Installing mediatomb 0.11.0_0+ffmpeg+sqlite3+taglib
-
******************************************************
-
* To use UTF-8 filename and metadata on Mac OS X, add:
-
* <filesystem-charset>UTF-8-MAC</filesystem-charset>
-
* <metadata-charset>UTF-8-MAC</metadata-charset>
-
* to <import> section of ~/.mediatomb/config.xml.
-
******************************************************
-
—> Activating mediatomb 0.11.0_0+ffmpeg+sqlite3+taglib
-
—> Cleaning mediatomb
No problems with the install. Next, I ran it to see what would happen (not much for reading the docs). At the prompt I typed:
-
$ mediatomb
-
-
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
-
-
2008-11-16 08:15:53 INFO: MediaTomb configuration was created in: /my/home/dir/.mediatomb/config.xml
-
2008-11-16 08:15:53 INFO: Loading configuration from: /my/home/dir/.mediatomb/config.xml
-
2008-11-16 08:15:53 INFO: UUID generated: d3bafba0-f140-4054-bfcf-1e6e1f0cb97e
-
2008-11-16 08:15:53 INFO: Checking configuration…
-
2008-11-16 08:15:53 INFO: Setting filesystem import charset to US-ASCII
-
2008-11-16 08:15:53 INFO: Setting metadata import charset to US-ASCII
-
2008-11-16 08:15:53 INFO: Setting playlist charset to US-ASCII
-
2008-11-16 08:15:53 INFO: Configuration check succeeded.
-
2008-11-16 08:15:53 WARNING: Sqlite3 database seems to be corrupt or doesn't exist yet.
-
2008-11-16 08:15:53 INFO: no sqlite3 backup is available or backup is corrupt. automatically creating database…
-
2008-11-16 08:15:53 INFO: database created successfully.
-
2008-11-16 08:15:53 INFO: Initialized port: 49152
-
2008-11-16 08:15:53 INFO: Server bound to: 10.37.129.2
-
2008-11-16 08:15:54 INFO: MediaTomb Web UI can be reached by following this link:
-
2008-11-16 08:15:54 INFO: http://10.37.129.2:49152/
-
Something didn’t quite look right there and then I realized that MediaTomb had started on the wrong interface. My LAN is on 10.254.0.0/16 and the 10.37 net didn’t match that. I quit MediaTomb by hitting CTRL-C and restarted it again by doing:
-
$ mediatomb -e en0
-
-
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
-
-
2008-11-16 08:47:05 INFO: Loading configuration from: /my/home/dir/.mediatomb/config.xml
-
2008-11-16 08:47:05 INFO: Checking configuration…
-
2008-11-16 08:47:05 INFO: Setting filesystem import charset to US-ASCII
-
2008-11-16 08:47:05 INFO: Setting metadata import charset to US-ASCII
-
2008-11-16 08:47:05 INFO: Setting playlist charset to US-ASCII
-
2008-11-16 08:47:05 INFO: Configuration check succeeded.
-
2008-11-16 08:47:05 INFO: Initialized port: 49152
-
2008-11-16 08:47:05 INFO: Server bound to: 10.254.1.10
-
2008-11-16 08:47:06 INFO: MediaTomb Web UI can be reached by following this link:
-
2008-11-16 08:47:06 INFO: http://10.254.1.10:49152/
Now it has the right IP address. I checked to see if I could browse to it via my browser and the UI came up right away. I could see it scanning my machine for media to serve. Next I turned on the PS3 and went to Video and then selected search for media servers. It didn’t find anything and realized I better check the config.xml in the .mediatomb directory under my home directory. I stopped MediaTomb and went edited the file (with emacs in case you’re wondering). I changed the following under the
-
18 <protocolInfo extend="yes"/><!– For PS3 support change to "yes" –>
-
60 <map from="avi" to="video/divx"/>
I also found that I could add the following line under the section so that it would bind to the correct interface when it started.
-
<interface>en0</interface>
I restarted MediaTomb and went back into the PS3 menu. The PS3 still couldn’t find the media server. Doing a “sudo lsof -i -p” on my Mac showed that MediaTomb was running. Next I checked my firewall rules and realized I didn’t have any rules that would allow the PS3 to connect to my Mac. I added the following rules to my script that customizes my ipfw configuration:
-
# UPnP
-
$IPFW add 03140 allow tcp from any to any dst-port 49152 in
-
$IPFW add 03141 allow udp from any to any dst-port 1900 in
-
$IPFW add 03142 allow tcp from any to any dst-port 1900 in
I re-ran the firewall script and went back to the PS3. There was a new entry under video called “MediaTomb” and I was able to browse and play back media that I had stored on my Mac Pro. All done!
You mentioned an Xbox 360 in the beginning of your post, but then kept talking about a PS3. Type I assume. For anyone who has an Xbox 360 and wants to stream media from their Mac, take a look at Connect 360 (http://www.nullriver.com/products/connect360).
Reply
Thanks! Fixed. I’m going to test on my Xbox 360 and post the results.
Reply
What about transcoding? Did you enable any transcoding in the MediaTomb config? I’m very nterested in transcoding MKVs to PS3.
Reply
robert Reply:
November 24th, 2008 at 1:51 pm
@Steven Daniels,
I’m working on transcoding too. As soon as I have some time to test, I will post a new article.
Reply
Hey robert, thanks for the great tutorial…I got all the way through and have mediatomb up and running with a database, but my xbox 360 is not seeing it… Looking into mediatomb’s official documentation, they say it’s not supported (read: I’m an idiot, I don’t know how I got all the way through installation and setup without noticing this little tidbit), but you suggested on here that you were giving it a try on a xbox 360. Any luck?
Reply
robert Reply:
February 10th, 2009 at 1:47 am
@dan Sorry, but no luck on Xbox. See the comment by @Chad about Connect360.
Reply