MediaTomb on a Mac Pro running OS X 10.5 (Leopard)

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:

  1. $ sudo port install mediatomb
  2. >  Fetching mediatomb
  3. >  Verifying checksum(s) for mediatomb
  4. >  Extracting mediatomb
  5. >  Applying patches to mediatomb
  6. >  Configuring mediatomb
  7. >  Building mediatomb with target all
  8. >  Staging mediatomb into destroot
  9. >  Installing mediatomb 0.11.0_0+ffmpeg+sqlite3+taglib
  10. ******************************************************
  11. * To use UTF-8 filename and metadata on Mac OS X, add:
  12. *   <filesystem-charset>UTF-8-MAC</filesystem-charset>
  13. *   <metadata-charset>UTF-8-MAC</metadata-charset>
  14. * to <import> section of ~/.mediatomb/config.xml.
  15. ******************************************************
  16. >  Activating mediatomb 0.11.0_0+ffmpeg+sqlite3+taglib
  17. >  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:

  1. $ mediatomb
  2.  
  3. MediaTomb UPnP Server version 0.11.0 – http://mediatomb.cc/
  4.  
  5. ===============================================================================
  6. Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
  7. MediaTomb is free software, covered by the GNU General Public License version 2
  8.  
  9. 2008-11-16 08:15:53    INFO: MediaTomb configuration was created in: /my/home/dir/.mediatomb/config.xml
  10. 2008-11-16 08:15:53    INFO: Loading configuration from: /my/home/dir/.mediatomb/config.xml
  11. 2008-11-16 08:15:53    INFO: UUID generated: d3bafba0-f140-4054-bfcf-1e6e1f0cb97e
  12. 2008-11-16 08:15:53    INFO: Checking configuration…
  13. 2008-11-16 08:15:53    INFO: Setting filesystem import charset to US-ASCII
  14. 2008-11-16 08:15:53    INFO: Setting metadata import charset to US-ASCII
  15. 2008-11-16 08:15:53    INFO: Setting playlist charset to US-ASCII
  16. 2008-11-16 08:15:53    INFO: Configuration check succeeded.
  17. 2008-11-16 08:15:53 WARNING: Sqlite3 database seems to be corrupt or doesn't exist yet.
  18. 2008-11-16 08:15:53    INFO: no sqlite3 backup is available or backup is corrupt. automatically creating database…
  19. 2008-11-16 08:15:53    INFO: database created successfully.
  20. 2008-11-16 08:15:53    INFO: Initialized port: 49152
  21. 2008-11-16 08:15:53    INFO: Server bound to: 10.37.129.2
  22. 2008-11-16 08:15:54    INFO: MediaTomb Web UI can be reached by following this link:
  23. 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:

  1. $ mediatomb -e en0
  2.  
  3. MediaTomb UPnP Server version 0.11.0 – http://mediatomb.cc/
  4.  
  5. ===============================================================================
  6. Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
  7. MediaTomb is free software, covered by the GNU General Public License version 2
  8.  
  9. 2008-11-16 08:47:05    INFO: Loading configuration from: /my/home/dir/.mediatomb/config.xml
  10. 2008-11-16 08:47:05    INFO: Checking configuration…
  11. 2008-11-16 08:47:05    INFO: Setting filesystem import charset to US-ASCII
  12. 2008-11-16 08:47:05    INFO: Setting metadata import charset to US-ASCII
  13. 2008-11-16 08:47:05    INFO: Setting playlist charset to US-ASCII
  14. 2008-11-16 08:47:05    INFO: Configuration check succeeded.
  15. 2008-11-16 08:47:05    INFO: Initialized port: 49152
  16. 2008-11-16 08:47:05    INFO: Server bound to: 10.254.1.10
  17. 2008-11-16 08:47:06    INFO: MediaTomb Web UI can be reached by following this link:
  18. 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 section (note the number in front indicates the line number):

  1.  18     <protocolInfo extend="yes"/><!– For PS3 support change to "yes" –>
  2.  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.

  1.      <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:

  1. # UPnP
  2. $IPFW add 03140 allow tcp from any to any dst-port 49152 in
  3. $IPFW add 03141 allow udp from any to any dst-port 1900 in
  4. $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!

Thumbs DownThumbs Up (+2 rating, 2 votes)
Loading ... Loading ...
  • http://www.chadkeck.com Chad

    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).

  • http://www.collazo.ws robert

    Thanks! Fixed. I’m going to test on my Xbox 360 and post the results.

  • Steven Daniels

    What about transcoding? Did you enable any transcoding in the MediaTomb config? I’m very nterested in transcoding MKVs to PS3.

    • http://www.collazo.ws robert

      @Steven Daniels,
      I’m working on transcoding too. As soon as I have some time to test, I will post a new article.

  • dan

    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?

    • http://www.collazo.ws robert

      @dan Sorry, but no luck on Xbox. See the comment by @Chad about Connect360.