| 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
DiskStation> make install
-ash: make: not found
DiskStation>
What should I do?
i'm also having trouble with building mediainfo. When I run make install in the directory i get an error:
make: *** No rule to make target `install'. Stop.
I tried to run ./configure and at the end i get:
checking for a BSD-compatible install... /opt/bin/install -c
./configure: line 18783: libzen-config: command not found
./configure: line 18786: pkg-config: command not found
configure: error: libzen configuration is not found
I hope you can help me with this problem.
cd /volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU
/CLI
DiskStation> make install
make[1]: Entering directory `/volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU/CLI'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
/opt/bin/bash ./libtool --mode=install /opt/bin/install -c 'mediainfo' '/usr/local/bin/mediainfo'
/opt/bin/install -c mediainfo /usr/local/bin/mediainfo
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU/CLI'
Help someone pls
cd /volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU
/CLI
DiskStation> make install
make[1]: Entering directory `/volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU/CLI'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
/opt/bin/bash ./libtool --mode=install /opt/bin/install -c 'mediainfo' '/usr/local/bin/mediainfo'
/opt/bin/install -c mediainfo /usr/local/bin/mediainfo
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/volume1/@tmp/MediaInfo_CLI_G NU_FromSource/MediaInfo/Project/GNU/CLI'
Help someone pls!
got this:
synology> svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
svn: E200029: Couldn't perform atomic initialization
svn: E200030: SQLite compiled for 3.7.14, but running with 3.7.3
??? can anybody help me, please?!?!
regards
thomas
Quoting Marten:
Fixed this by rebuilding mplayer with:
./configure --disable-fontconfig ; make ; make install
1/ Mediainfo precompiled for synology can be found at missilehugger.com 's repository.
2/ Plex Media Server comes with a working libzen - I stole that from there.
3/ Mark's document says nothing about actually compiling+insta lling mplayer. I did, but I'm slightly worried: if I try to run it it says:
/opt/local/ums-1.3.0 # mplayer
mplayer: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
4/ I used jar from a real java install to merge the libjnidispatch.so
5/ Sadly this page (headless synology mode) does not work for UMS - I suspect UMS is at fault though, it seems to want graphics. Left a note on their forum
Synology NAS doesn't have enough hardware to be a good media server (at least not 212j).
Use it as a file server instead and buy a AC Ryan Playon HD Mini 2 for ~$100 to stream everything.
Works great!
From forums, QNAP users says that the PS3 Media Server version they use cant transcode mkv files, since one of the codecs or component needed are not open source and there is no ARM version of it.
Are you able to stream 720p files using Synology ARM based stations? The Atom based are way out of my budget and was thinking on a DS212 or DS212+ ish.
I have an issue...
03:55:04,178 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAc tion - End of configuration.
ERROR 2012-06-10 03:55:04.648 [main] Cannot launch MPlayer / Check the presence of mplayer ...
java.io.IOException: Cannot run program "mplayer": java.io.IOException: error=2, No such file or directory
.....
Any idea?