Page 1 of 1

HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Sat May 21, 2011 10:59 am
by moleculezz
Hi,

I decided to write my experience with installing Serviio on my QNAP TS-459 Pro+ (firmware 3.4.2 build 0331T) since it was a little bit different from other experiences I read in the forums.

Recently a qpkg package has been created that makes the installation much easier. So you can make your life easier by skipping the installation instructions below and just downloading and installing the qpkg package instead.


This installation is for version 0.5.x


I want to thank patters & grisbilen for their tutorials that helped me to get my serviio server running. And also everyone else for helping to solve the issues I encountered while setting up.

Note that I will use "MD0_DATA" in my path's, this might be different depending on what kind of RAID configuration you have on your NAS.

1. Download, install & enable Optware & JRE QPKG's from the QNAP administration

2. Install nano & lame (you can skip nano if you prefer using vi which is already installed)
  Code:
ipkg install nano lame

3. Make a symlink for lame
  Code:
ln -s /share/MD0_DATA/.qpkg/Optware/lib/libmp3lame.so.0.0.0 /usr/lib/libmp3lame.so.0

4. Install optware-devel, mktemp & yasm (these are required to successfully compile ffmpeg. Installing mktemp will fix an issue that you might encounter if you use the preinstalled version of mktemp)
  Code:
ipkg install optware-devel mktemp yasm

5. Download & compile ffmpeg
  Code:
cd /share/MD0_DATA/.qpkg/
wget http://download.serviio.org/opensource/ffmpeg-26303.tar.gz
tar xvzf ffmpeg-26303.tar.gz
cd ffmpeg/
export PATH=/opt/bin:/opt/sbin:$PATH; ./configure --arch=x86 --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
make
make install

6. Download, configure & start Serviio
  Code:
cd /share/MD0_DATA/.qpkg/
wget http://download.serviio.org/releases/serviio-0.5.2-linux.tar.gz
tar xvzf serviio-0.5.2-linux.tar.gz
mv serviio-0.5.2 serviio
nano /share/MD0_DATA/.qpkg/serviio/bin/serviio.sh

Add the following to JAVA_OPTS string:
  Code:
-Dserviio.remoteHost=192.168.1.100 -Dffmpeg.location=/share/MD0_DATA/.qpkg/ffmpeg/ffmpeg

Dserviio.remoteHost ip address should be the ip address of the NAS (this will enable you to later setup the Serviio console on a different machine to connect to Serviio server running on the NAS.)
Now you can manually start Serviio by running:
  Code:
/share/MD0_DATA/.qpkg/serviio/bin/serviio.sh start &

7. Install Serviio console on a different machine & connect to Serviio server (Windows 7)
Download the Serviio installer and during the installation only select the console.
Go to "C:\Program Files (x86)\Serviio\bin" (the default installation path, it might be different if you choose a different path during installation)
Open "ServiioConsole.exe.vmoptions" with notepad and add the following line (using the ip address of you NAS:
  Code:
-Dserviio.remoteHost=192.168.1.100

You should now be able to run the console and it should connect to Serviio server running on the NAS.
Make sure you change the default transcoded files location (/tmp) to something on else. /tmp is on the ramdisk and I had issues with ffmpeg crashing because of limited space. In my case I did the following:
  Code:
mk /share/MD0_DATA/.qpkg/serviio/tmp

Then I added that path to the transcoded files location.

8. Make Serviio autorun on startup
First we need to configure QNAP to run scripts on startup. This is documented on the QNAP wiki
Basically you need to add some lines of code to the Optware.sh script located in /opt
You can download the script from here and replace the existing one.
  Code:
cd /opt
mv Optware.sh Optware.sh-orig
wget http://ubuntuone.com/p/swG/


Now you can add some scripts to /opt/etc/init.d to autorun at startup.
  Code:
nano /opt/etc/init.d/S95misc.sh

Add the following to the script file
  Code:
#!/bin/sh
##  Load LAME & JAVA
ln -s /share/MD0_DATA/.qpkg/Optware/lib/libmp3lame.so.0.0.0 /usr/lib/libmp3lame.so.0

ln -sf /share/MD0_DATA/.qpkg/JRE/jre/bin/java /opt/bin/java


Now create another script file to run serviio
  Code:
nano /opt/etc/init.d/S99serviio.sh

Add the following to the script file
  Code:
#!/bin/sh
##  Serviio start Script

case "$1" in

stop)
        echo "Stopping Serviio..."
        "/share/MD0_DATA/.qpkg/serviio/bin/serviio.sh -stop" > /dev/null 2>&1 &
        echo "Serviio stopped"
        ;;

start)
        # start Serviio in background mode
        echo "Starting Serviio..."
        "/share/MD0_DATA/.qpkg/serviio/bin/serviio.sh" > /dev/null 2>&1 &
        echo "Serviio Started"
        ;;

restart)
        $0 stop
        sleep 1
        $0 start
        ;;
*)
        echo "usage: $0 { start | stop | restart}" >&2
        exit 1
        ;;

esac

Make the files executable
  Code:
chmod +x /opt/etc/init.d/S95misc.sh
chmod +x /opt/etc/init.d/S99serviio.sh


Now you should be able to reboot the NAS and Serviio should start automatically.

Hopefully this will help some people getting their QNAP system setup to run Serviio.

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Sat Jul 23, 2011 2:32 pm
by Xmantium
QNAP has made a One button install QPKG!! Its so easy, must the quickest and simplest way to install on any NAS

http://forum.qnap.com/viewforum.php?f=252

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Mon Aug 08, 2011 8:42 am
by Mariaitalia
Hello everyone and congratulations to (magnific ZIP :D ), Serviio is the number 1.. sorry my English, I'm Italian NEWBIES :oops: .

I installed Windows XP (Serviio 0.5.2) with success ....
I installed Ubuntu Linux Natty 11.04 (serviio 0.5.2) successfully ...

NOW, I have a QNAP 419P + (ARM CPU) with 4 HD/2TB, I configured the RAID 5 (space total 5.584GB).
Unfortunately, I tried and tried ... following the excellent guides and copying the code MOLECULEZ, GRISBILEN, PATTERS, but they are very NEWBIES and then I can not ...!!

someone has a step / step up correctly in a QNAP 419P + ..??
or someone can help me ..??

Thank you very much, Maria.

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Mon Aug 08, 2011 9:22 am
by moleculezz
Mariaitalia wrote:Hello everyone and congratulations to (magnific ZIP :D ), Serviio is the number 1.. sorry my English, I'm Italian NEWBIES :oops: .

I installed Windows XP (Serviio 0.5.2) with success ....
I installed Ubuntu Linux Natty 11.04 (serviio 0.5.2) successfully ...

NOW, I have a QNAP 419P + (ARM CPU) with 4 HD/2TB, I configured the RAID 5 (space total 5.584GB).
Unfortunately, I tried and tried ... following the excellent guides and copying the code MOLECULEZ, GRISBILEN, PATTERS, but they are very NEWBIES and then I can not ...!!

someone has a step / step up correctly in a QNAP 419P + ..??
or someone can help me ..??

Thank you very much, Maria.


Since your QNAP has an ARM CPU a lot might be different. Not sure exactly what though. But the steps might change.

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Mon Aug 08, 2011 9:41 am
by Mariaitalia
@moleculezz
Hello, you're right ... sorry .. did not mean that the QNAP Intel were identical to the ARM, but I looked at the code for a comparison...
Thankyou very much. Maria

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Thu Aug 11, 2011 9:38 am
by Xmantium
@Maria click on the above link I provided. On the QNAP forums a qnap developer has made a qnap package that will install on your ARM qnap quickly and easily. Make sure you choose the arm version to install. You don't need hundred of steps, the QPKG does everything for you, no need to compile anything, you just press Install

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Fri Aug 12, 2011 3:10 pm
by Mariaitalia
@Xmantium:
I did what you indicated you have finally managed to install the QNAP serviio, thank you very much, Maria.

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Sat Sep 24, 2011 6:46 am
by Vortex
Here is my QPKG of serviio v0.6 for x86 QNAP NAS:
http://dl.dropbox.com/u/7535410/QNAP/Se ... 6_x86.qpkg

Re: HOWTO: Serviio on QNAP TS-459 Pro+ (Intel)

PostPosted: Sun Oct 20, 2013 5:19 am
by Xmantium
Please use the new latest version found here - http://forum.qnap.com/viewtopic.php?f=252&t=84702