Serviio 0.5.2 DLNA server on Synology NAS

last updated 24/08/2011 – fixed typos in locale section
Serviio-Synology

This guide is now redundant – I have released a Synology package for Serviio 0.6!

 

Serviio is an excellent free Java DLNA media server by Petr Nejedly which focuses on minimizing the amount of unnecessary media transcoding, and maximizing the use of renderer devices’ supported features. Some of the more main-stream servers like Windows Media Player just brute-force everything to MPEG2 video and MP3 audio, which degrades quality and wastes power. Though some servers like Mezzmo are better and will play Matroska files, even they tend to transcode all audio to AC-3 regardless of source type. As a Java app Serviio will run on anything that has a JVM, and the media tool it relies on is the open source and therefore highly portable FFmpeg. All these design priorities make Serviio an ideal choice to run on a NAS device since, when paired with a renderer with good format support like a Sony Bluray Player, the NAS will barely ever be transcoding.

I was about to buy a new large external hard disk, but once I realised that Serviio could probably run on a NAS I started looking at one of these instead. Synology seemed to offer a lot of value and seemed to have the sort of user-community enjoyed by my old Linksys NSLU2, which I promptly sold on eBay for almost what I had paid for it in 2007. I considered the value DS110j model but I decided to go for the more expensive DS111 on the basis that the double CPU speed and RAM would probably be a wise move.

This guide outlines how to get Serviio 0.5.2 running on the Marvell Kirkwood ARM CPUs found in most of the 2011 product line-up, but Synology devices also exist with Freescale PowerPC and Intel Atom processors. The key problem is finding a Java virtual machine, but FFmpeg also needs compiling from source. This is because although there is an FFmpeg binary bundled with DSM 3.0, it’s too old and lacks support for features critical to Serviio. This guide could be used for other CPU architectures, but the compilation options for FFmpeg need adapting.

In the Synology DSM go to Control Panel > Terminal > enable SSH.

Read this Synology wiki document about modifying your NAS carefully and install the bootstrap for your model.

Download the PuTTY SSH client.

Connect to your NAS’s IP address using SSH. Use the root account (same password as admin). I suggest that you perform the mod at the bottom of this post to enable colour directory listings and a more descriptive shell prompt which should reduce the chance of accidentally being in the wrong directory.

We need to install the development tools. Type:

ipkg install optware-devel
 

It will halt and complain that package wget-ssl clashes with wget. Continue with:

ipkg remove wget
cp /usr/syno/bin/wget /opt/bin
ipkg install wget-ssl
ipkg update
ipkg upgrade
ipkg install optware-devel
 

This time it will finish successfully.

Update – It seems that there is a serious problem with running ipkg on a clean install of DSM 3.1. This guide was written before it was released, and though I have since upgraded my Synology I haven’t encountered that issue, but there have been many comments about it. User mayk on the Synology forum seems to have the solution here. Use the extra wget verbosity switch to find out the exact package URL for the following two packages, then manually download them with wget and install:

cd /volume1/@tmp
ipkg install -verbose_wget libidn
wget url1
ipkg install -verbose_wget wget-ssl
wget url2
ipkg install filename1
ipkg install filename2
 

Next we need to install Lame MP3 encoder, providing libmp3lame which FFmpeg will be compiled to depend on, and the Nano text editor (much easier to use than vi):

ipkg install lame
ipkg install nano
 

JamVM is a JVM that gets mentioned a lot in connection with NAS systems, but it’s only Java 1.5, and Serviio needs version 1.6. Download the Java SE Embedded Runtime from Oracle, selecting the ARM v5 Linux version (note that there is a PowerPC e500v2 version – the CPU core in Synology products which use the Freescale mpc85x3). Unfortunately for PowerPC Synology owners, this depends on a higher version of glibc than the Synology DSM provides for this architecture. Until JamVM supports Java 1.6, or Synology update to glibc 2.4 you won’t be able to follow this guide on PowerPC models. This may have changed since DSM 3.1 was released.

You will need to sign up to receive the download link by email. It’s free to use for non-commercial self-educational use. Use your computer to save it into the top level shared folder of your NAS, which will probably be /volume1/public on the NAS filesystem. Then:

cd /volume1/public
mv ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz /volume1/@tmp
cd /volume1/@tmp
tar xvzf ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz
mkdir /opt/java
mv ejre1.6.0_21 /opt/java
 

Synology’s Linux build has no localisation support built in, though it does use UTF-8 character encoding for the filesystem. That’s no problem for storage, however the Java VM inherits the locale setting of the host OS. Since this is undefined Serviio, and all other Java software, will default to US-ASCII which is a big problem if you have filenames with non-US characters. The solution is to obtain the missing files to add locale support from the Synology toolchain, which is distributed under the GPL:

#-----for ARM CPU
cd /volume1/@tmp
wget http://sourceforge.net/projects/dsgpl/files/DSM%203.1%20Tool%20Chains/Marvell%2088F628x%20Linux%202.6.32/gcc421_glibc25_88f628x.tgz
tar xvfz gcc421_glibc25_88f628x.tgz
cd arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/bin
cp locale /opt/bin
cp localedef /opt/bin
cp -R arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/share/i18n /usr/share
#-----keep another copy safe in case DSM is reinstalled later
cp -R arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/share/i18n /opt/share
mkdir /usr/lib/locale
localedef -c -f UTF-8 -i en_US en_US.utf8

#-----for Intel CPU
cd /volume1/@tmp
wget http://sourceforge.net/projects/dsgpl/files/DSM%203.1%20Tool%20Chains/Intel%20x86%20Linux%202.6.32/gcc420_glibc236_pineview.tgz
tar xvfz gcc420_glibc236_pineview.tgz
cd i686-linux-gnu/i686-linux-gnu/bin
cp locale /opt/bin
cp localedef /opt/bin
cp -R i686-linux-gnu/i686-linux-gnu/share/i18n /usr/share
#-----keep another copy safe in case DSM is reinstalled later
cp -R i686-linux-gnu/i686-linux-gnu/share/i18n /opt/share
mkdir /usr/lib/locale
localedef -c -f UTF-8 -i en_US en_US.utf8
 

Now use nano to edit some configuration files (Ctrl-o saves, and Ctrl-x exits).
First edit the profile for all bash shell users:

nano /opt/etc/profile
 

Make the changes shown in bold:

#
# Bash initialization script
#

PS1=”[\u@\h \W]$ ”
PATH=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/java/ejre1.6.0_21/bin
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
JAVA_HOME=/opt/java/ejre1.6.0_21
LANG=en_US.utf8

export PS1 PATH LD_LIBRARY_PATH JAVA_HOME LANG

 

Save and exit. Next edit the profile for all ash shell users (root):

nano /etc/profile
 

At the last line make the changes in bold:

PATH=/opt/java/ejre1.6.0_21/bin:/opt/bin:/opt/sbin:$PATH
JAVA_HOME=/opt/java/ejre1.6.0_21
LANG=en_US.utf8
export JAVA_HOME LANG

 

Save and exit. Now install the Serviio application:

cd /volume1/@tmp
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 /opt/serviio
 

In the DSM Control Panel got to Web Services > Web Applications tab > Enable Web Station.
Install AcidumIrae’s PHP web UI for Serviio. You will need to have enabled Web Station for the directory /volume1/web to exist.

wget http://labs.softjourn.com/attachments/download/67/serviio-0.5.2.1b.zip
unzip serviio-0.5.2.1b.zip
mv serviio-0.5.2 /volume1/web/serviio
 

You should already be able to browse to http://your_NAS_IP/serviio and see the user interface, though it will complain with a big red X that Serviio is not running.

FFmpeg depends on the libbz2 and zlib libraries, and although both are installed along with the optware-devel package, FFmpeg will only look for them in /lib rather than in their actual location in /opt/lib. Copies of the existing symbolic links will be fine:

cp /opt/lib/libbz2.so.1.0 /lib
cp /opt/lib/libz.so.1 /lib
 

Compile the patched version 26303 of FFmpeg from the Serviio download page. Running cat /proc/cpuinfo it is clear that the DS111 is an ARM 5TE platform so I enabled those specific optimizations:

cd /volume1/@tmp
wget http://download.serviio.org/opensource/ffmpeg-26303.tar.gz
tar xvzf ffmpeg-26303.tar.gz
cd ffmpeg
./configure --arch=arm --enable-armv5te --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
make
 

Notice that the ./configure command is line wrapped – it’s all one command. The make command takes approximately 25 minutes on the 1.6GHz CPU and will show many warnings during compilation, but this is expected.

Update – Thanks to bakman for pointing out that for Intel Atom CPUs you will need to install the assembler YASM and also use the following ./configure parameters:

ipkg install yasm
./configure --arch=x86_64 --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
 

Another Update – Thanks to gregorio for parameters for Freescale PowerPC processors:

./configure --arch=powerpc --disable-altivec --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
 

When the compile is done, install it.

make install
 

Try running ffmpeg and check the compile time to make sure the newly compiled one is running. You should see this but with your compilation date and time:

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 6 2011 01:14:38 with gcc 4.2.3
configuration: –arch=arm –enable-armv5te –prefix=/opt –extra-cflags=-I/opt/include –extra-ldflags=-L/opt/lib –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…

Use -h to get full help or, even better, run ‘man ffmpeg’

If you see the text below then something is wrong – this is the version included with DSM 3.0:

FFmpeg version SVN-r20167-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.

In the DSM User Control Panel create a new user called serviio and set a password. Give that user access to the paths that contain the media you want to serve. Click the User Home button and enable the User Home Service. Go back to your SSH session and type:

nano /etc/passwd
 

Be very careful editing this file. A wrong move here could trash your system. Notice that the serviio user has a shell of /sbin/nologin. Change this to /bin/sh like the admin user has. Nano may try to line wrap this line as you type if you added an long account description. If it does, delete the carriage return before the line break and pull it back onto one line. Save and exit.

Now we’ll create the Serviio daemon start and stop script:

nano /volume1/@tmp/S99serviio.sh
 

Paste in the following text (mouseover and use the icon in the top right to copy):

#!/bin/sh

User=serviio

case "$1" in

stop)
        echo "Stop Serviio..."
        su -l $User -c "/opt/serviio/bin/serviio.sh -stop" > /dev/null 2>&1 &
        ;;

start)
        # start Serviio in background mode
        su -l $User -c "/opt/serviio/bin/serviio.sh" > /dev/null 2>&1 &
        echo "Start Serviio..."

        #check libs FFmpeg depends on (in case DSM was upgraded)
        if [ ! -f /lib/libbz2.so.1.0 ]; then
                cp /opt/lib/libbz2.so.1.0 /lib
        fi
        if [ ! -f /lib/libz.so.1 ]; then
                cp /opt/lib/libz.so.1 /lib
        fi
        ;;

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

esac
 

Now make it executable and set the serviio user to be the owner of the Serviio folder (so it can create the media database, and log files):

chmod +x /volume1/@tmp/S99serviio.sh
chown -R serviio /opt/serviio
 

Test the script manually by running:

/volume1/@tmp/S99serviio.sh start
ps
 

The running process list should show the serviio user running the Serviio launcher shell script and the JVM like so:

 2542 root      9080 S N  /usr/syno/sbin/synomkflvd
 2589 root      3908 S    /usr/syno/sbin/sshd
 2591 root      5376 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2599 root      5944 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2600 root      5936 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2628 root     58920 S    /usr/syno/apache/bin/httpd
 2687 nobody   58920 S    /usr/syno/apache/bin/httpd
 2688 nobody   58920 S    /usr/syno/apache/bin/httpd
 2689 nobody   59500 S    /usr/syno/apache/bin/httpd
 2695 root     11560 S    /usr/syno/sbin/mDNSResponder -f /tmp/mDNSResponder.c
 2703 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2949 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 3025 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 3087 root      8664 S N  /bin/ntfs-3g -o uid=1024,gid=100 /dev/sdk1 /volumeUS
 3518 root      8852 S    /usr/syno/sbin/cnid_metad
 3524 root     15132 S    /usr/syno/sbin/afpd -c 256 -g guest -n SynologyDS111
 3566 nobody   58920 S    /usr/syno/apache/bin/httpd
 7747 root      6660 S    sshd: root@pts/0
 7826 root      5404 S    -ash
13567 serviio   2940 S    -sh -c /opt/serviio/bin/serviio.sh
13570 serviio   2940 S    /bin/sh /opt/serviio/bin/serviio.sh
13575 serviio   501m S    /opt/java/ejre1.6.0_21/bin/java -Xmx384M -Djava.net.
13917 root      5404 R    ps
 

Stop the daemon with:

/volume1/@tmp/S99serviio.sh stop
 

Check the web UI or the process list again and make sure it did indeed stop. If it’s all ok, we need to move the daemon launcher script so it starts automatically on boot:

mv /volume1/@tmp/S99serviio.sh /opt/etc/init.d
 

Shutdown the NAS and restart.

Update – previously I had used the directory /usr/syno/etc/rc.d, but this is destroyed when the DSM software is updated. /usr/local/etc/rc.d is the official Synology location for 3rd party daemon init scripts but I found that it doesn’t work, so I used /opt/etc/init.d instead which also survives a DSM upgrade. I just tested this by upgrading to DSM 3.1-1605 and Serviio remained intact. I only had to copy the sym links for the libraries FFmpeg needs (“cp /opt/lib/libbz2.so.1.0 /lib” and “cp /opt/lib/libz.so.1 /lib”).

 

Web UI integration with the Synology DSM

I read the official Synology notes for 3rd party developers and decided to make some icons. The result is pretty neat:

Open an SSH session:

cd /usr/syno/synoman/webman/3rdparty
wget http://dl.dropbox.com/u/1188556/blog/serviio_syno_DSM.zip
unzip serviio_syno_DSM.zip
rm serviio_syno_DSM.zip
nano serviio/config
 

The file loaded into nano will look like this, and you need to edit the IP address to match the IP of your Synology (either put your syno on a static IP, or set a reservation in your broadband router’s DHCP server options).

{
 ".url": {
    "org.serviio.serviio": {
      "type": "legacy",
      "allUsers": true,
      "title": "Serviio",
      "desc": "DLNA Media Server",
      "icon": "images/icon_{0}.png",
      "url": "http://192.168.1.202/serviio/index.php"
    }
  }
}
 

I can’t find a way to avoid manually specifying the IP address like this – relative paths can’t be used because the Synology runs two different webservers: the DSM one on port 5000 without PHP, and the PHP-enabled Web Station one on port 80.

Log out of DSM and log back in. You will see the Serviio icon in the pull down menu in the top left, which you can drag to the desktop if you prefer:

 

Serviio settings

Navigate to the Transcoding tab. Set the transcoded files location to /volume1/@tmp. Failure to do this will result in temporary files being written to /tmp which will fill up the partition it’s on the moment you remux a 4GB movie, which would prevent you from logging into the NAS.

I recommend de-selecting Generate thumbnails for local videos in the Metadata tab. Note that you have to click Save on each tab or any change will not take effect. As you’ll see if you have a DLNA renderer that supports thumbnails, Serviio retrieves good ones from the online databases it checks so they’re not really needed. Often FFmpeg will get stuck trying to generate a thumbnail for a video and will lock the CPU at 100% for long periods of time. This issue was raised in this Serviio forum thread.

You can use the Library tab to add the media folders you want to share. Note that the Add Local… button will fail because the web service user does not have access to the root of the filesystem (probably a good thing security-wise). Use Add Path… instead and express the paths as I have done in the first screenshot above. Be sure that the serviio user has been granted read privileges over the folders you add (User Control Panel in DSM).

Update – If you really want to use the Ajax file browser UI, then go to DSM Control Panel > Web Services > PHP Settings tab > open_basedir and append /volume1: to the start of that list. Then on the Web Applications tab, disable Web Station, Ok, enable Web Station. Go back to your SSH session and run:

nano /volume1/web/serviio/afb/config.php
 

Change the value of $path from / to /volume1/public (or the top level shared folder where your media resides). You’ll notice however that when you use Add local button in the Serviio Library tab it’s very buggy. It will only list a maximum of 5 child folders from each node.

 

Performance

The Synology seems perfectly able to transcode DTS audio in a hi-def Matroska file down to 2 channel AC3 in MPEG-TS while copying the H.264 stream. The CPU use leaps up to 100% but I guess that’s because it’s running ahead transcoding down to the end of the file (and is CPU-bound).

If I play something that’s only remuxing the container and copying both audio and video streams then the CPU stays at around 40% (because it’s I/O-bound) then 5 minutes into a film it falls away to pretty much idle – I guess it has finished remuxing to the temporary file.

Memory use even while running Serviio is around 20% at idle, 30% during a remux with audio transcode, though I have noticed that with a larger library this creeps up to around 70%. I have a 2011 product so it has 256MB of RAM. This seems to indicate that the value line of products (with the j suffix) like the DS211j should run Serviio on their 128MB. They have a 1.2GHz CPU though versus 1.6GHz on mine (and the DS110j is only 800MHz), so it would need testing by someone.

All in all it would seem that the Synology products are very capable Serviio appliances!

 

Uninstalling

Log in as root and stop Serviio, then delete a couple of libraries which had been copied to /lib:

/opt/etc/init.d/S99serviio.sh stop
rm /lib/libbz2.so.1.0
rm /lib/libz.so.1
 

In the DSM User Control Panel delete the user called serviio. Undo the changes that you made to /opt/etc/profile and /etc/profile (the JAVA_HOME and java path modifications marked in bold earlier in the guide).

To remove the web UI, in DSM go to Web Services > Web Applications tab > Disable Web Station. Then:

rm -r /volume1/web/serviio
rm -r /usr/syno/synoman/webman/3rdparty/serviio
 

Finally, re-download the bootstrap for your model of NAS and run it again. It will tell you to delete a few folders and restart. This will completely trash all optware ipkg packages (i.e. everything in /opt) and undo everything else you did in this guide without affecting your data partitions. If you had any other ipkg packages installed since installing Serviio, these would also be lost.

231 thoughts on “Serviio 0.5.2 DLNA server on Synology NAS

  1. dougri

    I believe the current value line has 1.2GHz cpus. Also, do any of the compile options need to be modified for the slower CPU or reduced RAM? Thanks!

    Reply
    1. patters Post author

      The compilation options should remain the same. I’ve corrected the text – it’s the 2010 value line that have 800Mhz CPUs, and I had looked up the DS110J since there’s no DS111J yet.

      Reply
  2. dougri

    I think you have an error in your guide…

    the line:

    cp /usr/syno/bin/wget /opt/bin/

    should be:

    cp /usr/syno/bin/wget /opt/bin/.

    Reply
      1. dougri

        yup… same goes for the other cp’s too. thanks again for the guide… I’ll let you know how it works out or if I find any other issues or tricks

  3. dougri

    and the line:

    nano /etc/opt/profile

    should be:

    nano /opt/etc/profile

    I’m assuming these files are in the same place on the DS211j (my NAS) and yours

    Reply
    1. patters Post author

      Well spotted! Amended. I kind of wrote the guide immediately afterwards so I hadn’t wanted to wipe my Synology and run through it again to check, so thanks for testing.

      Reply
  4. dougri

    you need to add:

    source /etc/profile

    somewhere prior to running the script at the end so that the JAVA_HOME is known, otherwise, serviio can’t find java.

    Thanks… all is now working (at least installed and running) on my DS211j… I will be testing for functionality tomorrow. 1AM here… time to get some sleep :)

    Reply
    1. patters Post author

      Do you really need that source line? It seems to work fine for me without that. Are you sure you edited the ash shell profile as well as the bash one?
      Glad you got it up and running! Good isn’t it? :)

      Reply
      1. dougri

        I did anyway, I would run the script, it would start the processes, and they would disappear from the ps list. I started serviio manually to see what the problem was and it could not find java. sourced the ash profile and retried it and all was well. Have not had a chance to try it out yet… a bit later today :)

    2. Guy Simms

      Hi there

      Would you mind telling me what kind of performance you are getting on your DS211j?
      I have it installed and am seeing alot of stuttering when streaming to my PS3

      Regards

      Reply
  5. Razer

    After removing wget and running ipkg install optware-devel for the second time it complains;

    Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libidn_1.19-1_arm.ipk
    wget: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory
    Configuring wget-ssl
    An error ocurred, return value: 22.
    Collected errors: ipkg_download: ERROR: Command failed with return value 127: `wget –passive-ftp -q -P /opt/ipkg-qZxWUu http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/libidn_1.19-1_arm.ipk
    Failed to download libidn. Perhaps you need to run ‘ipkg update’?

    When you run ipkg update it does nothing and ipkg upgrade gives the same error

    Any ideas ?

    Reply
    1. patters Post author

      Have you retrieved the working wget binary from /usr/syno/bin?

      cp /usr/syno/bin/wget /opt/bin

      From memory, I think that’s what your error relates to.

      Reply
      1. Razer

        Strangely enough the problem somehow resolved itself after exiting out of putty and logging back in I ran the install optware-devel again and it went through fine.

        I was able to get further but two issues cropped up
        1) at the point you say you should be able to access your computer IP/serviio I couldn’t
        2) at the compile and install zlib section it gives this
        DiskStation> cd zlib-1.2.5
        DiskStation> make
        Please use ./configure first. Thank you.
        DiskStation> make install
        make: *** No rule to make target `install’. Stop.
        DiskStation>

        I’m pretty much a linux newbie so I’m totally reliant on the guide I guess their is something I’m doing wrong.

        Also a question about the java file you have to download, how do you transfer that to the root of the NAS, I just made a folder called public in the DSM and used that but perhaps that was my mistake.

      2. patters Post author

        Not sure about your point 1). Did you definitely enable Web Services as per the step right at the beginning?
        For point 2) I have amended that section of the guide to correct that. As someone who has in the past followed these things without too much Linux familiarity I totally understand where you’re coming from.
        For the Java download, it doesn’t matter where you save it really, just as long as you can access it to unzip it and move it from within the PuTTY session. If you want you could copy the exact URL from the download link in the email Oracle send you and use wget on the Synology to fetch it, as per the other examples.

  6. Bruno Pereira

    I followed all the steps with success until ffmpeg “make install”, it compiles, it says it installs (not faults) but then I run ffmpeg in the command line after making make install it run Synology compiled version…

    I have reviewed all the steps, it looks ok but still now luck. I think I have the same NAS as you (ds110j) but I m not sure were to start troubleshooting, care to give a hand?

    I know that guides are not support forums or anything but if you can help I would be really appreciated.

    Thanks in advance for the guide ;)

    Reply
    1. patters Post author

      Is your NAS definitely running DSM 3.0 software? If not, perhaps the default paths for binaries are different. Try manually running /opt/bin/ffmpeg which is where it gets installed to.
      If that works then you didn’t add the path correctly at the edits to the Bash and Ash profiles earlier in the guide.

      Reply
  7. Razer

    Thanks for the make correction that sorted it, but I’ve had no further luck I got to the stage of running S99serviio.sh but it lists nothing after running it.

    Also one observation for that script when I copied and pasted the text using the built in button then pasted into putty it pasted it all wrong for some reason so I had to manually adjust the script to be the same as it looks on screen.

    I did have web services already enabled, I’m going to try that step again, I must have missed something as the serviio webpage is not available.

    Reply
    1. patters Post author

      Try manually starting Serviio by running /opt/serviio/bin/serviio.sh then you’ll see what the error is. I suspect that the JAVA_HOME environment variable is missing which would mean you’ve missed on of the profile edits for Bash or Ash earlier in the guide (where I wrote Make the changes shown in bold).

      Reply
      1. Khuong

        ~$ /opt/serviio/bin/serviio.sh
        /opt/serviio/bin/serviio.sh: line 67: /opt/java/ejre1.6.0.25/bin/java: not found

        how do i fix this???

  8. imaginidinbucuresti

    [previous comment deleted to avoid confusion]
    I revised my installation steps I noticed that I have downloaded and installed a wrong version of Java. I downloaded it again, deleted the first instalation folder, installed the new one and now the server started.

    All the steps in this tutorial are correct and well explained. Thanks for sharing this piece of work.

    But I still have one more problem: In Serviio Console 0.5 I cannot add local paths to the library. I keep getting an error each time I click to Add Local… button. It says:


    ERROR:2
    TEXT: opendir(): open_basedir restriction in effect. File (/) is not within the allowed path(s):
    (/usr/bin/php:usr/syno/synoman:/etc:/var/run:/tmp:var/spool/php:volume1/@tmp/php:var/services/web:/var/services/photo:/var/services/blog:/var/services/homes)
    LOCATION: volume1/web/serviio/afb/browse.class.php, line 68

    I noticed that in Control Panel -Web Services under PHP Settings there is a ckeckbox for Customize PHP open_basedir. I don’t really know what it should be there, but now I have this string:

    /usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes

    Could anyone suggest me a sollution for this error? Thank you!

    One more note: I have installed this on DS211+ with DSM3.0

    Reply
    1. micael

      I too have this problem, looking for an answer on the forum but can´t seem to find anything. Any good look for you?

      Reply
  9. gregorio

    try this with wget. its easier.
    ipkg remove wget

    and then:
    ipkg install wget-ssl

    after that:
    ipkg install optware-devel.

    why like this? the bootstrap sneakily installs an ipkg version of wget which someone just can’t be in the know of until one does.

    try this for tar and gunzip:
    tar -xvzf ‘the thing you want to untar-ungzip’. the extra -z does the gunzipping for you.

    you also forgot the export, if you don’t do an export, java won’t be found. on the command line type:
    export JAVAHOME=/opt/java/ejre1.6.0_21
    export PATH=$PATH:/opt/java/ejre1.6.0_21/bin

    of course the path should correspond to the location where java is to be found on your system.(/opt/java/ejre1.6.0_21 in the above example)

    compiling ffmpeg for a powerpc arch use the following:
    ./configure –arch=powerpc –disable-altivec –prefix=/opt –extra-cflags=’-I/opt/include’ –extra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame

    the above should be on one single line. however glibc for powerpc is still at libc-2.3.4 while oracle java needs 2.4…so it won’t work.

    There’s hope though. Watch jamvm climbing up to java 1.6 in the coming months (yes, months, sadly)

    Reply
    1. patters Post author

      Once you do ipkg remove wget then the whole ipkg installer breaks because it depends on wget to retrieve packages, hence the manual re-copying of the file.
      I’ve amended the guide to use tar xvzf, which I remembered from my TiVo – I had thought I’d tried it and got an error but it looks like I tried it on a tar file by accident instead of a tar.gz (I had used a tab for folder name completion and not noticed).

      Those exports are already in the edits to the profile for Bash and Ash in the guide (the bit where I say to make the edits shown in bold). Shame about that libc being out of date. I don’t really get it though – doesn’t that mean that the whole Oracle Java runtime for PPC is effectively useless then? Or does it mean you have to wait for Synology to use a newer kernel with more up to date libraries generally? Thanks for the tips.

      Reply
      1. gregorio

        Oracle Java runtime on PPC is effectively useless because of the libc version, yes. Synology *should* do something about this but then I think they should go for the latest libc version…which they won’t/can’t. I don’t know exactly but the cpu arch limits the choice to upgrade the entire linux environment. I think some drivers just aren’t compilable to run with the latest libc version on this particular cpu (PPC, my DS508). But yes, my wish is they do something about it.

  10. imaginidinbucuresti

    One more note: The put my video and audio content in the default shared folders: video, music and photo. These are the same folders that Synology Media Server use to index the media files. Should the content be under /volume1/web/serviio folder???

    Reply
    1. patters Post author

      You can put your content anywhere you like, as long as the serviio user has access to it (do this through the DSM user permissions control panel widget). Then use Add Path in the serviio Web UI and describe the full path from root (e.g. /volume1/public/video/movies).

      Reply
  11. gregorio

    Furthermore, since i forgot to mention this. bzip2 and libz and alll you need to compile is installed together with optware-devel. you still have to copy and link them but they are there. no need to separately compiling them. for someone who’s new on linux you did a very good job.

    Reply
  12. Vonuxkul

    Thanks for the effort on putting all this together for everyone.
    Followed the steps and I’ve got Serviio working on my Synology DS210j.
    My only problem is when in the console I try to select concrete Local Paths, it throws the error:
    Error Encountered:
    ERRNO: 2
    TEXT: opendir() [function.opendir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes:/var/packages/MailStation/target/roundcubemail)
    LOCATION: /volume1/web/serviio/afb/browse.class.php, line 68

    Although I see the library and can play the files…

    Cheers!

    Reply
    1. patters Post author

      Yes that’s to be expected. The Synology web service user does not have permissions over the whole filesystem and it’s probably best it stays that way. Use Add Path instead and express the path /volume1/public/pathtoyourcontent.

      Reply
  13. Mark Paulson

    I have a Synology DS1010+ which uses an Intel(R) Atom(TM) CPU K510 @ 1.66GHz CPU. How do you figure out what options need to be set for the compile stage?

    Reply
  14. bakman

    On DS1511+ compiling ffmpeg (Intel Atom CPU):


    ipkg install yasm


    ./configure --arch=x86_64 --enable-sse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

    Reply
    1. Mark Paulson

      On the 1010+ the enable sse3 flag generates an error. I got it to work without it. The problem I have now is I cannot get the script to start Serviio. I can manually start it, but even after that I cannot add paths without an error like others have posted earlier. I can see the sever on my TV but no files.

      Reply
      1. patters Post author

        Did you install the yasm package though? I guess the SSE3 optimizations are mostly assembler-based. Disabling them will make the performance considerably worse.
        For the Add Local problem see my earlier response – use Add Path instead, and describe the folders in Linux notation from the root. Make sure the serviio user has read permission on those folders though (use the Users control panel in DSM).

      2. Mark Paulson

        First let me thank you for your work. Yes I did install YASM and it doesn’t recognize the –enable-sse3 option.

        I also am having problems getting the script to start serviio with the script. I have edited Bash and Ash until I’m blue in the face. I can start Serviio manually. This is my first foray with Unix so I suspect I have something else set wrong. I hate to be stupid but what would the unix path to the Synology default video path be?

      3. patters Post author

        bakman wrote two different comments (one stating SSS3 then the next correcting it with SSE3) so I assumed he meant SSE3, but in fact the Atom D510 in your Syno supports SSSE3, which should be even better. Try:
        ./configure --arch=x86_64 --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

        Does that work?

        To get it starting automatically, can you try editing /volume1/@tmp/S99serviio.sh
        and under # start Serviio in background mode
        add:

        source /etc/profile

        Doesn’t seem to be needed on mine but someone else mentioned they had to do it.

        For the path to the video files you want to serve, I have mine in /volume1/public/video for instance. I have amended the guide with a screenshot of that.

      4. Mark Paulson

        ssse3 was the ticket! It compiled like a charm. I still cannot get the script to work. I have reviewed the Bash and Ash setting at least 50 times. Any ideas?

      5. Mark Paulson

        I did with no luck. I can manual start and all seems to work well (played videos), but no luck on starting the script. Is there some kind of unix command that shows what the path s set to?

      6. Mark Paulson

        Dos this look right? I put the echo $PATH right after Start:

        /opt/java/ejre1.6.0_21/bin:/opt/bin:/opt/sbin:/opt/java/ejre1.6.0_21/bin:/opt/bin:/opt/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin

        Looks like a lot of duplication to me.

      7. Mark Paulson

        Woot! Found it! I had change /sbin/nologin to /sbin/sh instead of /bin/sh. Working like a charm.

      8. patters Post author

        Great! Glad you got there in the end. Incidentally, my PATH looks like this while logged in as root:
        ~$ echo $PATH
        /opt/java/ejre1.6.0_21/bin:/opt/bin:/opt/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin
        ~$

        I’d be interested to know whether the Intel Atom with its SSSE3 can manage realtime MPEG2 video transcoding.

      9. Mark Paulson

        I’m a real noob to this stuff. Just received my DS in January. Tell me how to test and I will let you know if it works.

  15. Abhinav

    Very nicely written and helpful. 5 stars for you. might have fumbled once, rest was smooth.
    can use Console only in chrome rest is black and black

    Reply
  16. Marek

    Did anyone tested transcoding to m2ts on DS-211j ?
    What are the result (with avi / mkv files)?

    I’ve panasonic g20 and wanted to buy this NAS to watch movies via DLNA.
    Or should I buy DS211?

    Reply
  17. Andyleo

    Firstly….thanks for this article…I have been Serviio on my PC for sometime now and have got used to it and the plethora of formats it plays flawlessly.

    I recently bought a Synology Ds410 (it runs DSM 3.0)…I have tried following this article to the letter (I am am a linux newbie so I must be making some stupid mistakes).

    Here are the two issues I run into.

    FFMPEG: The make doesnt take 25 minutes as stated and runs into error messages after 30 seconds. I am pasting the error message from the point it starts failing:

    CC libavfilter/vsrc_nullsrc.o
    AR libavfilter/libavfilter.a
    CC libavformat/4xm.o
    /tmp/cccqht5Y.s: Assembler messages:
    /tmp/cccqht5Y.s:56: Error: Unrecognized opcode: `eor’
    /tmp/cccqht5Y.s:57: Error: Unrecognized opcode: `bic’
    /tmp/cccqht5Y.s:58: Error: Unrecognized opcode: `mov’
    /tmp/cccqht5Y.s:59: Error: Unrecognized opcode: `eor’
    /tmp/cccqht5Y.s:78: Error: Unrecognized opcode: `eor’
    /tmp/cccqht5Y.s:79: Error: Unrecognized opcode: `bic’
    /tmp/cccqht5Y.s:80: Error: Unrecognized opcode: `mov’
    /tmp/cccqht5Y.s:81: Error: Unrecognized opcode: `eor’
    /tmp/cccqht5Y.s:241: Error: Unrecognized opcode: `eor’

    I do get the Serviio web console with a bix red x…I tried starting Serviio manually without ffmpeg and get the following error:

    /opt/java/ejre1.6.0_21/bin/java: line 1: syntax error: unexpected word (expecting “)”)

    Thanks in advance for your help

    Regards,
    Andy

    Reply
    1. patters Post author

      Apparently your Synology has a PowerPC processor. If you read gregorio’s comments the Oracle Java Runtime requires a newer version of a core library than Synology currently provide for their PPC Linux. So unfortunately it looks like your only option would be to wait for JamVM to support Java 1.6.
      For FFmpeg Did you use the PPC configure arguments from his comment? I didn’t post them in the main article because I figured that it was a bit of dead end what with the Java issues. I’ll add them now…

      Reply
  18. Guy Simms

    These instructions dont work!. As soon as you run ipkg remove wget you break ipkg!. Even if you copy back the wget from usr/syno/bin it wont ever work again as this is an older version of wget…which means you cannot carry on with the install!!

    How are you guys getting past this part of the install!!??..im baffled….

    Reply
    1. patters Post author

      Does running ipkg install wget-ssl work?
      Report back here if it does, that way I can amend the guide.
      The problem is that I can’t go back to a clean system and try this again without completely reinstalling my NAS which I don’t want to do. Also DSM 3.1 may have changed things slightly.

      Reply
  19. Guy Simms

    OK, i managed to get past it, you were right.
    It seems that when ipkg install optware-devel fails it actually downloads wget-ssl first. So what you need to do it issue the remove wget, then run ipkg install wget-ssl, which i cant quite remember.
    Then you can contine.

    Thanks for your help.

    I have serviio installed now, but has anyone tested it with a DS211J?, as i seem to get poor performance. Playing a 720p .mkv file the film starts and then just constantly stutters every few seconds. My NAS CPU is staying on 100% too and memory around 40%

    Reply
    1. patters Post author

      Have a look which process is thrashing the CPU by running ps
      It could well be that you didn’t disable Generate thumbnails for local videos. This is very heavy on the CPU so I recommend disabling it. Remuxing a 1080p file containing H.264 and transcoding its audio to AC3 should be within the capability of your NAS. They certainly are on mine with its 1.6GHz CPU. The 211j should have a 1.2GHz chip, though its RAM is DDR2 rather than DDR3.

      Reply
  20. Guy Simms

    If i check the NAS resource monitor ffmpeg seems to stay around 90-95% the whole time, i would have thought that after finishing the remux it would calm down. And even when i stop playing the film it seems to forever stay at 90%, like this morning when i checked it was still like it after playing a film last night!. I had to reboot the NAS to stop it.
    I have definitely unticked the ‘Generate thumbnails for local videos’ tab. I have set the audio to ‘downmix to stereo’ is this correct, or should i leave it as ‘Keep Original’?

    Other than that i cannot see alot of other settings to change. Can you advice on recommended settings?, such as the library refresh interval etc..

    Thanks again for taking the time to help me.

    Reply
  21. Troy

    Hello from Minnesota, USA!

    I have a Synology DS411+ with DSM 3.1, and I have successfully utilized Patters’ instructions and got Serviio running on it, which is working well with a Sony BDP-S770 player. I wanted to contribute by sharing the issues I ran into and how I got through them, but first I want to sincerely thank Patters and contributors for producing and maintaining this excellent guide! I followed every step in the article and had a few sticky spots but eventually figured them out reading posts here and the serviio forum. I’m mostly new to Linux, but not computers.

    My first issue was with this line:

    cp /usr/syno/bin/wget /opt/bin
    (or even the later suggestion “cp /usr/syno/bin/wget /opt/bin/.”, which seemed to do the same thing)

    On my system it turns out that /usr/syno/bin/wget is the v1.10 version of wget, but I think instead we wanted to preserve a copy of the v1.12 version, which I figured out by reading some posts at the serviio forum website. When I copied the v1.12 version from /opt/bin before removing, I replaced the copy so ipkg could run again. Maybe I shouldn’t have, but I copied the v1.12 to /usr/syno/bin/wget also. So, this is basically what I did for that group of commands:

    cp /opt/bin/wget /volume1/public/copy-wget (to save a copy of the v1.12 version)
    ipkg remove wget
    cp /volume1/public/copy-wget /opt/bin/wget
    cp /volume1/public/copy-wget /usr/syno/bin/wget
    ipkg install wget-ssl
    ipkg update
    ipkg upgrade
    ipkg install optware-devel

    That may not be the optimal way to do it, but it’s what I did. I wrote over the v1.10 wget. Actually it looked like optware-devel installed except there was a complaint about a libidn library, which I thought I would find separately, but I didn’t. I think I thought it was okay to keep going (even though I was lost), so I did and everything was going okay until it was time to compile ffmpeg with the “./configure…” command, it said a bunch of things, but the first something like ‘Cannot compile executable with gccc’, or in other words it wasn’t working.

    I think I eventually figured to do a “ipkg remove optware-devel” and it told me “Nothing to remove”, so then I said “s#!t” and did the “ipkg install optware-devel” and the dang thing finished with a “successful” message. Then I did the compile with the long “./configure –arch=x86_64 –enable-ssse3…” command and it ran for about 15 minutes I think before it finished with another “successful” message. Make install worked. nano /etc/passwd edit worked. Then I used that corner icon to copy to clipboard that script for starting and stopping serviio. When pasting back into nano, the formatting wasn’t quite the same, but I thought maybe it was supposed to be like that, maybe it wasn’t displaying correctly on the webpage, because it I didn’t really know how it should look. Later when I tried to run the script with “/volume1/@tmp/S99serviio.sh start”, it told me there was a syntax error at “stop)”. The I reloaded the mal-formatted script and edited everything so it looked just like on the article webpage, line-spacing and all, and it worked perfectly when run.

    Everything else worked well for me from the article. At first I had the “Generate thumbnails for local videos” selected and when I logged into the NAS and looked at Resource Monitor, it showed ffmpeg running and using about 25% CPU all the time, so after a day I turned off that option and now idle CPU usage hangs between 0-1%.

    I do see a bit of stuttering in high movement spots of large HD video files, but it works a bit better with serviio on the DS411+ than from my PC. I read somewhere that this has to do with the Sony player requiring 32K chunks in the stream or something like that, which makes some sense since we’re not exactly taxing the gigabit network or the NAS CPU. I hope Sony fixes that, or that there is some way to improve that.

    One last item, that I thought I would ask about — if I use PuTTY now and run “ps”, it lists about 36 lines that begin with this:
    7391 serviio 516m S /opt/java/ejre1.6.0_21/bin/java -Xmx384M -Djava.net.preferIPv4Stack=true -Dderby.system.home=/opt/serviio/library -Dserviio.

    I’m guessing they’re normal and all supposed to be there. That many wouldn’t be abnormal, would it? They start with their own numbers, of course. CPU is very low, memory 18%, so I’m not that concerned.

    Thanks again!

    –Troy

    Reply
  22. Torsten

    Hi, thanx for a great guide.

    I have the DS211j with DSM 3.1 and stumble into problems right at the beginning. When I have removed wget and copied the new I get this error when trying to get wget-ssl:

    ~$ ipkg install wget-ssl
    Installing wget-ssl (1.12-2) to root…
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/wget-ssl_1.12-2_arm.ipk
    Nothing to be done
    An error ocurred, return value: 22.
    Collected errors:
    ipkg_download: ERROR: Command failed with return value 41: `wget –passive-ftp -q -P /opt/ipkg-XjUvPc http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/wget-ssl_1.12-2_arm.ipk
    Failed to download wget-ssl. Perhaps you need to run ‘ipkg update’?

    Any ideas how to solve this?

    Thx in advance.

    Reply
    1. Nate

      This is exactly the same error I am getting. I have been pulling my hair out for hours now trying to figure out what went wrong. SYnology DS211j with DSM 3.1 for me. wget says it is v 1.10.1

      I managed to find the wget-ssl.ipk in /root and install it, but it then when it tries to install libidn_*.ipk, it gives a similar error. Running ipkg update gives a similar wget error, too.

      It seems like anything that has to do with wget is messing up at this point.

      Is there some kind of change between the DSM versions that is messing things up? I dont think you can downgrade DSM versions, unfortunately.

      THANKS!

      Reply
      1. Torsten

        Hey buddy.

        I downgraded to DSM ver 3.0 using method 1 in this guide:

        http://forum.synology.com/wiki/index.php/How_to_reinstall_current_or_previous_firmware

        Values for VERSION (edit using vi or nano):
        majorversion=”3″
        minorversion=”0″
        buildphase=”0″
        buildnumber=”1337″
        builddate=”2010/09/21″

        Then use the GUI in DSM to “upgrade” using this file:

        http://ukdl.synology.com/download/DiskStation/DSM3.0/1354/synology_88f6281_211j_1354.pat

        Once installed refresh browser. Took a minute or two before correct icons showed up.

        After that I used Patters guide and voila, worked beautifully.

    2. Gabryponte

      Hi, I resolved the annoyng wget problem

      you have to do this:

      ipkg remove wget
      cp /usr/syno/bin/wget /opt/bin
      ipkg install wget-ssl
      –> then you get the annoyng problem
      this is becaouse ipkg cannot install the dependences of wget-ssl

      so try to install them manually:
      ipkg install -force-downgrade -force-reinstall -V 3 libidn_1.19-1_arm.ipk
      ipkg install -force-downgrade -force-reinstall -V 3 openssl_0.9.8p-1_arm.ipk

      then again
      ipkg install -force-downgrade -force-reinstall -V 3 wget-ssl_1.12-
      2_arm.ipk

      this shuold fix the wget problem….
      do at your own risk!!

      Reply
      1. Torsten

        Hey buddy.

        Thanks for that. Just downgraded to ver 3.0 but I will try to upgrade again and see if I can get it to work.

  23. Justin

    Hi guys, I’m having a problem getting the ffmpeg binaries to install on my DS211. I manage to compile them as per the instructions, but when I get to intalling them I get the following error :

    $make install
    make install
    INSTALL libavdevice/libavdevice.a
    /bin/sh: install: not found
    make: *** [install-libavdevice-static] Error 127

    Any idea what I’m doing wrong ?

    Reply
  24. Michiel

    Awesome guide! But i get stuck at the configure command for FFmpeg. I have a DS1010+ so i installed yasm first an then tried:
    ./configure –arch=x86_64 –enable-ssse3 –prefix=/opt –extra-cflags=’-I/opt/include’ –extra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame

    But i get an error “gcc is unable to create an executable file.”
    i tried it without the ssse3 option too, but got the same error.

    Can you help me?

    Reply
    1. Michiel

      I found the problem. In config.log there was an error on libc.so being truncated. Reinstalling it by -force-reinstall on the optware-devel didnt work. I figured it was part of the libc-dev package so i did a “ipkg -force-reinstall install libc-dev”. After that the configure worked ok.

      Reply
  25. Apil

    Dear Friends.
    Im trying to follow this guide.
    I will start to say that im a linux noob, but im trying my best.
    I am having the same problem that i think maybe others have.
    I have a DS1511+ and i think first time i tryed this guide i use the wrong bootstrap.
    But i started over, and is using “syno-i686-bootstrap_1.2-7_i686.xsh” that should be for The Atom CPU

    This is the picture im getting:
    “Configuring zlib
    An error ocurred, return value: 1.
    Collected errors:
    ERROR: The following packages conflict with wget-ssl:
    wget
    Nasse> ipkg remove wget
    Removing package wget from root…
    Successfully terminated.
    Nasse> cp /usr/syno/bin/wget /opt/bin
    Nasse> ipkg install wget-ssl
    Installing wget-ssl (1.12-2) to root…
    Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/wget-ssl_1.12-2_i686.ipk
    file_move: ERROR: failed to rename /opt/ipkg-MY6fCj/wget-ssl_1.12-2_i686.ipk to /opt/ipkg-MY6fCj/wget-ssl_1.12-2_i686.ipk: No such file or directory
    Nothing to be done
    An error ocurred, return value: -1.
    Collected errors:
    Failed to download wget-ssl. Perhaps you need to run ‘ipkg update’?
    Nasse>”

    I have followed everything by the book, first using this guide from : http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc, to get the bootstrap installed.
    “Reboot your NAS.
    Enable and then Login to the Command Line Interface as user “root”, password is the same as for admin.
    Change to a directory such as “/volume1/@tmp”, i.e. enter the command “cd /volume1/@tmp”
    Get the NAS to download the bootstrap, e.g. if you have an mv5281 ARM model enter the command “wget http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh“, alternatively download the bootstrap to your PC and then copy it to a shared folder on the NAS
    Now run the .xsh script, e.g. if you have an mv5281 ARM model and used the bootstrap above enter the command “sh syno-x07-bootstrap_1.2-7_arm.xsh”
    After the script has finished you can delete the script file, e.g. for mv5281 ARM users using the bootstrap above enter the command “rm syno-x07-bootstrap_1.2-7_arm.xsh”
    Reboot the NAS and login again to the Command Line Interface as user “root”
    Update the ipkg list of available packages using the command “ipkg update”
    Upgrade any ipkg installed packages to the latest versions using the command “ipkg upgrade” ”

    Only change is i use the Bootstrap that should be for DS1511+

    After this i go to the start of this guide, starting with doing
    ipkg install optware-devel
    then it galts as explained in the guide, then i remove the wget
    ipkg remove wget, then use the cp command
    cp /usr/syno/bin/wget /opt/bin
    and then i get here after using this command
    ipkg install wget-ssl

    “Failed to download wget-ssl. Perhaps you need to run ‘ipkg update’?”

    Im very stuck from here, and have been trying to redo it several times, used hours and hours hoping to get it to work, but now i must give up and home someone here can give me a hint :)

    Thank you very much
    Apil

    Reply
    1. patters Post author

      Have a look at Gabryponte’s comment a little above yours. Sounds like the same issue, though he’s on ARM and you’re on Intel. So I guess you’d have to find the equivalent package names that need to be force reinstalled.

      Reply
      1. Apil

        Thank you for the responds :)

        In the meentime, i figure out how to set it back to DSM 3.0, and then the guide worked.. untill i got to the Java part
        “cd /volume1/public
        mv ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz /volume1/@tmp
        cd /volume1/@tmp
        tar xvzf ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz
        mkdir /opt/java
        mv ejre1.6.0_21 /opt/java”

        Then i got very confused on what to do, because i figure that i cannot just follow the guide as it says here and use the arm java

        I have been looking at something like this:
        Java EE SDK 5 Update 1 for Linux
        But it comes as a .bin, and then im lost again.

        Btw, it seemed at first that i lost all my data on my nas becasuse of that downgrade of firmware
        I used the version of doing that, where i change the VERSION file’s info and then upload an older firmware.
        But now i have upgraded it back to the 3.1 DSM; and the data is back.

        So now im at the part where i have to figure out the Java thing, any tips :)?

        Thank you very much
        Apil

      2. Apil

        Now for a few hours of looking at the java site, i figured that it was ejre-1_6_0_21-fcs-b09-linux-i586-headless-27_sep_2010.tar.gz that i should use, so i have done that now and im at the
        “Now use nano to edit some configuration files (Ctrl-o saves, and Ctrl-x exits).
        First edit the profile for all bash shell users:
        nano /opt/etc/profile”

        Atm, i have no idea what this meens, but ill try to figure it out, unless you beat me to it and can explain it :)

        Ty ty Apil

      3. Apil

        Damn this is not easy, with dsm 3.1 and a non arm cpu (DS1511+)
        I dont think i have nano installed, becuase i can see the Profile file is there, but it gives me
        Nasse> nano /opt/etc/profile
        -ash: nano: not found

        When i try that, i tryed to install Nano, but then i get the
        “Perhaps you need to run ‘ipkg update’?”
        Fault again, because i reinstalled 3.1
        After this if i get this fixed, i can read on that i have to compile something, and i have to do it in some other way because of my atom cpu, as far as i understand, im thinking of the comments made by Mark Paulson..

        Hmm it all seems alittle hopeless :P

        Hope someone has some wise words for me.
        Ty all.
        Apil

      4. patters Post author

        I upgraded to the latest DSM 3.1 last night and got that same error when I tried to use ipkg for some other package. Running ipkg update did fix it though. I assume you tried that already?

      5. Apil

        Hey Patters, ill give it all a try again this weekend, and let you know how it turned out :)

        Thank you.

        Apil

  26. beckos

    I had a NAS replacement due to a deffective unit and now I started with a new unit 211+ with DSM3.1-1605 right from the beginning. Trying to reinstall Serviio I get this very problem:


    ipkg install optware-devel
    -ash: ipkg: not found

    What is missing from my unit?

    Thanks!

    Reply
      1. beckos

        I appologize, I didn’t. I installed Serviio months ago and I forgot about the bootstrap being necessary under a new DSM.

        However, that didn’t solved the problem I ran into due to wget component. I couldn’t managed to install Serviio 0.5.2 on a fresh DSM 3.1 because all necessary downloads encounter errors. I had to downgrade to DSM 3.0 by changing VERSION with this procedure, then I upgraded again to DSM 3.1.

        Serviio 5.0.2 is now running again, but I do have another issue with not being able to add more than 3 shared folders in the Library (I tried with all available 0.5.2 PHP UI’s available); I can’t even delete the three saved paths or edit them – all operations result in Cannot put repository error. I don’t know if this is due to media library still under reconstruction (it’s quite huge and it takes a while…)

  27. Pim

    Hi,

    I’ve just bought myself a ds211j and working my way through the instruction as mentioned on this page, including all remarks and corrections. So far I have done it twice but what I see is that after the part:

    wget http://acidumirae.com/downloads/serviio-0.5.1b.zip
    unzip serviio-0.5.1b.zip
    mv serviio-0.5.1 /volume1/web/serviio

    There is no serviio user interface.

    Is there anybody that could help me?

    /Pim

    Reply
    1. patters Post author

      Did you enable Web Station (Control Panel -> Web Services)? It’s mentioned at the start of the guide, but I’ll move it to make it less likely to be overlooked.

      Reply
  28. Pim

    Hi,

    Its up and visible on the PS3 now. Thanks!
    The final thing is that I’ve shared video folders, the serviio user is having the proper rights, the folder is visible on the PS3, but the content, files and sub dir, are not shown.

    Your help is appreciated.

    Thanks again.
    Pim

    Reply
  29. beckos

    Hi Patters,

    Before yesterday I had Serviio 0.5.2 installed on DSM3.1 and it all functioned good. I configured a windows Serviio Console on a different PC to manage the server.

    After you updated your tutorial with DSM UI integration, I tried it and the icons show in the DSM, but after moving the S99serviio.sh file from /usr/local/etc/rc.d to /opt/etc/init.d the serviio server processes don’t survive longer than a few seconds. I tried to restart the NAS – same thing. Also tried to move S99serviio.sh back to where it was; restarted NAS – same thing. Reinstalled Serviio (but preserving library) – same thing. Basically, I can no longer make Serviio run again. Am I missing something?

    Reply
    1. patters Post author

      Does Serviio’s log tell you what’s wrong? What happens if you manually launch it from /opt/serviio/bin/serviio.sh? Did you upgrade and forget to chown the Serviio folder perhaps?

      Reply
      1. beckos

        Unfortunatelly I jumped into removing Serviio again so I could try another clean reinstall (still trying to preserve the library, but I don’t think it has anything to do with the issue), hence I don’t have the log available now – I will look into the next one after re-installation.

        I did chown /opt/serviio folder to serviio user.

        Maybe you could replicate the problem by removing your Serviio instalation and daemon, restart the NAS and reinstall Serviio with the updates you made?

      2. patters Post author

        Hmm. Well I did all that last night when I went to 0.5.2 so my library’s rebuilt. I completely deleted /volume1/web/serviio and /opt/serviio. In testing various locations for the daemon script (like /usr/local/etc/rc.d which is the ‘official’ 3rd party location but didn’t work) I effectively did what you’re suggesting. There were times that it didn’t start at boot, but putting it back was ok. Did you re-create the daemon script from fresh when you were testing? Are the permissions on it set to 755 (chmod +x)?

      3. beckos

        YES, chmod +x was also applied to daemon file.

        Now, I did the following:

        – deleted Serviio server folder and web UI installations
        – deleted daemon file
        – reinstall Serviio server
        – replacing installed library folder with the old one
        – chmod on serviio daemon
        – chown on /opt/serviio folder
        – reinstall web interface
        – recreate a new daemon in /@tmp folder (tested at this point: all was good and I was waiting for a few minutes; even the DSM UI showed up and all library folders were in place)
        – stop server and moving daemon file to /opt/etc/init.d
        – restart NAS

        Result: SERVIIO IS STARTED. UI IS FUNCTIONING IN DSM. MEDIA LIBRARY WAS PRESERVED

        Something was wrong though, but I don’t know what…

  30. Torsten

    Hi again.

    Okay, so I had installed Serviio 0.51 on my DSM 3.0 (211j). Wishing to upgrade to DSM 3.1 I looked through this guide and saw the update on the directories for the S99serviio.sh and stopped Serviio like this: /usr/syno/etc/rc.d/S99serviio.sh stop
    moved like this: mv /usr/syno/etc/rc.d/S99serviio.sh /opt/etc/init.d
    started it again: /opt/etc/init.d/S99serviio.sh start
    and checked it working after a reboot.
    I then upgraded to DSM 3.1 using the GUI in control panel. When finished and rebooted I used these commands: “cp /opt/lib/libbz2.so.1.0 /lib” and “cp /opt/lib/libz.so.1 /lib”
    and tried to access the Serviio page. It shows but with the big red X.

    Located serviio.log but it doesnt´t make much sense to me :)

    Anyone having a clue as to what to do? If a full removal of serviio is needed please write total noob format as I have above as I am……… a total noob to linux.

    Thanks,
    Torsten

    Reply
    1. Torsten

      Hmmmmmm, after having left the NAS to itself for an hour it suddenly worked………. Well well.

      This poses a new question, How do I upgrade to version 0.52? I have seen the info on http://www.serviio.org stating:
      Stop Serviio server and console

      Overwrite all files in the current Serviio location with the new ones but keep folder library intact

      Could someone translate this into noob format like patters´ instructions?

      Thanks,
      Torsten

      Reply
      1. patters Post author

        Yeah, I though that might get messy so I ended up just deleting it completely and reinstalling.
        I have run into this kind of problem on a Mac before. On Windows if you copy a folder called ‘serviio’ to a location that already contains one, it merges the two folders. On a Mac it destroys the first folder and replaces it with the new one. I lost several gigs of data from an SD card by doing that :( I have a feeling Linux may do the same.

        I guess you could move the library out of the way though, then put it back. Stop Serviio, then:
        mv /opt/serviio/library /volume1/@tmp
        rm -r /opt/serviio
        rm -r /volume1/web/serviio
        cd /volume1/@tmp
        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 /opt/serviio
        mv /volume1/@tmp/library /opt/serviio
        chown -R serviio /opt/serviio
        wget http://labs.softjourn.com/attachments/download/67/serviio-0.5.2.1b.zip
        unzip serviio-0.5.2.1b.zip
        mv serviio-0.5.2 /volume1/web/serviio
        cd /usr/syno/synoman/webman/3rdparty
        wget http://dl.dropbox.com/u/1188556/blog/serviio_syno_DSM.zip
        unzip serviio_syno_DSM.zip
        rm serviio_syno_DSM.zip

        Then reboot

        I’m glad to hear my guide is sufficiently clear to tempt noobs into trying out this kind of modification :) that was the purpose after all.

      2. Torsten

        Patters,

        thanks for very good noob instructions again :) While I waited for downloads to be fixed at serviio.org I came across the resource monitor on the NAS. The CPU load is pretty much fixed at 100% now (as opposed to 20´s before) and this is with serviio completely gone. Can I see what is causing this somewhere? It has been like this over night so I don´t think it is the DSM media server rebuilding the library (even though I could be wrong :) ).

      3. patters Post author

        I think you can double click on the CPU graph to get a list of running processes, or run ps from the SSH session.

      4. Torsten

        Yep, tried to click the graph (didn´t knew that one) and it is the “convert” process working the cpu. Have looked for different solutions to this problem, nothing to do with serviio.

        Thanks again.

      5. Torsten

        Okay Patters, you the man! It worked.

        One issue during the process was that I was unable to move the library back as it said the destination folder was not empty, it contained a file called derby.properties. I managed to move this and then moved the library folder. Do I need the new version of derby.properties(could pose a problem as I moved derby.properties to the @tmp folder which of course was emptied when serviio ran :) )?

        After finishing your instructions I rebooted and Serviio 0.52 is up!!! It however still says Serviio console 0.51 on the browser tabs but in the about section in serviio window it says 0.52 so it shoud be the proper version.

        It was pretty cool you also provided the app for DSM. It however has a little flaw as it doesn´t run :) It looks like it is looking for an IP address called 192.168.1.202 (my range is 192.168.5.xxx). Can I correct this somehow?

      6. patters Post author

        I don’t think the derby database will have changed at all between 0.5.1 and 0.5.2, Zip said it was a minor fix. As for that IP – you’re meant to put the IP of your own syno in the config file instead!
        For info, I think /volume1/@tmp gets emptied at each boot – it’s not Serviio related.

      7. Torsten

        RTFM twice eh ;) Config has been edited, works like a charm. Thanks for your answers and patience! Great app for a great product!

  31. Fresco

    Applied successfully on my Syno 1511+, and it seems to run correctly on the syno.
    Next step : try it on my TV ;)

    Many thanks :)

    Reply
  32. Pim

    It still is really strange…..
    Everything is installed and running, both on the ds211j and visible on the PS3.
    In the Serviio console I’ve added the folder /volume1/public/video and the user serviio has all rights in named folder. This folder contains an .avi and a .mkv file.

    On the PS3 I don’t see any files and folders in the Video/Folders/video, even though the library has been rebuild.

    Any suggestions on what to do?

    Reply
    1. patters Post author

      I only used /volume1/public because I chose to stick all my content in the public share. From a PC, browse to your NAS by just using the IP (Start Menu -> Run -> \\192.168.1.50). A window will open with containing your share names. Are you sure it’s in the public one? Maybe you made a share called video (in which case the path you need to add to the library would be /volume1/video.
      Have a look at the Serviio forum troubleshooting stuff (like installing uPnP Inspector). In that app, right-click Serviio and select browse media server and see if it returns DLNA results.

      Reply
  33. Gagan

    Patters, Thank you for your guide. Managed to install the server on my DS211J and it’s working like a breeze. Great experience. Just would want to recommend if you could collate the comments on typo’s etc and print a new version of this guide it would be quite helpful to other people. I had to actually go through the post and all the comments and that too twice before attempting this. But in the end managed to do so. Thanks once again for your post.

    Reply
  34. AndyTS

    I’m a Linux noob (in fact a modding noob). I want the functionality that serviio can give but before I start learning enough for me to take the risk of bricking my DS112J I want to know a few perhaps elementary facts.

    1 If I install serviio will I be able stream video to (releatively) dumb client such as a Sony Bravia Internet TV or will it only stream to PS3-type devices
    2 If I install serviio and I like it, will I need re-install it every time Synology releases DSM 3.2 or 4.0 or whatever?
    3 Is there a safer less complicated way of getting my DS to stream video content to my Sony Bravia TV?

    Maybe these questions have answered my main question (which only I can answer) should I do it or not?

    Thanks for your replies.

    Reply
    1. patters Post author

      1) Bravias have their own well supported device profile built into Serviio. Be aware that the 2009 models (like I have) are pretty bad in their format support (AVIs need transcoding, and h.264 only plays if it’s a certain standard resolution). 2010 and later models are much better, as are the 2010 and later Sony Bluray players.

      2) Not the way the guide currently installs it. The only thing that needs re-doing after a DSM upgrade so far is copying the two symbolic links back to /lib. I’ll modify the daemon init script to do that automatically (done), then no action will be needed.

      3) The DLNA media server built into DSM is pretty basic. It can’t remux or transcode anything. So if the video isn’t precisely a format that your device supports then you won’t be able to watch it.

      Reply
      1. AndyTS

        Well being an inquisitive/foolhardy guy, I started this process even if itmay be way beyond my capabilities. All was going swimmingly until the java install. I know you’ve answered this already but I cannot follow. How do I get the gz file I saved on my vista desktop to the root dir in DS???? If I use the GUI i can’t access anything other than the music video photos file system. I can’t get the Putty SHH client to see my vista machine even though it is running on it.

        So for a simpleton can you describe the copy file from..to command I need? I tried also using WGET and using the URL oracle gave me but it told me the URL was too long. I don’t have access to a hosting site otherwise I suppose I could post the file there and WGET from e.g. mediafire

        Also you have used folders such as volume1/@tmp and Volume1/public. I have tried to cd to these but I can only get to volume1 I assume you have created these and they aren’t native? I am just a bit concerned that I get the directories correct.

        Thanks

      2. patters Post author

        I just meant a top level share that you can access from your PC. So \\yourNAS\public which you can access on the NAS side as /volume1/public. In your case you might use say \\yourNAS\videos or whatever share you created on your NAS when you set it up. I use public because I want my films accessible to any NAS user account.

        As for /volume1/@tmp it’s a hidden folder which you can only see on the NAS side.

  35. Tuck

    No problems installing on DS210J. When trying to watch an .avi on my sony Bravia (KDL-40EX700), the video was choppy and wouldn’t play for more than a few seconds before having to re-buffer. I guess transcoding on this unit isn’t possible. Ill try again after a few hours, perhaps the library was still being created

    Reply
    1. patters Post author

      Audio transcoding is all the ARM processors can manage really, so you may need to use another device as your main renderer.

      Reply
  36. sandro

    Hi all,
    I am actually trying to follow the procedure and install Serviio on my new DS211j coming with DSM3.1.
    Everything runs fine until I try to compile ffmpeg, when I get the first error message:

    bad variable name: line 11: LC_ALL

    So I comment out those two lines defining the variable LC_ALL and I try running sh ./configure again… but I get to the next error:

    ./configure: line 317: syntax error: unexpected word (expecting “do”)

    Did anybody experience the same problem?

    Btw, looking at the CPU type it says:

    DiskStation> cat /proc/cpuinfo
    Processor : Feroceon 88FR131 rev 1 (v5l)
    BogoMIPS : 1192.75
    Features : swp half thumb fastmult edsp
    CPU implementer : 0x56
    CPU architecture: 5TE
    CPU variant : 0x2
    CPU part : 0x131
    CPU revision : 1
    Hardware : Feroceon-KW
    Revision : 0000
    Serial : 0000000000000000

    Thanks in advance for your help!

    Bye!

    Reply
    1. patters Post author

      I haven’t seen that before, and I recently recompiled FFmpeg on DSM 3.1 (though mine is an upgrade from 3.0, in case it makes a difference). Are you definitely using the source from the Serviio website and not a newer Git snapshot?

      Reply
      1. sandro

        Hi patters,
        it looks like the problem was coming from unzipping the package under win7 and moving it to linux. I tried to unzip it directly under linux und everything worked fine. Btw, on my 1.2GHz the full compilation procedure took almost one hour.
        …but now I got a brand new problem! When I launch the daemon I see the “Start Serviio..” output string but it looks like the service is not really started, since I do not see it in the “ps” list and my TV does not see any server through its wi-fi connection.
        I have carefully followed all the steps you have listed above so I’m wondering what could be missing…
        Thanks, bye!

      2. patters Post author

        Sorry for the delay – was on holiday. Did you definitely give the serviio user the shell of /bin/sh in /etc/passwd? Another commenter on here missed that. Check you can log in to an SSH session as the serviio user.

      3. sandro

        (sorry, I made a mistake writing… one step before: it’s not only the TV that does not see any server, it’s the Serviio console itself that tells me it can’t find any service running)

      4. sandro

        hi patters, no problem, i guessed that ;)
        i somehow made it and i’ve been able to send to my sony bravia pictures music and videos.
        unfortunately only the low resolution videos were transcoded properly, meaning that the transcoding works fine but the speed of the syno processor is not enough to elaborate large frame data.
        anyway, thanks a lot for your help!
        bye!

      5. sandro

        btw… is there any statistic on the results in terms of transcoding capabilities among the various synology machines? which machine turned out to be powerful enough to transcode a movie and “smoothly” send it to a tv-set?

        ciao

      6. patters Post author

        Judging from the performance testing Serviio on my Vaio P with Atom Z520 1.33GHz I doubt any of the Synos are good enough for video transcoding. I’d recommend you think about a Sony Bluray player for playback, then you can keep the Syno. It probably works out cheaper than getting a different NAS, plus you can play Bluray discs! :)

      7. sandro

        Do you mean that your Atom barely makes it, so no way for the smaller ARM processors?
        At this point I have a question… ;)
        Do you think that Serviio could be installed on a different NAS (I’m thinking about a Netgear machine) with a procedure similar to the one you described in this article? As far as I know they also have Intel Atom procs and Linux installed…
        Thanks, bye!

      8. patters Post author

        Yes, and I’m also saying that you shouldn’t buy an Atom powered Synology expecting it to manage video transcoding.

  37. eup

    iget this eror how can i pass it

    DS710> ./configure –arch=x86_64 –enable-ssse3 –prefix=/opt –extra-cflags=’-I
    /opt/include’ –extra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –di
    sable-ffplay –disable-ffserver –enable-libmp3lame

    gcc is unable to create an executable file.
    If gcc is a cross-compiler, use the –enable-cross-compile option.
    Only do this if you know what cross compiling means.
    C compiler test failed.

    If you think configure made a mistake, make sure you are using the latest
    version from SVN. If the latest version fails, report the problem to the
    ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
    Include the log file “config.log” produced by configure as this will help
    solving the problem.

    Reply
      1. eup

        thanks for your answer but still the same eror
        maybe i am missing somthin i will do it again from begining

      2. patters Post author

        Hi eup – I’ve since realised that it’s –arch=x86_32 to force 32bit, not –arch=x86. Can you try that?

        You didn’t mention whether you got yasm, LAME and nasm compiled. Your error looks like the compiler gcc may not be in the path somehow. Can you run gcc –help

    1. Rogier

      I just have the same problem that I get stucked at the line ./config… ect etc..
      I have the DS111( DSM3.1) . so for my it is with –Arch-arm.
      Did I miss installed something.
      The only thing that was different was the version of java (example version= ejre-1_6_0_21, I have the ejre-1_6_0_25) I changed all the lines included to my verion.

      Hope to hear from you.
      Thanks.

      Rogier

      Reply
      1. justme

        please help i am having the same problem. c compiler failed so how do I enable cross-compile if that is indeed the problem

      2. G

        Hi,

        I also have an the same issue with the ‘./configure –arch=arm –enable-armv5te –prefix=/opt –extra-cflags=’-I/opt/include’ –extra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame’ command.

        I am running a DS211+

        Many thanks for this guide!

        G

      3. patters Post author

        Hi Rogier – what is the exact error you’re getting? Mine is a DS111 and I didn’t get this. I have also re-compiled FFmpeg since upgrading to DSM 3.1.

      4. Lewis

        Did this get solved by any chance? I’m on 3.2 on a DS111 and the c compiler always fails.

  38. Chris

    Hello everyone,

    first i want to say thanks to patters for this great guide.
    I encountered no serious problems during installation.

    But now, i have two strange issues.
    1. When connecting with my PS3 to serviio, sometimes he can open mkv files and sometimes he just says unsupported data. And yes, its always the same with all mkv´s, no specific mkv-file…

    2. The serviio console reacts very slow. And the first response is always the red cross that he didnt find serviio running (but it is). I need to press the tab two or three times till he finds serviio running…

    Any ideas about this issues?

    Thanks you very much !

    Reply
  39. Andyleo77

    Hi Patters,

    Thanks for this great forum once again. I have been actively following this thread to see if someone was able to run Serviio on a PowerPC based Synology Ds410. I have read up every word of this thread and looks like there are two hopes to realize this dream:

    1. Glibc 2.4 on the Synology DSM. I am not sure if this was achieved via 3.1. I have upgraded to 3.1, how do I check if glibc has been updated. If not, isnt there a way to update glibc without waiting for Synology?

    2. Gregorio has mentioned in Feb: “Watch jamvm climbing up to java 1.6 in the coming months (yes, months, sadly)”. Does anyone know if this has happened?

    Thanks in advance for all the help.

    Regards,
    Andy

    Reply
    1. gregorio

      @Andyleo77,
      I have been watching jamvm closely and they are inching closer to a release but I haven’t seen a definite release date.
      Off-topic; I have been looking at minidlna too because for this one you don’t need to install java. It has some nice features but…to have it work with a samsung tv it needs patches which are scarce and scattered over many sites (lost my way just finding them). I think I’ll just have to be patient.

      PS: We can savely assume that synology will probably never update to gilbc 2.4 since it will break compatibility with their software (and thus with the next update).

      Reply
  40. Gianni

    Hi Patters, first of all thanks for this great guide, I had no problem installing serviio on my Ds209 and it works pretty well with my Sony Bluray.

    The only problem I have is that my CPU is now running constantly at around 90 to 95%. If I check the resource monitor it tells me that Java is the process that takes up the bulk of CPU use.

    Can’t seem to find any reference to this problem in my quick search in the forums. I’m running the latest DSM (3.1.1613). The problem don’t seem to improve if I stop Serviio, but it also does not seem to affect performance that much.

    Any idea?

    Reply
    1. Gianni

      Well it’s 3 weeks now and the CPU is still at almost 100%. I really don’t understand what the JAva process is doing

      Reply
  41. Chris

    It always takes a while until the media library is done. Depends on the amount of files. I think it should be fine after 3 or 4 days…

    Reply
    1. Gianni

      Well it’s 3 weeks now and the CPU is still at almost 100%. I really don’t understand what the JAva process is doing

      Reply
  42. Christian

    Hi Patters,

    Thanks a lot for the guide, it works fine and I have succesfully installed Serviio on my DS110J.

    At first glance it works fine and were streaming movies to my Bravia. After a while (a couple of hours) the DS110J got very slow and I get the red cross every time i try to start Serviio manager on the web ui.

    I hope someboby are able to help me.

    Reply
  43. Eric

    Hi Patters,
    thanks a lot for this great tutorial. It works great on my DS 110j / Sony BDP S370 setup.

    Reply
  44. Adam

    Hi Patters,

    Thanks for the guide. It’s really great, I got it up and running without too many problems. I haven’t read all the comments so I’m sorry if this is already covered. Just thought I’d mention that after compiling and installing ffmpeg, running the ffmpeg command still showed the old version. I saw your answer to another post about not having the right changes made to the shell profile. I’d done that, but it finally occurred to me that I needed to reload the profile. A quick logout and back in did the trick.

    Thanks again.
    Great work.

    Reply
  45. bellyflop

    Thank you, Patters, for this very thorough guide. I’m getting a red X frequently after installing serviio on my DS211J. It does work sometimes, but the console is slow to connect, similar to Chris’s experience (posted May 6th). I also notice that connecting to the NAS login page is noticeably slower too now. Normal browsing to other sites is still quick.

    I entered the NAS IP in the serviio/config file, as instructed. I just change the IP to match, correct? I still leave the rest of the url (/serviio/index.php), right?

    I tried manually restarting serviio, but the console is still slow or doesn’t show up. I see the serviio icon on my PS3 and I can bring up photos, but the video folders are still empty so I can’t test the performance. Tried refreshing folders already, but no success. Any advice is greatly appreciated. Hopefully, I don’t have to start all over. Does the guest account have to be enabled? Does that do anything for serviio? Thank you!

    Reply
    1. patters Post author

      Have a look at the CPU use in DSM. It could be that you forgot to disable video thumbnailing and maybe FFmpeg is working the CPU hard.

      Reply
  46. justme

    UHHGG! almost got it! then I get this error.

    /volume1/@tmp/S99serviio.sh: line 3: syntax error: unexpected “)”

    I see from ps that the serviio Java process is not running and when I go to the serviio UI I still get the big red x

    Reply
    1. patters Post author

      I thing you haven’t copied a plain text version of the S99serviio.sh script. Maybe your browser has done something strange when you tried to copy it. Try typing it by hand and see if that fixes it.

      Reply
  47. Andres

    Problem with /etc/profile
    The guide is quite good, the server is running. But when I coonect to the NAS (SSH) I get the following message:
    “-ash: /etc/profile:: not found”.
    I think I made an error in the profile file, leaving and unwanted “:”, but cannot see where. Can someone help me ? Thank you. This is my profle file:

    #/etc/profile: system-wide .profile file for ash.
    PATH=”$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/syno/bin:/usr/syno/sbin:/usr/local/bin:/usr/local/sbin”
    umask 022
    #This fixes the backspace when telnetting in.
    #if [ “$TERM” != “linux” ]; then
    # stty erase
    #fi
    PGDATA=/var/service/pgsql
    export PATH PGDATA
    HOME=/root
    export HOME
    TERM=${TERM:-cons25}
    export TERM
    PAGER=more
    export PAGER
    PS1=”`hostname`> ”
    alias dir=”ls -al”
    alias ll=”ls -la”
    ulimit -c unlimited
    PATH=/opt/java/ejre1.6.0_25/bin:/opt/bin:/opt/sbin:$PATH
    JAVA_HOME=/opt/java/ejre1.6.0_25
    export JAVA_HOME

    Reply
    1. patters Post author

      Not sure about this. Could the permissions be set wrong on that file perhaps? I can’t imagine that extra colon is the issue – surely all Linux OSes will be hard set to look for /etc/profile

      Reply
  48. ipsen

    Hey,

    I’m not new to linux, but I have no SQL experience. I’ve installed serviio as instructed (DS210j, DSM3.1). And it starts then quickly exits. I’ve pasted in my serviio.log so you can see what it’s saying and why I think it’s an SQL issue.

    Caused by: java.sql.SQLException: Failed to create database ‘db’, see the next exception for details.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s