Wednesday, July 6, 2011

Installing PS3 Media Server on Ubuntu 11.04

I am re-installing everything after I upgraded my Ubuntu to 11.04 with a clean install. PS3 Media Server is one of software packages to reinstall.

1. Resources

PS3 Media Server Homepage: http://code.google.com/p/ps3mediaserver/
My Previous Installation (Ubuntu 10.10): http://socrateos.blogspot.com/2011/01/1.html
A step-by-step instruction: http://irrationale.com/2010/06/30/ps3-media-server-on-ubuntu-10-04/

2. Preparations

PS3 Medea Server requires: sun-java6-jre, mplayer, mencoder,and ffmpeg.

I use Synapitc for package installation when possible, and these packages are all available from Synaptic. However, sun-jav6-jre is not available in the default repository of Ubuntu 11.04. You have to enable Canonical Partners repositories first before installing it. To do this, launch Synoptic. Goto the Settings menu and select Repositories option. Then goto the Other Software tab. Enable Canonical Partners. Then click the Refresh button to refresh the list of packages. Now search and install all these packages from Synaptic.

3. Download (or not)

I decided to use older version of PS3 Media Server (pms-generic-linux-unix-1.20.412.tgz) instead of downloading the latest version (pms-generic-linux-unix-1.25.1.tgz). The reasons were that I had a little problem with the newer version when I upgraded to it in my previous Ubuntu (10.10) and that I did not have any issue with the older version (1.20.412). Although I could not find a way to download an older version, I had a copy this older version in my download folder.

4. Installation

The installation process was basically same as before (http://socrateos.blogspot.com/2011/01/1.html) except that I did not edit PMS.conf file. I used its default settings (and it worked).

mv ~/pms-linux-1.20.412/ /opt/pms 
$ cd /opt/pms
$ sudo chmod +x PMS.sh
$ sudo chmod +x linux/tsMuxeR

5. Launch

Launch the server
$ cd /opt/pms
$ ./PMS.sh


6.Configuration

Added my Video and Photo folders for streaming.

7.Adding to Main Menu

Since I do not run PS3 Media Server all the time, I do not like to run it as a daemon. But I do not like to execute it from a command line either. So I created a Ruby script to call from the Main Menu.

This is my simple Ruby script that execute a script (pms.rb) that launch the Media Server.
#!/usr/bin/env ruby
#
# pms.rb
#       
# Launch PS3 MediaPlayer Server

system "cd /opt/pms;./PMS.sh"
Note that I cd to the directory where PMS.sh script is before executing it. Otherwise, PS3 Media Server does not run correctly.

Make it executable.
$ sudo chmod 755 pms.rb

Then I put it in the Main Menu Bar.
(a) Preference Menu > Main Menu
(b) Select "Sound and Video" category.
(c) "New Item" button
(d) Give it a Menu Item Name: "PS3 Media Server"
(e) Specify location of the Ruby script.
Now I can start the Media Serve at anytime easily.

It's been working great.

No comments:

Post a Comment