| Install PlayStation Media Server (PMS) on a Synology NAS |
|
|
|
| News - Ubuntu / Linux / Unix |
| Written by Mark Veenstra |
| Monday, 21 November 2011 13:30 |
|
PlayStation Media Server is a great extra Media Center for your Synology. With PMS you are able to stream MKV files to your PS3 or any other DLNA/UPnP device. You are also able to stream SopCast directly through PMS to your TV! This is why I wanted PMS to be able to run on my Synology. Unfortunally the installation isn't easy. I have been searching the internet and eventually I got it up and running. Luckely I wasn't the only Synology user who was trying to get PMS running. So I ended up on the PS3MediaServer forum. A user called 'synops' was also busy trying to get it up and running. So we had a little personal forum entry on the PS3MediaServer forum. You can find the thread here: http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&t=12387. To make every step more clearly, synops and I deliver you this installation guide which worked on our Synology's. First of all, PMS needs Java 1.6 or higher. Unfortunally this version is not available through ipkg. The 'jamvm' package you find in ipkg is not the correct version. Therefore we need to install the correct version manually. Before you can do this you need to know which CPU your Synology has. You can find a table overview here: http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have. Personally I own a DS211j. So my CPU is a 'Marvell Kirkwood mv6281 1.2Ghz ARM Processor'. Synops (from the PS3MediaServer forum) had a DS211+, which has a CPU 'Marvell Kirkwood mv6282 1.6Ghz ARM Processor (Marvell ARMADA 300)'. Once you have found your CPU info you need to download Java SE Embedded Runtime from Oracle. If you have an ARM processor like me and synops. You can download the ARMv5 from the Oracle site. The package was named 'ejre-1_6_0_27-fcs-b07-linux-arm-sflt-eabi-headless-18_jul_2011.tar.tar' at the moment of writing. I downloaded this file and saved it into the folder '/volume1/@tmp/'. I suggest you do the same. Here are the steps from the CLI (as root) for installing Java: root@yournas> mkdir /opt/java root@yournas> cd /volume1/@tmp/ root@yournas> tar zvxf ejre-1_6_0_27-fcs-b07-linux-arm-sflt-eabi-headless-18_jul_2011.tar.tar root@yournas> mv ejre1.6.0_27 /opt/java/ root@yournas> /opt/java/ejre1.6.0_27/bin/java -version The last entry above is a way to test the installation. It should output something like this: markdark-nas> /opt/java/ejre1.6.0_27/bin/java -version java version "1.6.0_27" Java(TM) 2 Runtime Environment, Standard Edition for Embedded (build 1.6.0_27-b07, headless) Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode) Now that we have a correct version of Java installed we need to install some more packages needed for PMS, see next: root@yournas> ipkg install classpath svn coreutils vlc autoconf automake bash binutils dbus diffutils ffmpeg gcc root@yournas> ipkg install gconv-modules glib gnutls libc-dev libcurl libgcrypt libsigc++ libstdc++ libtool make root@yournas> ipkg install zlib gettext gzip bzip2 libmpeg2 x264 transcode fontconfig We also need to genarate aD-Bus machine ID for VLC streaming: root@yournas> dbus-uuidgen --ensure
We also need to edit the profiles for all users (file '/opt/etc/profile'), it should look like something as this: # # Bash initialization script # PS1="[\u@\h \W]$ " PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH} JAVA_HOME=/opt/java/ejre1.6.0_27 export PS1 PATH LD_LIBRARY_PATH JAVA_HOME The profiles for all root users needs some adjustment as well. The file '/etc/profile', should look something like this: PATH=/opt/java/ejre1.6.0_27/bin:/opt/bin:/opt/sbin:$PATH JAVA_HOME=/opt/java/ejre1.6.0_27 export JAVA_HOME Now we are going to install MPlayer. We can only install this (as far as I know) through SVN: root@yournas> mkdir /opt/local/mplayer root@yournas> cd /opt/local/mplayer root@yournas> svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer In order to get PMS running we need to download, compile and install mediainfo, libmediainfo and libzen. In order to do this, you can visit the SourceForge site and download the file 'MediaInfo_CLI_0.7.51_GNU_FromSource.tar.bz2'. Save this file to '/volume1/@tmp/'. Before we start extracting this file and start compiling we need to check some settings, because synops and I encountered some compiling issues otherwise. First of all check if the next file exists: root@yournas> ls -la /opt/lib/libstdc\+\+.so lrwxrwxrwx 1 root root 18 Oct 20 12:54 /opt/lib/libstdc++.so -> libstdc++.so.6.0.9 If it doesn't, please create a symlink as follows: root@yournas> ln -s /lib/libstdc++.so.6 /opt/lib/libstdc++.so
Another workaround for compiling is needed, we found this workaround here http://forum.synology.com/enu/viewtopic.php?f=90&t=30132: root@yournas> mkdir /opt/arm-none-linux-gnueabi/lib_disabled root@yournas> mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled root@yournas> cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/ root@yournas> cd /opt/arm-none-linux-gnueabi/lib/ root@yournas> ln -s libpthread.so.0 libpthread.so root@yournas> ln -s libpthread.so.0 libpthread-2.5.so Now we are ready to extract, compile and install MediaInfo etc.: root@yournas> cd /volume1/@tmp/ root@yournas> tar zxvf MediaInfo_CLI_0.7.51_GNU_FromSource.tar.bz2 root@yournas> cd /volume1/@tmp/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI root@yournas> make install root@yournas> cd /volume1/@tmp/MediaInfo_CLI_GNU_FromSource/ZenLib/Project/GNU/Library root@yournas> ./configure –enable-shared=yes root@yournas> make root@yournas> make install root@yournas> cp /usr/local/lib/libzen.so* /usr/lib/ root@yournas> cd /volume1/@tmp/MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/GNU/Library root@yournas> ./configure –enable-shared=yes root@yournas> make root@yournas> make install root@yournas> cp /usr/local/lib/libmediainfo.so* /usr/lib/ We are almost there :-). We need to download libffi and install this. Make sure to download and install version 3.0.9, as version 3.0.10 will result into errors. You can download libffi 3.0.9 from here: ftp://sourceware.org/pub/libffi/. We did the next steps: root@yournas> cd /volume1/@tmp/ root@yournas> wget ftp://sourceware.org/pub/libffi/libffi-3.0.9.tar.gz root@yournas> tar zxvf libffi-3.0.9.tar.gz root@yournas> cd libffi-3.0.9/ root@yournas> ./configure root@yournas> make root@yournas> make install # did not work for us, so we just copied the created libs to /usr/libs root@yournas> cp .libs libffi.s* /usr/lib Finally we can download and install PlayStation Media Server: root@yournas> cd /volume1/@tmp/ root@yournas> wget https://ps3mediaserver.googlecode.com/files/pms-generic-linux-unix-1.50.0.tgz root@yournas> tar zxvf pms-generic-linux-unix-1.50.0.tgz root@yournas> mkdir /opt/local/ root@yournas> mv pms-linux-1.50.0 /opt/local/ root@yournas> chown -R admin:users /opt/local/pms-linux-1.50.0/ We need to add libjnidispatch.so manually to pms.jar otherwise it can't be found. To do this, download libjnidispatch.so from http://packages.debian.org/sid/libjna-java for your processor. If you had the same processor as synops and I, you can download the armel version from this site. Follow the next steps, but download the correct version for you processor! root@yournas> cd /volume1/@tmp/ root@yournas> wget http://ftp.nl.debian.org/debian/pool/main/libj/libjna-java/libjna-java_3.2.7-4_armel.deb root@yournas> ar vx libjna-java_3.2.7-4_armel.deb root@yournas> tar -xzf data.tar.gz root@yournas> mkdir /opt/local/pms-linux-1.50.0/com root@yournas> mkdir /opt/local/pms-linux-1.50.0/com/sun root@yournas> mkdir /opt/local/pms-linux-1.50.0/com/sun/jna root@yournas> mkdir /opt/local/pms-linux-1.50.0/com/sun/jna/linux-arm root@yournas> cp /volume1/@tmp/usr/lib/jni/libjnidispatch.so /opt/local/pms-linux-1.50.0/com/sun/jna/linux-arm/ root@yournas> jar uf /opt/local/pms-linux-1.50.0/pms.jar /opt/local/pms-linux-1.50.0/com/sun/jna/linux-arm/libjnidispatch.so root@yournas> chown -R admin:users /opt/local/pms-linux-1.50.0/ Let's create some basic configuration which is needed in order to be able to start PMS. First we create the file PMS.conf. All configuration entries can be found here: http://www.ps3mediaserver.org/forum/viewtopic.php?p=15283. So create the file /opt/local/pms-linux-1.50.0/PMS.conf and enter the next as minimum: thumbnails = true image_thumbnails = true folders = /volume1/video,/volume1/photo,/volume1/music port = 5555 hidevideosettings = true I have also created a configuration for Web streaming. You can do this also, by creating the file /opt/local/pms-linux-1.50.0/WEB.conf and fill it as next: ########################################################################################################## # # # WEB.conf: configure support for web feeds and streams # # # # NOTE: This file must be placed in the profile directory to work: # # # # http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=32731#p32731 # # # # Supported types: # # # # imagefeed, audiofeed, videofeed, audiostream, videostream # # # # Format for feeds: # # # # type.folders,separated,by,commas=URL # # # # Format for streams: # # # # type.folders,separated,by,commas=name for audio/video stream,URL,optional thumbnail URL # # # # For more web feed/stream options, see: # # # # http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=37084#p37084 # # http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=8776&p=46696#p46696 # # # ########################################################################################################## # image feeds imagefeed.Web,Pictures=http://api.flickr.com/services/feeds/photos_public.gne?id=29142919@N07&lang=en-en&format=rss_200 imagefeed.Web,Pictures=http://picasaweb.google.fr/data/feed/base/user/nefuisalbum/albumid/5218433104757705489?alt=rss&kind=photo&hl=en_US imagefeed.Web,Pictures=http://picasaweb.google.fr/data/feed/base/user/cookiejarconfessionals/albumid/5229065014037788129?alt=rss&kind=photo&hl=en imagefeed.Web,Pictures,Albums=http://picasaweb.google.com/data/feed/base/user/FenderStratRocker?alt=rss&kind=album&hl=en_US&access=public # audio feeds audiofeed.Web,Podcasts=http://podcasts.engadget.com/rss.xml # video feeds videofeed.Web,TED=http://feeds.feedburner.com/tedtalks_video # audio streams audiostream.Web,Radio=KBPS All-classical,http://www.abacast.com/media/pls/classical899/classical899-classical899-96.pls,http://allclassical.org/assets/images/img_logo_top.gif # video streams videostream.Web,TV=France 24,mms://stream1.france24.yacast.net/f24_liveen,http://www.france24.com/en/sites/france24.com.en/themes/france24/logo-fr.png videostream.Web,TV=BFM TV (French TV),mms://vipmms9.yacast.net/bfm_bfmtv,http://upload.wikimedia.org/wikipedia/en/6/62/BFMTV.png You are now ready to start PMS. Log into your NAS with SSH as the 'admin' user and start PMS: admin@yournas> cd /opt/local/pms-linux-1.50.0/ admin@yournas> ./PMS.sh When you now start your PS3 you will see PMS in your XMB. If you encounter any problems there is a debug.log located at /opt/local/pms-linux-1.50.0/debug.log. We hope people are now able to install PMS and get in running. Many thanks from me to synops for getting this done. UPDATE 21-11-2011: At this moment synops and I are able to stream anything from the indexed folders. But we are unable (yet) to stream internet TV to the PS3. We are working and looking into that. If you have any additions to this, please help us at http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&t=12387. |
| Last Updated on Monday, 28 November 2011 09:16 |




Click here to hear this article
Comments
These are the steps to follow:
admin@yournas> ipkg install screen
admin@yournas> cd /opt/local/pms-linux-1.50.0/
admin@yournas> screen ./PMS.sh
Now you can close the SSH terminal without losing connection!
These are the mistakes:
root@yournas> cd /volume1/@tmp/
root@yournas> tar zxvf MediaInfo_CLI_0 .7.51_GNU_FromSource .tar.bz2
root@yournas> cd /volume1/@tmp/MediaInfo_CLI_G NU_FromSource /MediaInfo/Project/GNU/CLI
root@yournas> ./configure –enable-shared=yes
root@yournas> make
root@yournas> make install
......
and:
….
root@yournas> cp /volume1/@tmp/usr/lib/jni/libjnidispatch.so /opt/local/pms-linux-1.50.0/com/sun/jna/linux-arm/
root@yournas> gjar uf /opt/local/pms-linux-1.50.0/pms.jar /opt/local/pms-linux-1.50.0/com/sun/jna/linux-arm/libjnidispatch.so
root@yournas> chown -R admin:users /opt/local/pms-linux-1.50.0/
I've got it up and running only when i close putty.exe the connection to the mediaserver is lost according to the ps3.
So i think i need to add ./PMS.sh somewhere it starts automatically.
Ok, I finally got it working after reading a lot of other forums and even more trial-and-error. Unfortunately I also failed in installing it as system service and I found the performance not as good as expected. Also tried Serviio but not happy about this either. I finally decided to buy a real mediaplayer/streamer (Dune HD TV 301) so my NAS can just do what it does best... storing and serving files.
HI,
Got it running, but without a console and things I found it really hard to configure properly. Besides that I did not manage to get it running as a system Service,so i had to start pms in a puttyconsole each time. I abandoned this project and installed the synology apk package of Serviio which can be found at pcloadletter.co.uk.
Please let me know what your experiences are
Hi Patrick,
Were you able to successfully install en use the PMS on your DS212+?
Did you encounter any issues after following this tutorial?
KR, FX
I am going to try this on my DS212+. It has the same Kirkwood processor, so this should be no problem.
Can you tell me what your performance is @1.6Ghz of streaming on-the-fly?
I have very little programming knowledge so i'm not sure how hard it would be to do, one can dream though.
I had the same problems when building MediaInfo. What helped for me was using the usual install steps:
./configure –enable-shared=yes
make
make install
First for ZenLib, then for MediaInfoLib and finally for MediaInfo.
DiskStation> pwd
/volume1/Temp/MediaInfo_CLI_0 .7.51_GNU_FromSource /MediaInfo_CLI_G NU_FromSource /MediaInfo/Project/GNU/CLI
DiskStation> make install
make: *** No rule to make target `install'. Stop.
I couldn't use the compiling workaround and that is likely the issue. Any thoughts for x86 users?
Note I had to extract MediaInfo_CLI_0 .7.51_GNU_FromSource .tar.bz2 using the GUI. It wouldn't extract using tar