[HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

[HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby jgl75 » Fri Aug 21, 2009 9:21 pm

[HowTo] Install PS3 Media Server on an headless Ubuntu 9.04 Server 64bits

This is only an adaptation of the excellent post done by vmlinuz here.

This HowTo was realised in a VM on Fusion using 2 vCPU and 1024Mb of RAM.
Transcoding of 1080p MKV worked fine !

I'm now ready to buy the parts needed to build my new DIY NAS which will also serve as a PS3 Media Server ;-).

The procedure start here !

get 'svn' and' git' apps and needed compile tools
Code: Select all
sudo -s
apt-get install subversion build-essential git-core checkinstall yasm libgpac-dev


get neeeded lib dev here.
Code: Select all
apt-get install em8300-headers gawk gettext html2text intltool-debian \
ladspa-sdk libaa1-dev libasound2-dev libatk1.0-dev libaudio-dev \
libaudio2 libaudiofile-dev libavahi-client-dev libavahi-common-dev libcaca-dev \
libcairo2-dev libcdparanoia0-dev libcucul-dev libdbus-1-dev libdbus-glib-1-dev \
libdirectfb-dev libdirectfb-extra libdts-dev libdv4-dev libenca-dev libenca0 \
libesd0-dev libexpat1-dev libfaac-dev libfaac0 libfontconfig1-dev libfreebob0 \
libfreetype6-dev libfribidi-dev libggi-target-x libggi2 libggi2-dev libggimisc2 \
libggimisc2-dev libgif-dev libgii1 libgii1-dev libgii1-target-x libgl1-mesa-dev \
libglib2.0-dev libglide3 libglu1-mesa-dev libglu1-xorg-dev libgtk2.0-dev libice-dev \
libjack-dev libjack0 libjpeg62-dev liblzo-dev liblzo1 liblzo2-2 liblzo2-dev libmad0 \
libmad0-dev libmail-sendmail-perl libmp3lame-dev libmp3lame0 libmpcdec-dev libmpcdec3 \
libncurses5-dev libogg-dev libopenal-dev libopenal1 libpango1.0-dev libpixman-1-dev \
libpng12-dev libpopt-dev libpthread-stubs0 libpthread-stubs0-dev libpulse-dev \
libpulse-mainloop-glib0 libsdl1.2-dev libslang2-dev libsm-dev libsmbclient-dev \
libspeex-dev libsvga1 libsvga1-dev libsys-hostname-long-perl libsysfs-dev \
libtheora-dev libtwolame-dev libtwolame0 libvorbis-dev libx11-dev libxau-dev \
libxcb-render-util0-dev libxcb-render0-dev libxcb1-dev \
libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev \
libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev libxt-dev libxv-dev \
libxvidcore4 libxvidcore4-dev libxvmc-dev libxvmc1 libxxf86dga-dev libxxf86vm-dev \
mesa-common-dev po-debconf sharutils x11proto-composite-dev x11proto-core-dev \
x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev \
x11proto-randr-dev x11proto-render-dev x11proto-video-dev x11proto-xext-dev \
x11proto-xf86dga-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev \
xtrans-dev zlib1g-dev libschroedinger-dev libstdc++5 libfaad-dev \
libgsm1-dev libdc1394-22-dev libfaad-dev libsdl1.2-dev


get latest svn mplayer
Code: Select all
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer


get ffmpeg-mt
Code: Select all
git clone git://gitorious.org/ffmpeg/ffmpeg-mt.git

get last x264
Code: Select all
git clone git://git.videolan.org/x264.git


compil x264
Code: Select all
cd x264
./configure --enable-shared
make
checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-ubuntu"
/usr/src/x264# ldconfig


compil and install ffmpeg multithread
Code: Select all
cd ffmpeg-mt/

Delete /usr/src/ffmpeg-mt/libswscale
Code: Select all
git clone git://git.ffmpeg.org/libswscale/


Code: Select all
./configure –-enable-pthreads
make
make install


compil and install mencoder multithread
Code: Select all
cd ../mplayer/
cp -rf ../ffmpeg-mt/libavcodec libavcodec
cp -rf ../ffmpeg-mt/libavformat libavformat
cp -rf ../ffmpeg-mt/libavutil libavutil
./configure
make
make install
export LD_LIBRARY_PATH=/usr/local/lib/


You need ant and its stuff
Code: Select all
apt-get install ant ant-gcj ant-optional ant-optional-gcj \
ca-certificates-java default-jdk default-jre default-jre-headless gcj-4.3-base java-common \
libaccess-bridge-java libgcj-bc libgcj-common libgcj9-0 libgcj9-jar libjaxp1.3-java \
libjaxp1.3-java-gcj libxerces2-java libxerces2-java-gcj openjdk-6-jdk openjdk-6-jre \
openjdk-6-jre-headless openjdk-6-jre-lib rhino ttf-bengali-fonts ttf-kannada-fonts \
ttf-oriya-fonts ttf-telugu-fonts ttf-wqy-zenhei tzdata-java


Now get last SVN PMS code
Code: Select all
cd /usr/src/
svn checkout http://ps3mediaserver.googlecode.com/svn/trunk/ ps3mediaserver-read-only


Compile it
Code: Select all
cd ps3mediaserver-read-only/ps3mediaserver
ant


Open PMS.conf and set mencoder_ass to “false” to allow correct subtitles display.

Add you JAVA_HOME path to /etc/environment. (mine was : /usr/lib/jvm/java-6-openjdk/jre)
You must also add
Code: Select all
JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre

After the DIRNAME=`dirname $0`line in your PMS.sh file

Now you can use latest compiled PMS.jar or extract full release from generated tar.gz file

The procedure was updated on 9/10/2008. I still have to check that everything works at home.

Enjoy !

Big Thanks to useful links
http://ubuntuforums.org/showthread.php?t=786095 for ffmpeg
http://ubuntuforums.org/showthread.php?t=1024592 for mplayer
Last edited by jgl75 on Fri Oct 09, 2009 9:18 am, edited 1 time in total.
Ubuntu 9.04 x64 server - PS3 Media Server - Netatalk - Bonjour - Time Machine support
Core2Duo E8500 @ 2.93Ghz - 4Go RAM - 3To software raid 5 array
PS3 & Mac Mini with Plex as media players
jgl75
 
Posts: 10
Joined: Thu Aug 20, 2009 2:39 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby sjimmie » Fri Oct 02, 2009 1:14 pm

JGL75.

What an excellent post.
I'm running 9.04 64bit aswell and your HOWTO works almost perfectly.
I have 2 corrections:

package: liblzo-dev should be liblzo2-dev and liblzo1 doesnt exsist anymore.

The modification in the /usr/src/ffmpeg-mt/libavutil/common.h was already in the file after I downloaded it from the latest git.

I can't wait to get home and test the setup. I will let you know the result.

- Boris

PS: the reason why you have so many views and no replies means your post works just perfectly for everyone :)
ps3mediaserver > xbmc
sjimmie
 
Posts: 5
Joined: Tue Sep 29, 2009 7:56 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby sjimmie » Sat Oct 03, 2009 4:37 pm

Sorry to report but I still don't have mkv streaming working I'm afraid.

I'll post a new thread with my problem because I'm completely stuck and don't know where to look anymore.

- Boris
ps3mediaserver > xbmc
sjimmie
 
Posts: 5
Joined: Tue Sep 29, 2009 7:56 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby jgl75 » Wed Oct 07, 2009 7:51 pm

Hello!

I've finally bought my new NAS and I will install PMS on it.

I'll update the procedure with your mods.

Cheers !

Jean
Ubuntu 9.04 x64 server - PS3 Media Server - Netatalk - Bonjour - Time Machine support
Core2Duo E8500 @ 2.93Ghz - 4Go RAM - 3To software raid 5 array
PS3 & Mac Mini with Plex as media players
jgl75
 
Posts: 10
Joined: Thu Aug 20, 2009 2:39 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby jgl75 » Fri Oct 09, 2009 7:53 pm

Ouch, my ubuntu server is not streaming my videos so well and I don't know why...

CPU is a Core2Duo 2.93Ghz with 4Go of RAM and Gigabit ethernet...
My VM was way faster and I can't stream DVD rips.

... I'll have to investigate this...
jgl75
 
Posts: 10
Joined: Thu Aug 20, 2009 2:39 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby vmlinuz » Fri Oct 09, 2009 8:23 pm

Merci Jean pour le excellent post !
I should test yours asap,
hope this last updated will help me to refresh my install.
tty
Seb.
CPU Intel Q9550 & RAM 4GB Lan : <100Mb/s wired> Router <100Mb/s> <CPL 200Mb/s @ 160Mb/s >=< 100Mb/s> PS3
old config til Feb 22th : Athlon x64 4200+ oc@2.6Gh RAM 4Gb
vmlinuz
 
Posts: 35
Joined: Mon Jan 19, 2009 10:25 am

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby vmlinuz » Wed Oct 14, 2009 7:30 pm

so that's good, tested on Ubuntu 9.04 and 9.10
yes so it's great and work fine.
Just some lib links to updates under 9.10
very good.
tty soon.
Seb.
CPU Intel Q9550 & RAM 4GB Lan : <100Mb/s wired> Router <100Mb/s> <CPL 200Mb/s @ 160Mb/s >=< 100Mb/s> PS3
old config til Feb 22th : Athlon x64 4200+ oc@2.6Gh RAM 4Gb
vmlinuz
 
Posts: 35
Joined: Mon Jan 19, 2009 10:25 am

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby mushroomblue » Fri Oct 16, 2009 5:08 pm

Hi there. thanks for the tutorial.

for those of us that run MacOS X or Linux, the easiest way to administer the system is to ssh into the machine and forward the GUI to our desktop. this can be done with the command
Code: Select all
ssh -Xf user@ip.addr.ess /path/to/pms/Script.sh
the -Xf is to forward X, and run in background (useful if you need to do multiple tunnels). this is just scratching the surface of possibilities, but it's sufficient for this tutorial.

if you'd like to secure your headless server (as I did), I suggest disabling password logins over ssh, and switch to using ssh keys. This link was very helpful, and it only took 3-4 minutes to perform the steps required to secure the connection.

also, you might want to enable a firewall on the machine. Luckily, Ubuntu 9.04 comes with ufw. let's open port 22 (ssh) and enable the firewall.

Code: Select all
$ sudo ufw allow 22/tcp
$ sudo ufw enable
If your SSH port has been configured differently, adjust the port to your liking. Also, note that if we enabled the firewall before allowing ssh, it would freeze the connection. make sure to tell UFW you want SSH open first. :)

PS3MediaServer likes to run on port 5001 by default (though I always manually specify ports in the config), so you'll want to open that port up as well.
Code: Select all
$ sudo ufw allow 5001
Again, change ports if you need to.

you can check the configured ports on your system using ufw as well.
Code: Select all
$ sudo ufw status
Status: active

To                         Action  From
--                         ------  ----
22/tcp                     ALLOW   Anywhere
5001                       ALLOW   Anywhere
Just remember that anything you don't explicitly open (i.e. port 80 for HTTP, port 443 for HTTPS, etc) will not be allowed on the machine.

hope this helps someone.
mushroomblue
 
Posts: 3
Joined: Sun Jul 26, 2009 6:30 pm

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby otmanix » Sat Oct 17, 2009 6:49 am

the -Xf is to forward X

I think -X won't work on some NAS devices running Linux because of missing X Windows.
I provide NO application support via PM, so please post your question to the forum.
PS3 Media Server related articles on my blog: http://otmanix.de/?cat=11&lang=en
User avatar
otmanix
 
Posts: 528
Joined: Fri Jan 30, 2009 12:40 am
Location: Bavaria, Germany

Re: [HowTo] Install PS3 Media Server on an headless Ubuntu 9.04

Postby 2k1 » Wed Oct 21, 2009 5:45 pm

Just registered to say thanks for this guide. I have streaming/transcoding working perfectly from my headless 9.04 server. I also combined this with http://ps3mediaserver.org/forum/viewtopic.php?f=3&t=902 to run PMS as a service.

Thanks!
2k1
 
Posts: 1
Joined: Wed Oct 21, 2009 5:42 pm

Next

Return to Linux/Unix Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest