Polls
Most addictive Social Network?
 
Whos Online
We have 91 guests online
Google

Home arrow Home arrow How-to: Stream media to a PS3 from a Mac
How-to: Stream media to a PS3 from a Mac Print E-mail
Submitted by actz   
Sunday, 07 June 2009

ps3.pngWith the advent of the next-generation consoles like Sony's PS3 and Microsoft's XBOX360 there has been a surge in interest in the usage of media streaming capabilities these consoles offer for its users. In the first of a two-part series we'll endeavour to explore free alternatives to achieving this with a Mac acting as the media streaming server.

In part one we'll focus on getting your Mac to work with the PS3 console, and part two we'll take a how to do this on the XBOX360.


What is media streaming?
Media streaming is a functionality that enables the playback of media files, such as music, photos and even videos over one's local network on supported devices. With this functionality you no longer need to transport these media files from your computer to the playing device -- saving time and hard disk space.

The PS3 and XBOX360 both rely on an open standard file sharing protocol known as the DLNA, with the PS3 supporting it only since the 1.80 firmware update. DLNA relies upon uPNP (Universal Plug and Play) for device discovery and communication. According to the DLNA, the initial set of required formats and optional formats supported by DLNA compliant devices are:

Media Class Required Format Set Optional Format Set
Image JPEG PNG, GIF, TIFF
Audio LPCM AAC, AC-3, ATRAC 3plus, MP3, WMA9
AV MPEG2 MPEG-1, MPEG-4*, AVC, WMV9

Please keep this in mind when we eventually have the setup up and running, as some files you may want to stream to the device may not be supported.

MediaTomb is a free and open-source UPnP MediaServer. It will be used to run on your Mac to enable media streaming to your PS3, with the aid of Fink. Be aware that a fair amount of time and Terminal use will be required as the application has to be compiled from source. Not to fear, this tutorial will try to make it as clear and straightforward as possible.

Note: Lines with $ indicate what you have to type into the Terminal command-line.

Installing Xcode
Before proceeding to install Fink, we need to install Xcode from our Mac OS X install discs. If you already have Xcode, please proceed to 'Installing Fink'.

XCode is a set of tools and libraries to develop applications for the Mac and is necessary as it includes compilation software required for compiling from source later in this tutorial.

Xcode should be located on Disc 1 in the folder 'Xcode tools'. At writing 2.4.1 is the latest release, so check the accompanying 'About Xcode Tools.pdf' before proceeding to install. If it is version 2.4.1 or above then double click on 'XcodeTools.mpkg' to launch the installation wizard, or else you will need to grab it from Apple's Developer Connection Web site from here -- registration is required.

Installing Fink

Fink is a package management software for the Mac which provides ports of Unix applications. Common Unix applications are tweaked by the Fink team to work on the Mac platform.

Download the correct version of Fink below:

  1. Fink 0.8.1 Binary Installer (PowerPC) - 17930 KB
  2. Fink 0.8.1 Binary Installer (Intel) - 17510 KB

Mounting the dmg file and double-clicking the pkg file will launch the Fink setup wizard. If you have any issues on how to install Fink please refer to my previous Applesource tutorial or Fink's own install guide.

Upon completion of the Fink installation open a new Terminal window and run the following commands (Terminal is located in the 'Applications -> Utilities' folder):

To obtain the latest list of packages available from the Fink repositories we need to run the following command.

$ sudo fink scanpackages; fink index

You will be prompted for a password, supply your current account password and hit enter.

Check to see if Fink is the latest version.

$ sudo fink selfupdate

When prompted for 'SelfUpdateMethod' selection simply hit enter to select the default option, it will proceed to update Fink to the latest release. This may take some time, so go grab a coffee or find something else to do in the meantime.

Fink may also during this process prompt you if you would like to change the 'Mirror selection' as it has been updated, again selecting the default option by hitting enter is sufficient.

Lets update any out-of-date packages:

$ fink update-all

If the command ends with "Could not resolve inconsistent dependencies" please enter the following:

$ sudo fink scanpackages; apt-get update; fink update-all

Fink is now ready for use!

Install MediaTomb

MediaTomb according to Fink is deemed unstable, and by default Fink will only look at stable applications. To solve this we need to enable the unstable repositories in the Fink conf file by editing the fink.conf file.

$ sudo nano /sw/etc/fink.conf

You need to modify the line from:

Trees: local/main stable/main stable/crypto

to


Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

Display of fink.conf

To save your changes simply use the keyboard shortcut of 'CTRL+S' and to get back to the terminal 'CTRL+X'.

Run the following command to update the packages list:

$ sudo fink selfupdate; fink scanpackages; fink index

We are now ready to finally install MediaTomb!

$ fink install mediatomb

You will be asked a series of questions, like previously, select the default options by hitting enter and answer 'Y' to the subsequent prompt to install a list of packages.

It will now proceed to download all required files and compile it for the Mac operating system. This process will take some time, and the total downloads will be over 100MB. Go and make yourself another cup of coffee ... it may take awhile.

Configure MediaTomb for PS3

By default MediaTomb's configuration file will not enable it to work with the PS3, you will see the device but all the media files will appear as 'Unsupported data'.

To fix this problem you need to modify the config.xml and add the tag < protocolInfo extend="yes" /> within the < server> tags in the file.

The config.xml is located within the current user's directory under '.mediatomb'. An example would be: /Users/james.ho/.mediatomb/config.xml.

$ nano /Users/james.ho/.mediatomb/config.xml

You should replace 'james.ho' with your account name.

There are a number of variables you can tweak like the name of the server from the generic 'MediaTomb' to 'Mac Media Server' for example.

The tag was placed just above the < /server> one as can be seen in the screenshot below of the config file.

MediaTomb config

Before we save the changes we have made we also need to add some extra tags into the conf file, these relate to the mapping of common media file extensions to their appropriate mimetype which MediaTomb and the PS3 require. It is odd that these are not included in the first place. Add the following tags within the < /extension-mimetype> tags:

< map from="mpg" to="video/mpeg" />
< map from="m2v" to="video/mpeg" />
< map from="gif" to="image/gif" />
< map from="jpg" to="image/jpeg" />
< map from="png" to="image/png" />

MediaTomb - Adding mimetypes

These are by no means all the file extensions and mimetypes that you can/should add to the list. If you want to add a new extension and mimetype the best way to determine the correct mimetype is to run the following command on the media file:

$ file -i fullpath to file

Like before when editing the Fink config file, once completed save your changes and exit from the editor.

MediaTomb is ready to be run, fire it up simply by entering:

$ mediatomb

A list of messages will be displayed, this can be ignored as long as the program does not terminate with errors. It should look like the following:

MediaTomb launched

Take note of the following line, it refers to the url to access MediaTomb's web interface to organise your library of media files:

$ 2007-07-26 14:46:46 INFO: http://10.19.1.171:49152/

Another option is to run it as a daemon so a running Terminal does not need to be opened and MediaTomb is running in the background.

$ mediatomb -d

To shutdown the MediaTomb server when running it as a standalone the keyboard shortcut of 'CTRL+C' on the active Terminal window will do the trick and messages will be displayed informing you of this. If you're running it as a daemon the following command is to be used in a Terminal:

$ killall mediatomb

If all is successful you will see the server displayed on the PS3 screen.

MediaTomb on TV

Categorising content in MediaTomb (Optional)

By default you will only see listed 'PC directory'. If you want to have MediaTomb sort through your media files you have to go to the Web interface. In this case it is at http://10.19.1.171:49152/, type that into a Web browser.

MediaTomb Web Interface

To add content, select 'Filesystem' and browse to a music directory, for example, and click on the + to the top right of the Web page to let MediaTomb sort through the music files.

 

MediaTomb Web Interface - Add music

MediaTomb categorising content

Basically MediaTomb is sorting the mp3s in the directory and examining the ID3 tags to do its categorising. On completion you will see the same structure appear on the PS3.

If you want more information please refer to the MediaTomb documentation.

Update MediaTomb (Optional)

At the time of writing, MediaTomb's latest version is 0.10.0, and the version Fink has available is 0.9.1. This procedure works with version 0.10.0, but may fail if required libraries need updating - you have been warned.

Download the 0.10.0 sourcecode here. Once downloaded extract its contents by executing the following command:

$ tar zxvf mediatomb-0.10.0.tar.gz

Transverse into the resultant 'mediatomb-0.10.0' directory and run the configuration script like so:

$ ./configure --prefix=/sw --with-search=/sw

If there are no errors you can proceed to compile and install the application:

$ sudo make; make install

Once this is completed MediaTomb has been updated to 0.10.0!

MediaTomb and XBOX360

Currently MediaTomb does not fully support the XBOX360 as it acts differently from the PS3, but the code is already there to make it work in future versions.

Limitation

Playback of unsupported media files at the moment is not possible until MediaTomb implements transcoding capabilities, which the MediaTomb developers have hinted will be soon. So if you see 'Unsupported data' in the place of media files, unfortunately you have either set the wrong mimetype in the MediaTomb config or the PS3 simply cannot play it.

According to the PS3 User Guide, the following are the supported media types:

Photos
* JPEG (DCF 2.0/Exif 2.21 compliant)
* TIFF
* BMP
* GIF
* PNG
Music
* Memory Stick Audio Format(ATRAC)
* MP3(MPEG-1/2 Audio Layer 3)
* MP4(MPEG-4 AAC)
* WAVE(Linear PCM)
* WMA
Video
* Memory Stick Video Format
- MPEG-4 SP (AAC LC)
- H.264/MPEG-4 AVC Main Profile (AAC LC)
* MP4 file format
- H.264/MPEG-4 AVC High Profile (AAC LC)
* MPEG-1 (MPEG Audio Layer 2)
* MPEG-2 PS (MPEG2 Audio Layer 2, AAC LC, AC3(Dolby Digital), LPCM)
* MPEG-2 TS (MPEG2 Audio Layer 2)
* AVI
- Motion JPEG (Linear PCM)
- Motion JPEG (?-Law)
* AVCHD (.m2ts / .mts)
 
< Prev   Next >
Design by Boxlight Media © 2006 - 2007 All Rights Reserved - Archive