Serviio 1.5.2 package for Synology NAS

UPDATE 12/11/2015 – I have extended Serviio to be the first cross-platform media server to support hardware transcoding! This is the culmination of work I started in June 2014.

Serviio 1.5 in DSM Package Center

Running the Serviio DLNA server on a NAS is a very efficient solution. It allows all your media to be constantly available to all your devices, all without the need for a dedicated media PC. Most TV and Bluray players are already capable media renderers – so indexing the library, adding metadata, and streaming the content is where Serviio steps in. Device support is continually improved by a community of contributors, and this crowd-sourced aspect was what initially drew me to the project, leading me to create the Sony Bluray device profile back in 2010. Serviio can also connect to online sources of content such as catch-up TV portals and allow fuss free content playback without advertising, even on devices which lack native support. These online plugins are also community maintained.

This new version of the Synology package updates Serviio to version 1.5.2 (release notes). It adds compatibility with the many new Synology models released since the last release. This release now supports hardware transcoding on the DS214play and DS415play with Intel Evansport media processor. Serviio’s Media Browser has been improved in 1.5.2 (Pro version feature), and is designed to allow direct playback of media on tablet devices without the need for dedicated apps. Please note that Apple iOS devices require video in H.264 and audio in stereo AAC format when streaming. Apart from the Play models already mentioned, most Synology NAS models lack the CPU power to transcode video into H.264 in realtime. Even if the source video is already H.264, ARMv5 family CPUs (which lack an FPU) in the older models lack the power even to transcode AAC audio in realtime without libfdk_aac. Unfortunately I am unable to distribute an FFmpeg binary compiled against this library under the terms of its software license.

Ever since Serviio 1.2 renderers that do not natively support subtitles via DLNA can have them burned into the video during transcoding, but as already explained above generally a NAS lacks the CPU power to do this (more info on subs here). If you absolutely need hard subs for a particular film, you could start playback on your device then stop it and Serviio will continue transcoding. Then you will be able to try again in a few hours since it will play from the transcode cache folder.

I was able to compile FFmpeg for all seven supported architectures (ARMv5, ARMv7, ARM hard float with neon, Intel i686, Intel x64, Intel Evansport media processor, and PowerPC e500v2) with the additional libraries Serviio requires while using the libs included within DSM as far as possible. I have published my compilation methods to make the process easier for others going forward since parts of it were exceptionally difficult to figure out. Only the Intel CPU or higher end Annapurna Alpine ARM CPUs are likely to be of any practical use transcoding to H.264, since the other CPU types lack vector units (no AltiVec in QorIQ/PowerQUICC, and no NEON in Armada 370/XP). This build’s libx264 is compiled with NEON support for the DS414j and this should also work for DS215+, DS715, and DS1515 systems (untested). Somewhat curiously the spec sheet of the Armada 375 used in the DS215j states that it has NEON, but Synology built its DSM Linux using the regular Armada 370/XP toolchain so NEON cannot be used.

Rather than using a third party Web UI to manage Serviio (which can introduce issues), I recommend instead that you manage Serviio using Serviio Console installed on another computer.


Synology Package Installation

  • In Synology DSM’s Package Center, click Settings and add my package repository:
    Add Package Repository
  • The repository will push its certificate automatically to the NAS, which is used to validate package integrity. Set the Trust Level to Synology Inc. and trusted publishers:
    Trust Level
  • Serviio now requires Java 8, so you will need to install my Java SE Embedded package first if you have not already done so. Read the instructions on that page carefully too.
  • Now browse the Community section in Package Center to install Serviio. The repository only displays packages which are compatible with your specific model of NAS. If you don’t see CrashPlan in the list, then either your NAS model or your DSM version are not supported at this time. DSM 5.0 is the minimum supported version for this package.
  • Download any Serviio online content plugins that you require and leave the .groovy files in the following location inside the NAS’s public shared folder (wherever that is located – usually on volume1): e.g. /volume1/public/serviio/plugins/.
  • If you need subtitle support for glyphs not present in the included DejaVu fonts, add additional fonts to the following folder inside your NAS’s public shared folder (wherever that is located – usually on volume1): e.g. /volume1/public/serviio/fonts/.
  • Serviio is installed as a headless server. It is configured by a desktop client, but operates independently of it.

    Serviio Client Installation

    • Once Serviio is running on the NAS, you can manage it by installing Serviio Console on another computer, and by configuring it to connect to the NAS instance of Serviio.
    • Make sure that you install the version of Serviio Console which matches the version running on the NAS. If the NAS version is upgraded later, you will need to update your client computer too.
    • Download and install Serviio on your computer selecting only the Console when prompted (Mac OS X users need to click Customize in the installer to do this). By default the Serviio Console is configured to connect to the Serviio service running on the local computer. Configure it to connect to your NAS:
      For Mac OS open a Terminal window and type
      sudo nano /Applications/
      scroll to near the end of the file, inside the array under key JVMOptions add a new string line as follows:
      ..replacing that IP with the IP of your NAS. Then Ctrl-X to save, then launch Serviio-Console again.
      On Windows, use Notepad to open ServiioConsole.exe.vmoptions (in the Serviio/bin folder) and add the line:
      ..replacing that IP with the IP of your NAS.
    • Since this console binding uses a static address you should reserve this particular IP address for your NAS (most home broadband routers will let you do this in the DHCP options), or use a static IP address. This will also prevent Serviio appearing multiple times in the menus of your renderer devices as its IP changes.
    • When quiting Serviio Console in Windows, remember to use Exit Serviio Console because Exit Serviio will stop the Serviio instance on the NAS too.
    • You should disable the Serviio service on your computer if you intend only to use the client. This will not have been installed if you selected Serviio Console only, but if you did install both components you can disable the service as follows:
      On Windows open the Services section in Computer Management and stop the Serviio Service. In the service Properties set the Startup Type to Manual. You can also disable the Serviio Console opening in the System Tray each startup by removing it from Task Manager > More Details > Start-up Tab (Windows 8) or the All Users Startup Start Menu folder (Windows 7).
      To accomplish the same on Mac OS X, run the following commands one by one:

      sudo launchctl unload /Library/LaunchDaemons/org.serviio.server.plist
      sudo mv /Library/LaunchDaemons/org.serviio.server.plist /Library/LaunchDaemons/org.serviio.server.plist.bak


      • In the console disable ‘Generate thumbnails for local videos’ in the Metadata tab. Failure to do this can make adding videos to your library very slow on older NAS systems. With this disabled Serviio will still fetch thumbnail images automatically from the online databases.
      • Don’t alter the transcoded files location on the Transcoding tab, it’s already set to a sensible location. This particular folder is deleted each time your NAS restarts, and Serviio cleans up its temp files automatically in any case.
      • When adding folders to the media library use the Add Path button (not Add Local). You will need to specify the folder path in the NAS’s Linux notation, for example /volume1/public/videos
      • If you’re upgrading from a previous Serviio version you should check for updates of your online content plugins.
      • The URL of the MediaBrowser is displayed in Package Center (http://IPofYourNAS:23424/mediabrowser). If you want to use the MediaBrowser from a remote location you would need to either port forward 23424 on your router, or use SSH tunnelling. You can also manage Serviio remotely by SSH tunnelling port 23423 which the console uses.
      • Advanced users who wish to edit device profiles or enable debug logging can find the Serviio files in /var/packages/Serviio/target. You will need to use an SSH session to access this folder – it cannot be navigated to using DSM’s File Station. You will need to restart the Serviio package for profile changes to take effect.
      • Bear in mind that a NAS, even an Intel Atom powered one, is unlikely to have sufficient CPU power to manage realtime video transcoding (e.g. from DivX to MPEG2). However even an ARMv5 system can easily remux MKV to M2TS in realtime including realtime audio transcoding. If you have a DLNA renderer with good format support then this isn’t an issue.
      • Some users may wish to restrict running Serviio to specific times of day in order to free up RAM for a scheduled backup window for instance. This can be achieved by creating tasks to start and stop Serviio using the Task Scheduler in DSM Control Panel:
        Schedule service start
      • The package uses an FFmpeg wrapper script to modify the usual transcoding behaviour of Serviio in some cases. The first is to use the integer maths libshine MP3 encoder which allows you to listen to FLAC music transcoded to MP3 in realtime on ARMv5 systems. The second is to use the Intel Evansport hardware decoding and encoding available in the DS214play and DS415play models. I have left the FFmpeg wrapper scripts in the package even when not in use (in the Serviio/bin folder), because they are still useful for people trying to test a particular workaround or encoder setting. The wrapper was a tricky script to get working due to variable expansion precedence issues and quote handling. If you need it, just change the ffmpeg.location system property in /var/packages/Serviio/target/bin/ to point to your modified wrapper script.
      • If additional fonts are not working as expected, some troubleshooting is available. You can re-create the fontconfig cache by connecting to the NAS via an SSH session as root, and running:
        rm -rf ~/.fontconfig.cache
        FC_DEBUG=128 /var/packages/Serviio/target/bin/fc-cache --verbose

      Hardware transcoding support on DS214play and DS415play

      • FFmpeg will use hardware decoding where possible.
      • Although multiple hardware assisted decodes can take place simultaneously, only a single hardware encode is available. The package intelligently avoids race conditions for this.
      • Any FFmpeg commandline to encode using libx264 will automatically be sent to the hardware encoder when available.
      • profiles.xml has been modified so that the preferred transcode format for most devices for non-natively supported videos is H.264.
      • In order to add hardware H.264 encoding to a device profile, specify h264 as the desired codec and the FFmpeg wrapper script will make the necessary substitution automatically.
      • When the hardware encoder is used, the low quality settings in Serviio’s default libx264 options to favour encoding speed are ignored. The hardware encoder performance is not altered by quality settings.
      • If a media stream is being both hardware decoded and hardware encoded, it will use pipelined mode. Based on responses from Synology support during development this means that both jobs occur on the media processor without exposing the intermediate bitstream to FFmpeg. Consequently it is not possible to burn subtitles in pipelined mode. As a result my FFmpeg wrapper script will run the decode part of the job in software in order to do this. The unfortunate result is that the encoder cannot quite achieve real time transcoding during subtitle compositing. For full 1080p HD material it achieves around 20fps, whereas most movies are 24fps. This means that in order to watch a film with hard subs you would need to start it off, pause or stop the renderer and return a bit later to view. An alternative would be to mux the content into an MKV container with the desired subtitles before adding it to the Serviio library, assuming that your device supports SRTs in MKV.
      • The hardware encoded H.264 streams are not 100% compliant with the specification and fail validation using the tool DGAVCDec. For most tested renderers this does not affect playback (Bravia, Sony Bluray, iOS). However FlowPlayer (the Flash player in MediaBrowser) does not play these files satisfactorily and drops many frames resulting in jerky playback. Since the Evansport CPU is capable of encoding regular Flash Video when the decode of the source file is hardware accelerated, MediaBrowser does not use hardware encoding for FlowPlayer. iOS and Android devices browsing content via MediaBrowser do benefit from hardware transcoding.

      Package scripts

      For information, here are the package scripts so you can see what it’s going to do. You can get more information about how packages work by reading the Synology Package wiki.

      #--------SERVIIO installer script
      #--------package maintained at
      SYNO_CPU_ARCH="`uname -m`"
      [ "${SYNO_CPU_ARCH}" == "x86_64" ] && SYNO_CPU_ARCH="i686"
      [ "${SYNO_CPU_ARCH}" == "i686" ] && [ -e /lib64/ ] && SYNO_CPU_ARCH="x64"
      [ "${SYNOPKG_DSM_ARCH}" == "comcerto2k" ] && SYNO_CPU_ARCH="armhfneon"
      [ "${SYNOPKG_DSM_ARCH}" == "alpine" ] && SYNO_CPU_ARCH="armhfneon"
      [ "${SYNOPKG_DSM_ARCH}" == "alpine4k" ] && SYNO_CPU_ARCH="armhfneon"
      [ "${WIZARD_ENC_HW}" == "true" ] && SYNO_CPU_ARCH="i686evansport"
      NATIVE_BINS_FILE="`echo ${NATIVE_BINS_URL} | sed -r "s%^.*/(.*)%\1%"`"
      FONTS_FILE="`echo ${FONTS_URL} | sed -r "s%^.*/(.*)%\1%"`"
      #'ua' prefix means wget user-agent will be customized
      COMMENT="# Synology Serviio Package"
      TEMP_FOLDER="`find / -maxdepth 2 -path '/volume?/@tmp' | head -n 1`"
      PUBLIC_FOLDER="`synoshare --get public | sed -r "/Path/!d;s/^.*\[(.*)\].*$/\1/"`"
      source /etc/profile
      preinst ()
        if [ -z ${JAVA_HOME} ]; then
          echo "Java is not installed or not properly configured. JAVA_HOME is not defined. "
          echo "Download and install the Java Synology package from"
          exit 1
        if [ ! -f ${JAVA_HOME}/bin/java ]; then
          echo "Java is not installed or not properly configured. The Java binary could not be located. "
          echo "Download and install the Java Synology package from"
          exit 1
        JAVA_VER=`java -version 2>&1 | sed -r "/^.* version/!d;s/^.* version \"[0-9]\.([0-9]).*$/\1/"`
        if [ ${JAVA_VER} -lt 8 ]; then
          echo "This version of Serviio requires Java 8 or newer. Please update your Java package. "
          exit 1
        if [ -z ${PUBLIC_FOLDER} ]; then
          echo "A shared folder called 'public' could not be found - note this name is case-sensitive. "
          echo "Please create this using the Shared Folder DSM Control Panel and try again."
          exit 1
        cd ${TEMP_FOLDER}
        for WGET_URL in ${INSTALL_FILES}
          WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`"
          #this will allow to track the number of downloads from Synology users
          WGET_URL=`echo ${WGET_URL} | sed -e "s/^ua/--user-agent=Synology --referer=http:\/\/\/2012\/01\/25\/serviio-syno-package /"`
          wget ${WGET_URL}
          if [ $? != 0 ]; then
            if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${WGET_FILENAME} ]; then
              echo "There was a problem downloading ${WGET_FILENAME} from the official download link, "
              echo "which was \"${WGET_URL}\" "
              echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. "
              exit 1
        exit 0
      postinst ()
        #extract the downloaded Serviio archive
        cd ${TEMP_FOLDER}
        tar xzf ${TEMP_FOLDER}/${DOWNLOAD_FILE}
        if [ ! -z "${EXTRACTED_FOLDER}" ]; then
          rm -r ${TEMP_FOLDER}/${EXTRACTED_FOLDER}
        if [ ! -d "${PLUGINS_PATH}/plugins" ]; then
          mkdir -p ${PLUGINS_PATH}/plugins
        if [ ! -d "${PLUGINS_PATH}/fonts" ]; then
          mkdir -p ${PLUGINS_PATH}/fonts
        #extract CPU-specific additional binaries
        cd ${SYNOPKG_PKGDEST}/lib
        mv ${SYNOPKG_PKGDEST}/lib/ffmpeg ${SYNOPKG_PKGDEST}/bin
        mv ${SYNOPKG_PKGDEST}/lib/fc-cache ${SYNOPKG_PKGDEST}/bin
        #remove legacy package font versions
        [ -d ${PLUGINS_PATH}/fonts/dejavu-fonts-ttf-2.33/ ] && rm -rf ${PLUGINS_PATH}/fonts/dejavu-fonts-ttf-2.33/
        [ -d ${PLUGINS_PATH}/fonts/dejavu-fonts-ttf-2.34/ ] && rm -rf ${PLUGINS_PATH}/fonts/dejavu-fonts-ttf-2.34/
        #extract open source font package for subtitle support during transcoding
        cd ${PLUGINS_PATH}/fonts
        tar xvjf ${TEMP_FOLDER}/${FONTS_FILE} && rm ${TEMP_FOLDER}/${FONTS_FILE}
        sed -i "s|WINDOWSFONTDIR|${PLUGINS_PATH}/fonts|" ${SYNOPKG_PKGDEST}/config/fonts/fonts.conf
        sed -i "s|WINDOWSTEMPDIR_FONTCONFIG_CACHE|~/.fontconfig.cache|" ${SYNOPKG_PKGDEST}/config/fonts/fonts.conf
        #wrapper script can be useful for testing different encoder options
        if [ -e "${SYNOPKG_PKGDEST}/bin/ffmpeg-wrapper-${SYNO_CPU_ARCH}.sh" ]; then
          #we need to use the wrapper to make FFmpeg use libshine on ARM systems and to use hardware decode/encode on Intel Evansport systems
        #modifications to device profiles (evansport hardware transcoding)
        if [ -e "${SYNOPKG_PKGDEST}/config/profiles-${SYNO_CPU_ARCH}.xml" ]; then
          mv "${SYNOPKG_PKGDEST}/config/profiles.xml" "${SYNOPKG_PKGDEST}/config/profiles-orig.xml"
          mv "${SYNOPKG_PKGDEST}/config/profiles-${SYNO_CPU_ARCH}.xml" "${SYNOPKG_PKGDEST}/config/profiles.xml"
        #modification to application profiles to natively play AAC audio in Media Browser, minimizing transcoding
        #removed owing to issues with 48000 sample rate not valid in flv
        #mv ${SYNOPKG_PKGDEST}/config/application-profiles.xml ${SYNOPKG_PKGDEST}/config/application-profiles-orig.xml
        #mv ${SYNOPKG_PKGDEST}/config/application-profiles-syno.xml ${SYNOPKG_PKGDEST}/config/application-profiles.xml
        #modifications to application profiles (evansport hardware transcoding)
        #removed owing to frame drops in FlowPlayer because encoder does not produce 100% valid streams, evansport has sufficient power for flv encoding
        #if [ -e "${SYNOPKG_PKGDEST}/config/application-profiles-${SYNO_CPU_ARCH}.xml" ]; then
        #  mv "${SYNOPKG_PKGDEST}/config/application-profiles-${SYNO_CPU_ARCH}.xml" "${SYNOPKG_PKGDEST}/config/application-profiles.xml"
        #make changes to Serviio launcher script so that pid file is created for Java process
        sed -r -i "s%Execute the JVM in the foreground%Execute the JVM in the background%" ${SYNOPKG_PKGDEST}/bin/
        sed -r -i "s%^(exec \"$JAVA.*)$%\1 \&%" ${SYNOPKG_PKGDEST}/bin/
        echo "echo \$! > ${PID_FILE}" >> ${SYNOPKG_PKGDEST}/bin/
        #set some additional Serviio system properties (temp folder, FFmpeg path, plugins folder)
        EXTRA_OPTS="-Dserviio\.defaultTranscodeFolder=${TEMP_FOLDER} -Dffmpeg\.location=${FFMPEG_PATH} -Dplugins\.location=${PLUGINS_PATH}"
        #fix Java prefs checking which was preventing NAS hibernation
        EXTRA_OPTS="${EXTRA_OPTS} -Djava.util.prefs.syncInterval=86400"
        if [ "${SYNO_CPU_ARCH}" == "armv5tel" ]; then
          #use integer math (not floating point) Dolby AC-3 encoder for better performance on ARM CPUs
          EXTRA_OPTS="${EXTRA_OPTS} -Dserviio\.fixedPointEncoders"
        sed -r -i "s% -Dffmpeg\.location=ffmpeg%%; s%^(JAVA_OPTS=.*)\"$%\1 ${EXTRA_OPTS}\"%" ${SYNOPKG_PKGDEST}/bin/
        #create log file to allow package start errors to be captured
        [ -e ${SYNOPKG_PKGDEST}/log ] || mkdir ${SYNOPKG_PKGDEST}/log
        [ -e ${SYNOPKG_PKGDEST}/log/serviio.log ] || touch ${SYNOPKG_PKGDEST}/log/serviio.log
        #add firewall config
        /usr/syno/bin/servicetool --install-configure-file --package /var/packages/${SYNOPKG_PKGNAME}/scripts/${SYNOPKG_PKGNAME}.sc > /dev/null
        exit 0
      preuninst ()
        exit 0
      postuninst ()
        #remove fontconfig configuration
        sed -i "/${COMMENT}/d" /root/.profile
        #remove firewall config
        if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then
          /usr/syno/bin/servicetool --remove-configure-file --package ${SYNOPKG_PKGNAME}.sc > /dev/null
        #remove legacy daemon user and homedir
        [ -e /var/services/homes/serviio ] && synouser --del serviio
        [ -e /var/services/homes/serviio ] && rm -r /var/services/homes/serviio
        exit 0
      preupgrade ()
        #if a media database exists we need to preserve it
        if [ -d ${SYNOPKG_PKGDEST}/library/db ]; then
          mkdir ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_db_migration
          mv ${SYNOPKG_PKGDEST}/library/db ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_db_migration
        exit 0
      postupgrade ()
        #use the backed up media database from the previous version
        if [ -d ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_db_migration/db ]; then
          mv ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_db_migration/db ${SYNOPKG_PKGDEST}/library
          rmdir ${SYNOPKG_PKGDEST}/../${SYNOPKG_PKGNAME}_db_migration
        chown -R root:root ${SYNOPKG_PKGDEST}
        exit 0

      #--------SERVIIO start-stop-status script
      #--------package maintained at
      COMMENT="# Synology Serviio Package"
      TIMESTAMP="`date "+%F %X,000"`"
      source /etc/profile
      source /root/.profile
      EnvCheck ()
      #updates to DSM will reset these changes so check them each startup
        #/root/.profile should contain 2 lines added by this package tagged with trailing comments
        COUNT=`grep -c "$COMMENT$" /root/.profile`
        if [ $COUNT != 2 ]; then
          #remove any existing mods
          sed -i "/${COMMENT}/d" /root/.profile
          #add required environment variables
          echo "export FONTCONFIG_FILE=fonts.conf ${COMMENT}" >> /root/.profile
          echo "export FONTCONFIG_PATH=${PKG_FOLDER}/target/config/fonts ${COMMENT}" >> /root/.profile
      start_daemon ()
        source /root/.profile
        #set appropriate Java max heap size
        RAM=$((`free | grep Mem: | sed -e "s/^ *Mem: *\([0-9]*\).*$/\1/"`/1024))
        if [ $RAM -le 128 ]; then
        elif [ $RAM -le 256 ]; then
        elif [ $RAM -le 512 ]; then
        #Serviio's default max heap is 512MB
        elif [ $RAM -gt 512 ]; then
        sed -i -r "s/(^..JAVA.) -Xmx[0-9]+[mM] (.*$)/\1 -Xmx${JAVA_MAX_HEAP}m \2/" "${ENGINE_CFG}"
        echo "${TIMESTAMP} Starting ${DNAME}" >> ${DLOG}
        ${ENGINE_SCRIPT} > /dev/null 2>> ${DLOG}
        if [ -z ${SYNOPKG_PKGDEST} ]; then
          #script was manually invoked, need this to show status change in Package Center
          [ -e ${PKG_FOLDER}/enabled ] || touch ${PKG_FOLDER}/enabled
      stop_daemon ()
        echo "${TIMESTAMP} Stopping ${DNAME}" >> ${DLOG}
        kill `cat ${PID_FILE}`
        wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
        rm -f ${PID_FILE}
        if [ -z ${SYNOPKG_PKGDEST} ]; then
          #script was manually invoked, need this to show status change in Package Center
          [ -e ${PKG_FOLDER}/enabled ] && rm ${PKG_FOLDER}/enabled
      daemon_status ()
        if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
        rm -f ${PID_FILE}
        return 1
      wait_for_status ()
        while [ ${counter} -gt 0 ]; do
          [ $? -eq $1 ] && return
          let counter=counter-1
          sleep 1
        return 1
      case $1 in
          if daemon_status; then
            echo ${DNAME} is already running with PID `cat ${PID_FILE}`
            exit 0
            echo Starting ${DNAME} ...
            exit $?
          if daemon_status; then
            echo Stopping ${DNAME} ...
            exit $?
            echo ${DNAME} is not running
            exit 0
          exit $?
          if daemon_status; then
            echo ${DNAME} is running with PID `cat ${PID_FILE}`
            exit 0
            echo ${DNAME} is not running
            exit 1
          echo "${DLOG}"
          exit 0
          echo "Usage: $0 {start|stop|status|restart}" >&2
          exit 1

      #FFmpeg wrapper script to use libshine fixed point maths MP3 encoder on ARM CPUs
      #as originally posted here:
      for PARAM in "$@"; do
        if [ ${INPUT} = 1 ]; then
          #the FFmpeg input filename/URL needs quotes adding back on
          #because it may contain spaces, and the shell has removed them
          PARAMS="${PARAMS} \"${PARAM}\""    
          PARAMS="${PARAMS} ${PARAM}"
        if [ "${PARAM}" == "-i" ]; then
          #this loop is the -i parameter, the next loop will be the input filename/URL
      #make libshine encoder substitution, 320Kbps since it's no more expensive
      if [ "${PARAMS}" != "${PARAMS/libmp3lame/}" ] || [ "${PARAMS}" != "${PARAMS/-f mp3/}" ]; then
        PARAMS="`echo ${PARAMS} | sed -r "s|libmp3lame|libshine|;s|-b:a [0-9]+k|-b:a 320k|"`"
      #make libfdk_aac encoder substitution, 128Kbps since we're usually transcoding to AAC stereo only
      #if [ "${PARAMS}" != "${PARAMS/-c:a aac/}" ]; then
      #  PARAMS="`echo ${PARAMS} | sed -r "s| aac -strict experimental | libfdk_aac |;s|-b:a [0-9]+k|-b:a 128k|"`"
      #invoke FFmpeg
      FOLDER="`dirname $0`"
      echo "${FOLDER}/${FFMPEG_BIN} ${PARAMS}" > ${FOLDER}/../log/ffmpeg-wrapper.log
      #need to use eval here otherwise the quotes aren't handled properly
      eval ${FOLDER}/${FFMPEG_BIN} ${PARAMS}
      #return FFmpeg status
      exit $?

      #FFmpeg wrapper script to enable hardware decoding and encoding on Intel Evansport CPUs
      #wrapper originally posted here:
      for PARAM in "$@"; do
        if [ ${INPUT} = 1 ]; then
          #the FFmpeg input filename/URL needs quotes adding back on
          #because it may contain spaces, and the shell has removed them
          PARAMS="${PARAMS} \"${PARAM}\""    
        elif [ "${PARAM}" == "-i" ]; then
          #enable hardware decoding by default, but not when Serviio is either:
          # gathering media metadata,
          # remuxing video,
          # generating thumbnails,
          # or rendering subtitles into the video stream (pipeline mode not supported for subs)
          if [ $# -lt 3 ] || \
             [ "${COMMANDLINE}" != "${COMMANDLINE/ -c:v copy /}" ] || \
             [ "${COMMANDLINE}" != "${COMMANDLINE/ pipe:/}" ] || \
             [ "${COMMANDLINE}" != "${COMMANDLINE/ -vf subtitles=/}" ]; then
            PARAMS="${PARAMS} -i"
            PARAMS="${PARAMS} -prefer_smd -i"
          PARAMS="${PARAMS} ${PARAM}"
      #Is this FFmpeg commandline a candidate for the hardware encoder?
      if [ "${PARAMS}" != "${PARAMS/libx264/}" ]; then
        #check whether H.264 encoder is already busy with another Serviio/VideoStation session
        PID_HWENC=`cat /tmp/VideoStation/enabled 2> /dev/null | sed -r "s/.*\"PID\":([0-9]+),\"hardware_transcode.*$/\1/;s/\[//;s/\]//"`
        #is there an indicated PID?
        if [ -n "${PID_HWENC}" ]; then
          #there is an indicated PID - is it running?
          if ! kill -0 ${PID_HWENC}; then
            #the indicated PID is not in fact running, HW encoder is therefore available
            rm /tmp/VideoStation/enabled
            #make hardware H.264 encoder substitution to replace libx264
          #there is no indicated PID, HW encoder is therefore available
      if [ ${HWENC} = 1 ]; then
          #make hardware H.264 encoder substitution to replace libx264
          PARAMS="`echo ${PARAMS} | sed -r "s/libx264/h264_smd/"`"
          #by default Serviio's libx264 transcoding is intended for speed over quality, with SMD we can opt for better quality
          PARAMS="`echo ${PARAMS} | sed -r "s/-preset veryfast//; s/-crf [0-9]+ //; s/-r 25 //; s/-g [0-9]+ //`"
          PARAMS="`echo ${PARAMS} | sed -r "s/-profile:v baseline/-profile:v high/; s/-level 3/-level 4.1/`"
      #invoke FFmpeg
      FOLDER="`dirname $0`"
      #log commandline, except media probes
      #[ $# -gt 2 ] && echo "${FOLDER}/${FFMPEG_BIN} ${PARAMS}" >> ${FOLDER}/../log/ffmpeg-wrapper.log
      #need to use eval here otherwise the quotes aren't handled properly
      eval ${FOLDER}/${FFMPEG_BIN} ${PARAMS}
      #return FFmpeg status
      exit $?


      • 0027 12/Nov/15 – Substantial package re-write hence the long delay since the last release
        Completely refreshed documentation, please re-read
        Updated to Serviio version 1.5.2
        Java 8 is now required – this is a Serviio imposed requirement
        DSM 5.0 or newer is now required
        Updated to FFmpeg 2.7.1 and many libs e.g. x264 at latest versions from late July 2015
        Added optional hardware transcoding support for Intel Evansport systems (DS214play, DS415play) built using Synology-modified sources for FFmpeg 2.0.2
        FFmpeg is now compiled with https support via GNUTLS library (useful for online streams via plugins)
        Switched to using root account which was necessary for Evansport hardware encoding – no more adding account permissions, package upgrades will no longer break this
        Added support for Mindspeed Comcerto 2000 CPU (comcerto2k – ARM Cortex-A9 with NEON) in DS414j
        Added support for Intel Atom C2538 (avoton) CPU in DS415+
        Fontconfig fc-cache utility now included to allow troubleshooting issues with adding new fonts for additional subtitle language support
        Fontconfig variables checked on each package startup so DSM upgrades no longer break hard subs support
        Updated DejaVu subtitle font to version 2.35
        DSM Firewall application definitions added
        Tested with DSM Task Scheduler to allow package to start/stop at certain times of day, saving RAM when not needed
        Daemon init script now uses a proper PID file instead of the unreliable method of using grep on the output of ps
        Daemon init script can be run from the command line
        Improved accuracy of temp folder and plugins folder detection
        Switched to .tar.xz compression for native binaries to reduce web hosting storage footprint
        Package is now signed with repository private key
        User Agent customization while downloading Serviio binaries from to allow download stats gathering
      • 0026 25/Mar/14 – Updated to Serviio
      • 0025 18/Mar/14 – Updated to Serviio
      • 0024 30/Jan/14 – Updated to Serviio 1.4
      • 0023 07/Nov/13 – Updated to FFmpeg 2.1 stable release
      • 0022 30/Oct/13 – Added support for Intel Atom Evansport and Armada XP CPUs in new DSx14 products
      • 0021 18/Oct/13 – Fixed zlib linking issue in QorIQ and Intel builds of FFmpeg
      • 0020 05/Sep/13 – Updated to Serviio 1.3.1
      • 0019 25/May/13 – Added support for Armada370 SoC used in DS213j (ARMv7 CPU with FPU)
      • 0018 29/Mar/13 – Updated to Serviio 1.2.1, recompiled FFmpeg to use the libRTMP source code from for consistency
      • 0017 01/Mar/13 – Updated to Serviio 1.2
      • 0016 23/Jan/13 – Fixes for DSM 4.2
      • 015 30/Dec/13 – Updated to Serviio 1.1, fixed garbled ac3 encoding issue on ARM CPUs by compiling FFmpeg natively, rather than cross compiling. Remember to update your computer’s Serviio Console to 1.1 before connecting to manage.
      • 014 28/Oct/12 – Added support for Freescale QorIQ PowerPC CPUs used in some Synology x13 series products, switched to shared library compile of FFmpeg with some minor changes, ARM build now uses libshine encoder which allows realtime audio transcoding to MP3, edited FlowPlayer config to play AAC audio natively to make Media Browser more usable with online feed items.
      • 013 Fixed a bug in the plugins folder creation, fixed deletion of home directories after user deletion (DSM 4.1)
      • 012 Reduced Java prefs checking interval to once every 24 hours to allow the NAS to hibernate (was 30 seconds by default – remember to increase the time between library refreshes if you want hibernation)
      • 011 Updated Serviio to 1.0.1, slightly altered how the plugins folder path is determined
      • 010 Updated to Serviio 1.0, removed WebUI, FFmpeg wrapper no longer needed on ARM, plugins folder moved to /volume1/public/serviio/plugins to make adding/updating plugins easier
      • 009 Installation fails unless User Home service is enabled, unified the installer scripts, merged ARM and Intel packages into one which downloads the FFmpeg binary separately, used integer maths Dolby AC-3 encoder on ARM systems (no floating point)
      • 008 Fixed DST timezone support, installer no longer assumes /volume1 is primary storage volume
      • 007 Updated Serviio to 0.6.2, kairoh’s WebUI to 0.6.2c, changed package to download Serviio from the official website during installation, temp path is set by default to /volume1/@tmp on first run, and finally some CSS improvements
      • 006 Updated to Serviio 0.6.1, switched to kairoh’s Java WebUI, added timezone support, removed DSM icon when Serviio is not running, adjusted Java max heap size for systems with low RAM, specified FFmpeg path directly rather than creating a symlink in /bin so as not to interfere with other packages which may use different versions of FFmpeg
      • 005 Added Web Station dependency, EULA dialog, and links for Web UI and user forum in More Info
      • 004 Test for package repo to allow update notification
      • v3 Hopefully fixed an issue with the Serviio DSM icon in DSM 3.2 on NAS units without Optware installed
      • v2 Inclusion of a modified version of the PHP Web UI
      • v1 New minor Serviio release with some updated international translations – will upgrade 0.6 preserving the media library
      • 0.6 v1 23/Sep/11 – First public release – Serviio 0.6
      • 0.6b4 v2 Fixed permissions on transcode temporary folder following upgrade, avoiding the need for a reboot
      • 0.6b4 v1 Updated to Serviio 0.6 beta 4, added upgrade scripts to allow media database migration (install future packages over the top of this one – database is preserved)
      • 0.6b3c v2 Fixed HOME env var for serviio user (to fix librtmp issues with BBC iPlayer) and removed the need to edit the passwd file to change the shell (safer)
      • 0.6b3c v1 Initial spk test release – Serviio 0.6 beta 3


1,145 thoughts on “Serviio 1.5.2 package for Synology NAS

  1. Chewie

    Gotcha. Will give that a try. Also solved the TV show issue! I tried a different XBMC media manager to re-scrape my TV Shows and that seemed to do the trick. They are now showing up in the Series folder. (I was using Vimediamanager on the Mac, and tried Media Central on Windows instead). Thanks again for your help, and for getting Serviio onto Synology, it’s light years ahead of the stock media manager.

  2. cyb


    i have a synology 412+ and i can`t install java 6 embedded.. The 412+ has a new cpu platform “Cedarview” and i think this is the problem.. The Cedarview has its own gcc compiler package..
    Can you update your Java Package or what can i do that i can install seviio ?

    1. patters Post author

      All Intel synos use either Pineview, Bromolow, or Cedarview CPUs, but please follow my instructions nonetheless. All three are Intel CPUs which will run both i686 or x86_64 code. Their only differences are in their support for CPU extensions like Hyperthreading, or AES in hardware, etc. – which make no difference to this software since it’s already compiled. The only stuff that’s used from that toolchain is the locale data files and two small binaries (locale and localedef) which just set up the locales for the system. Running the 32bit ones in this case is completely fine.

      The Java 6 package works on Cedarview.

      1. cyb


        The DSM Package Center says “This Package can not be installed”
        I have downloaded “ejre-1_6_0_30-fcs-b12-linux-i586-headless-10_nov_2011.tar.gz” and “gcc420_glibc236_pineview.tgz” to the public folder…

        Best regards

      2. patters Post author

        Very strange, but I have no way to test. That error message is not one I wrote into my scripts so it’s coming from Package Center. However, I have at least one confirmed Cedarview user using Java 6.
        See the conversation about Cedarview (search for the word) in the comments on the Java package page. You ought to post on that page, to keep things on topic:

      3. cyb


        hm, when i install java 6 it says “This Package can not be installed” but when i look in the Package Center, there is a Java 6 Package installed but not running !? But when i try to install seviio it can`t find the java package. I have no idea what I’m doing wrong..

        Best regards

      4. TheNymf


        for the record; i think this was due to a nonset JAVA_HOME variable which points to the installed Java location. This will indeed be autoset on next reboot.


  3. Max

    ds212J DSM4.0

    stuck with installing java 6 or 7
    downloaded toolchain 4.0
    installer asking me for 3.1

    should i download toolchain 3.1?

    1. patters Post author

      Yes. This is mentioned in the Instructions section of my blog post for the Java package (linked to from this Serviio guide).

  4. Ian

    Synology Media Server has failed with DSM 4.0, so I have now installed Serviio. This was painful as neither Java or Toolchain would install via Package Centre. Followed the instructions to download/install manually – then Serviio seemed to install ok.
    I can now see Serviio on my Samsung TV, but none of the folders have any content. This was the issue with the Synology Media Server!
    Serviio seems to ‘see’ my TV under Renderer Profile Status (green dot against IP address), but there is a question mark under Profile.
    If try to add a new device – and click Save – I get red error message “Cannot connect to Serviio server, it does not seem to be running. Exiting…
    Rest error to “status” : Internal Server Error (500)”
    Also – Java SE for Embedded 6 is “stopped” in Package Centre, with no option to “run”…?

    Any ideas what I need to do?


    1. patters Post author

      Java does not run as a service. It’s meant to be stopped (notice there’s no start option). This is mentioned on the Java package instructions page, and in the Info screen in Package Center. Regarding the install not being completely automatic – that’s by design, for legal reasons.

      As for Serviio, are you giving it a few minutes to start up and read the profiles, etc?

      If you can’t see either media server, then perhaps you have another problem (firewall perhaps?).

      1. Ian

        Hi Patters,

        Thanks for your reply & explaining. Info screen in Package Centre? Where’s this? Do you mean the Help pages (clicking on the “?”). I can’t see any mention of Java in there.

        One of the Serviio instructions says to download the Java Synology package from from this link which doesn’t work http://wp-me/pvshc-z5.

        To be honest – I’m so fed up of this product I may shelve it till another DSM comes out. I’ve spent all day messing about now.

        Thanks again.

  5. Mobes

    Hi Patters,

    Just wanted to say a big thankyou from down under. Your instructions (followed to the letter) are working beautifully with a DS1010+ serving to an Australian Sony EX700 running the latest 2012 firmware.

    One thing I’m curious about is what is the best format to store video files on the synology for serving using serviio and a Sony Bravia. I ask because I was going to use eyetv to record some programs from a tv tuner and then transcode and place onto the synology (and delete the original files).

    I note 720p mkvs are playing beautifully so wondered if that was good or perhaps the Apple TV2 preset from handbrake ?


    1. patters Post author

      Thanks for the feedback. I don’t think it would really matter which format really (MP4 or MKV), since as I remember the Bravia profile will remux H.264 in whichever container to MPEG-TS anyway, which is light work (remuxing is just repackaging the streams, not transcoding them). I guess picking AC-3 audio would reduce audio transcoding (instead of AAC), if you wanted to keep the syno’s activity to a minimum.

  6. Chris

    Any idea why the settings in the UI revert back when I click on Save (ex: nb of cores) ?
    By the way, I had to uninstall previous Java version removing the folder and print in the file Profile.

  7. Tony

    I’ve setup my Synology DS1812+ with 0.6.2 as directed and everything seems to work (I’m only wanting to use it for photos) with the exception of displaying the photo’s full screen if the originals are big (small res are fine). I’ve seen details about a switch to use to allow larger jpegs to be displayed (be reducing the size on the fly) but can’t work out where / how to set this. Please can you help?
    Btw, this is streaming via WDTV Live, and using the WDTV live profile.


    1. patters Post author

      I haven’t got that working either. I was trying to get NASA’s image of the day working and had the same issue. I think from memory that Zip believes it ought to work, but it didn’t for me. I would suggest you report it on the Serviio forums. Most of the focus has tended to be on video issues, so it’s very possible that this has been overlooked.

    1. Andy Twed

      Managed to download and install this now.

      I created a Shared Folder called “public” on my disk station, and have placed a .groovy file in there (Channel4od.groovy). Then i installed and ran Serviio as per the instructions on here.

      On my TV (Toshiba) I can see the server is running, and can browse all of the empty folders “video/movies, video/directors, videos/latest, videos/online”…. but can’t see anything to do with streaming media from Channel 4 OD.

      How do I know that Serviio has successfully picked up the .groovy file?
      How can I browse 4OD content from my TV, if possible?

  8. Nicolas


    on a DS1511+ with DSM 4.0 I installed your serviio package.
    But it refuses to detect my PS3, neither is it detected by the PS3.

    When I open the serviio window in DSM it states the upnp server is stopped, and it refuses to start whan I click on “start”.

    There is a message on top of the window :
    Cannot connect to Serviio server, it does not seem to be running. Exiting…
    Rest error to “status” : Internal Server Error (500)

    Any idea?

      1. patters Post author

        Not really – there’s no progress indicator even with the proper remote client (rather than the WebUI). As long as you have disabled the video thumbnailing, and as long as you’re not trying to add a huge load of photos it should be pretty fast (like half and hour or something for my video library).

      2. patters Post author

        Not sure – I don’t have a PS3. Take a look at the Serviio forum. PS3MS does allow subs to be ‘burned in’ to a stream which is being transcoded which is something Serviio cannot do since it only uses FFmpeg for all its conversion (PS3MS uses FFmpeg, TSMuxer and MEncoder for some tasks). However, it’s possible that the PS3 does have some native subtitle support.

      3. Nicolas

        Unfortunately it doesn’t.
        Too bad, it’s really nice to have subtitles for some foreign movies… I still got to struggle to install pms then…

  9. uncola

    Nicolas I had that error “serviio doesn’t seem to be running” it was because I didn’t wait long enough for serviio to start up after installing it.. I waited a few minutes and tried opening the web gui for it and then it worked. I’m also running a 1511+ with dsm 4.0

    1. uncola

      Oh I saw you fixed it by reinstalling.. you know I also reinstalled it too but assumed waiting longer before opening the webgui fixed it.. maybe it was reinstalling it after all

  10. Litten

    hello there, i love the serviio package, it works really well.. only problem is ffmpeg cannot pass the dts track to my receiver.. i heard that PS3MediaServer can do this. I also tried (and failed) at getting this solution to work:

    my question, is there any way could possibly be working on a package install for PS3MediaServer? It would be oh so cool if you do. Please try it!

  11. Harvey King

    I have successfully installed Java6. When I tried to install Serviio package itself, I got this following error:

    Failed to download “Serviio”

    when I look at the /var/log/message on my DS211, , I got the following error:

    PkgSynoMan.cgi: PkgSynoMan.cpp:333 Failed to curl perform, code=56, err=Failure when receiving data from the peer

    1. does this package require cloud station to be enabled?
    2. what might be wrong with this? I have encountered this “failed to download” error message quite frequently, actually. In fact, this is the reason why I couldn’t install Java 7 package, I had to switch to Java 6 instead.

    your help is greatly appreciated.

      1. Harvey King

        Dear Patter:

        no, it didn’t work neither. It did gave out more message, though:
        Failed to Install the package.

        There was a problem downloading ffmpeg-serviio0.6.2-arm-tgz from the download link, which was “”

        I guess it’s dropbox that got overwhelmed?


  12. timeflake

    I have trouble with disconnects while I browse my serviio server on the TV. There is no trouble playing a video file, when I find it. Also the video directory does seem to update with new files.
    All the log says on these disconnects is:
    “WARN [ResourceTransportRequestHandler] Error while processing resource, sending back 404 error. Message: /volume/video/videofile.avi”

    and after that just alot of
    “OutputTextReader] Error reading output of an external command: Stream closed”

    Is it an error on my side!? I might have cut the update of the media library short when serviio was first installed. Because I got impatient. could that be part of the problem!?
    Do you have any recommendation on how I can correct this problem
    Thank you for a wonderful product

    1. patters Post author

      Interrupting the library update process won’t be a problem – it just carries on where it left off, or will rescan eventually.

      1. timeflake

        man I suck.. I meant to write that the library does NOT update…
        Also I forgot to include that I installed your package on a DS410J… but since you didn’t comment on the errors … should I ask on the serviio forums? or just shut up!?

  13. Gerald

    Hi Patters,

    I have tried everything to install your java package and serviio onto my 1511+ but java just gives me the ‘Failed to install the package.’ error. It says that the Java binary bundle not found and it was expecting the file /ejre-1_6_0_32-fcs-b05-linux-i586-headless-05_apr_2012.tar.gz. I’m not sure what else I can try. I’ve successfully installed all serviio and java on my ds211j but this has been frustrating on my 1511+ to say the least. What am I doing wrong and is there a way to manually do this? Thanks for all your help, you are awesome.


      1. patters Post author

        Sorry, I found that there had been a bug with Pacific and Atlantic timezones (I updated the Java package to correct this), but not with Eastern – so I’m not sure what is preventing it installing on your system. Some people did report getting an error, but that Java did nonetheless get installed. Is it not managing to do that at all on yours?

  14. matt

    Is anyone else having problems since the latest update? with folder/files with a ‘ in them not displaying?

    they worked fine before the update. but now they don’t show.

    it might also be worth noting that the upgrade failed in dramatic fashion as I did the update via the inbuilt synology upgrade notification. so didnt check here and realise i didn’t to download the latest version of java, which caused the installation to fail and serviio to be uninstalled/removed from the NAS.

    so downloaded the latest version of java and reinstalled. turned on the home service. and it all installed fine. now as mentioned above any folder or file that has a ‘ in it doesn’t show up.

    1. patters Post author

      I would guess that the issue with apostrophe characters is likely to be a bug with the WebUI. Do you still get this issue if you install the Serviio Remote Console and configure it to connect to your NAS (instructions on the Serviio website, in the FAQ section)?

      1. kingk

        Well i solved that, but in the end the ds212j just proved unable to transcode without stuttering (even wired directly). Shame, i guess its not powerful enough.

      2. mattm

        I haven’t tried to configure the remote console, i’ll give it a try when I get home.

        Just so I am clear though, I only ever add the default video dir “volume1\video” in the WebUi under “Library” / “shared folders” so I never actually look for any of the sub video folders using the WebUi.

        Where I am getting the problem is when serviio is doing its media refresh and then I am accessing serviio via with my ps3/xbox/ipad it doesn’t show any folders with a ‘ in the name.

        if I access my video folder via the DSM file explorer and navigate to a \\synology_nas\video\ if I have any folders in there with a ‘ like matt’s they don’t show. if I rename them in the DSM to matts and tell serviio to do a force refresh. the folder shows up. by all DLNA media players.

        this also effects files as well as I had file that started “death’s door” changed it manually in the DSM file explorer to “deaths door” waited for a refresh and it then appeared to all the DLNA attached media players.

      3. patters Post author

        Hi – I think I may know why there’s a problem with apostrophes in filenames. It’s related to my FFmpeg wrapper script for ARM systems to change the ac3 encoder to the more efficient fixed point one. You have an ARM CPU, right? That would cause the ffmpeg -i 'filename' to fail when Serviio is inspecting the file as it’s adding it to the library. I’ll have to escape the quote characters.

      4. kingk

        Think i have a similar problem with the ds212j – some files and folders not displaying. Is there something i’m supposed to change to correct this issue?

      5. matt

        Yeah i’m running am arm processor inan ds212j,

        thanks for the quick response and keep up the great work, its very much appreciated.

      6. kingk

        I dont think my problem is just to do with apostraphies. under my Video shared folder I have folders a-e, f-g etc. and only one of those folders is showing. Within that there are films missing as well (on both bravia tv downstairs and ps3). How do i force a library update so i can test out what’s going on? the automatic rescan doesnt seem to be working.

      7. mattm

        It’s also probably worth mentioning that I made sure that serviio had full read write access to the “video” folder as well.

  15. Pingback: Subsonic 4.7 beta 1 Synology package | eg-blog

  16. Livin

    Will you be (please) creating a package with version 1.0 beta3? This beta has the webapp Media Browser in it and can be controlled over the web. This would be NICE!

    1. patters Post author

      I won’t distribute packages for closed betas. You’ll have to wait until Serviio 1.0 is released I’m afraid.

  17. Antonio

    I’m running DSM 3.2 on my DS211+ and I had serviio installed but I uninstalled it an now I cannot find it anymore in the package center as an available package.

    How should I proceed to install it again? Java is still installed.


  18. geert

    I am also missing the package in package center. but I do see Crashplan there along with several others.

    For me, it was an upgrade that caused the package to disapear from the installed packages as the installation failed on User Home service being disabled.

    Now I can’t install it again after enabling the User Home service. Is there another way to get the package installed again?

  19. geert

    fixed for me now. I was still running DSM 3.2. after upgrade to DSM 4.0 I could see serviio as available package.

  20. Ian

    Thanks for all your work. I managed to install software and it worked to a degree. I was able to stream photos and music to my LG TV but I never managed to get videos to work. Whenever I selected the video folder it was empty. All permissions were set correctly but I could just not get videos to show. One strange thing was that if I added a folder with with photos in – this folder would show in the video folder even though I did not tick the video box.

    In the end I uninstalled it as I wanted to mainly use it for video and online content which I also never got towork.



  21. Vette

    I used the previous version and was very happy with it (thanks for your work).
    I reinstalled completely my 710+ (intel cpu, DSM 4.0 2228), so I tried to install the last version 6.2.
    Ok for Java (6). Ok for Serviio installation, Serviio is running. But, when I double click on the serviio icon, I only got a blank window. After few minutes I only receive a msg :
    A communication error occurred: “Operation timed out”
    I try to reinstall it, same behavior.
    The log stops when it started to look for media updates.
    It seems alive, because it founds media renderer I connect on the network.
    Any idea ?

  22. Chris

    Hi Patters,

    Excellent work getting Serviio up and running on our synology boxes! Having a small problem at the moment, looks like is having problems as I can’t install Serviio. Had it up and running a couple of days ago but decided to re-install Serviio and last night and can’t connect to your URL (I can ping it though).
    Any help much appreciated.



  23. Paul

    Sorry if this has been answered already, but when I install the Serviio package and try and open it in DSM, it opens the window but inside it is a Firefox error: “This address is restricted. This address uses a network port which is normally used for purposes other than Web browsing. Firefox has cancelled the request for your protection.”.

    I am using in DSM 4.0-2228 on a DS212. How do I fix this problem please?

  24. X S Inattar


    Just wanted to request you to take a look at some changes I made to your to enable support for Refresh.groovy that allows users to refresh the web resources directly from the client.

    I have added the details to Serviio Wiki:

    It would be great if you could incorporate this in your next version.


    X S Inattar

    1. patters Post author

      Hi – that does look interesting. I’ll try and find some time to have a look. I’d say now that I probably won’t include that fix enabled in my release since I’m going to keep it as standardized as possible with the main Serviio release going forward. I have decided to remove the WebUI since it often causes issues of its own and the benefit is really quite small. The wrapper script I wrote is no longer required for the fixed point encoders (new Serviio parameter) but I have decided to leave the wrapper in my package (disabled by default), because it’s useful for people to troubleshoot and test different FFmpeg parameters. What I can do is include your mod in there commented out so it’s pretty easy to enable for those that need it. Incidentally by using my wrapper script you actually have a bug in there which will fail for filenames containing apostrophe characters. You need to change line 12 to:
      PARAMS="${PARAMS} \"${PARAM}\""

      I didn’t update the package to correct this yet because Serviio 1.0 will be out fairly soon (it’s in RC at the moment).

  25. Dmitry

    Hi Patters,

    I’m trying to use serviio0.6.2-009 on ds212j.
    I have a big CPU load (about100%) due to many thumb’s creation on my photos by serviio.
    Is it possible to turn off this?
    Second thing is that ffmpeg will be active as well, even get out on dlna client (my tv sony ex720).
    So, initially raised ffmpeg will be active till end of media. Is there any timeout in the config?

    1. patters Post author

      Hi Dmitry, for FFmpeg transcoding Serviio has no way to tell whether your renderer device has stopped watching the stream so it will carry on until it has finished the whole file, or you start another playback with the same renderer (I think).

      As for the photos, yes it does seem very inefficient at doing this. I haven’t added my photos for this reason. Most of the development and testing focus for Serviio has been on video, so if you would like to improve the image side of things please do join the Serviio forums and suggest or test improvements.

  26. Taddeo

    Can you please help me? I’ve installed Serviio but when I tried to change any settings it saves it but then it always revert it back to what is was?? why is that?? :( :( :( :(

    1. patters Post author

      I believe that’s a bug with the WebUI when using the Internet Explorer browser. Try Firefox, Chrome or Safari. It’s for this reason that when Serviio 1.0 is released I’ll be dropping the WebUI from the package. There are too many issues.

      1. Dmitry

        I have the same, pls try to wait sometime after saving via WEBUI (15-20 min, maybe before), then open WEBUI again. Your settings will be showing correctly (with your previous changes)

  27. Taddeo

    I’m getting the same problem even after 15-20 min…. is there any other way to control servio without the web ui? thanks

    1. patters Post author

      Yep. Install Serviio on another computer, selecting Serviio Console only. On Mac OS find Serviio-Console, right-click, then Show Package Contents. Use TextEdit open Contents/info.plist and add this towards the end of the file after the last key and string entries (Properties section):


      ..replacing that IP with the IP of your NAS obviously. Then save.
      On Windows, use Notepad to open ServiioConsole.exe.vmoptions (in the Serviio/bin folder) and add the line:
      On a Linux client, add this same parameter to the JAVA_OPTS in bin/

      When you next launch the Serviio Console on this computer it will connect to the Serviio instance running on the NAS. It’s a few minutes’ work to set up but much more reliable.

      1. Taddeo

        Thank you so much! I will try!
        Could you also please explain something to me…?
        Why can I play the same video directly from usb from my panasonic blueray player but not when streaming it with serviio?? what is the difference? is serviio changind the format of the video when streaming it? THANKS!!!!

      2. patters Post author

        Possibly. Sometimes the players have different supported formats via DLNA than from USB. I have mostly been involved with Serviio’s Sony device profiles so I’m not familiar with the Panasonic ones but there could very well be room for improvement. Have a look at the Serviio forum, and there are some FAQ/wiki things explaining how the device profiles work.

      3. Taddeo

        Thanks so much for the info! I’ll try to read all that I can to gain more knowledge! So do you use your synology box as a media center with serviio?, what about the internal media server no good at all? And is serviio better than twonky? Can we install twonky on the synology?
        Thanks again

  28. winxi

    hi patters! inspired by your great packages i’m about to build synology packages for ‘bubbleupnp server’ and ‘MinimServer’. with the former i’m nearly done. i have adopted a lot of your Serviio- scripts and even copied some parts (e.g. the check for java installation, check for user home service, creation of the daemon user, passgen). It really works great. would you permit a distribution of these packages at the developer’s websites? of course, in the documentation and the scripts itself, i would point to you and your great blog.
    cheers, winxi

    1. patters Post author

      Yes that’s absolutely fine, and thank you for asking. I would appreciate a comment and link in the code, as you already suggested. I’d advise that you look at my CrashPlan package perhaps more than the Serviio 0.6.2 one, because it represents my most ‘modern’ one. I’ve imitated the style of the SuperZebulon ones – i.e. the concatenation of most of the individual scripts into a single since it’s way easier to maintain (variables defined at the top, etc.), and also the merging of the different CPU architectures into a single package. This also has the advantage that if one day you no longer want to maintain them, they can quite easily be turned over to the SynoCommunity repository which also uses this style.

  29. jjLDN

    Simple tutorial about connecting using the console would be helpfull. I am lost and I don’t know what to do. Linked above thread is not really helpfull.
    As far as I am aware version 1.0 doesn’t come with any webui,l which for now makes the package useless for me.

  30. batserra

    Hi thanks for new package ,but i can not install it, always i recive a error like java is not installed or properly configurated, JAVA_HOME is not defined and a link to
    I tryed to uninstall serviio ,uninstall all java ,restart ,install again java, restart and try to install again serveiio but always the same error. How can i fix it?
    I’m with latest beta SM ,with a 110j nas.

    Thanks a lot….

    1. batserra

      Fixed… i don’t know how… i think that after i installed java 7

      But now ,how i can enter to mediabrowser??? ,say that i need a passowrd from console ,but i can enter to console…thanks for your answer..

  31. Mike

    Please integrate the console for the NAS as it was in Version 0.6.1. That was good. I dont like it all how it ist now.

    1. patters Post author

      I have explained my reasons and I’m not going to do it I’m afraid. Besides, kairoh who made the Java WebUI hasn’t actually made one for Serviio 1.0.

  32. batserra

    Very good,

    Excuse me but I’m not doing wrong, do not know how to enable the console.
    I entered my nas through the program WinSCP and Serviio I edited the file / bin / with the-Dserviio.remoteHost = “The ip of my nas”.
    I turned off the service and I Back home to raise. But do not know how to access the console because I do not see anywhere.
    I tried to enter through Ip: 23424/mediabrowser and I have put the administrator password, but it says you have to first enter the console and change it.

    What am I doing wrong? and excuse me …

    Thank you …

    1. patters Post author

      The serviio.remoteHost parameter is something you change on the PC or Mac that you run the Console on. Not the NAS. I have updated the instructions to make that clearer.

      1. batserra

        Thanks !!! sorry about my english ,i didn’t know that i have to donwload any Serviio from to configure it.

        Now another question ,now i have changed folders ,etc… ,when i star my nas ,always i have to have my computer on? Or all changes that i have done are saved to my nas?

        Thanks again….

      2. patters Post author

        No problem. I’ve made that a little clearer now in the instructions.

        The NAS remembers all the settings and carries on running Serviio. Be careful to exit the Console using “Exit Serviio Console”, and not “Exit Serviio” (which stops Serviio on the NAS too).

        You’re just using the console to make changes to the settings, but the NAS is doing all the work.

      3. batserra


        I have to enable transcode? ,and also in the Transcoding tab in to transcode files location i have to have c:\windows\temp or /volume1/@tmp ??

      4. patters Post author

        Yes you want transcoding enabled (though your NAS won’t be able to cope with video transcoding).
        And it should indeed be /volume1/@tmp

        Remember – everything you see in the console relates to the NAS (not your PC). So any folders you add to the library will need expressing in the NAS style e.g. /volume1/public/movies
        You’ll need to use the Add Path button, not Add Local.

        Your comments are useful feedback for me to improve the instructions, so do ask if you need any more help.

    2. The Future will be to go staps back :)

      You have to that action where the console is installed. And the NAS will not have any console anymore. Sad but true.

  33. jjLDN

    Thank you for making the instructions clearer. Now, they are really helpfull. I found some sort of problem though. Even though I am sure I’ve got port TCP8895 and 1900 UDP opened in firewall, the console is not able to connect, but when I switch off the firewall in DSM the immediately console is connected to serviio server. I am using DSM 4.1 beta now, maybe that’s the problem? Or are there any other ports they need to be opened. One of those I know i 23424 for mediabrowser. Is there anything else?

      1. jjLDN

        Ok. It works. So it means we should take care of ports 8895,23423,23424 TCP and 1900 UDP and make sure they are all open.
        Thank you :)

  34. apotts


    Very nice job. Just pressed update, got a couple of errors at the end so re-booted the NAS and all seems to be well (so far – it’ll take at least overnight to re-index).

    Good clear instructions too – thank you for all the work you put into this.

  35. deadlyporpoise


    I’ve successfully got the console installed on my Windows 7 laptop, as I’m hoping that running the transcoding on another machine will improve performance (my DS212J just can’t cope with the higher quality files, lots of stuttering!)

    However, I’m struggling to work out how to grant user access to the Synology box. I’ve added the matching user account credentials to the User group in the DSM, but checking the log files returns the details as below.

    2012-07-29 12:00:43,536 INFO [RendererManager] Stored a new renderer: uuid=’f3f77ad9-a0b4-46d6-861a-793401f9a50a’, name = ‘Panasonic Viera (2010)’, ipAddress=’192.XXX.X.XX’, profile = ‘viera2010′
    2012-07-29 12:00:46,853 INFO [RendererManager] Stored a new renderer: uuid=’4d454930-0100-1000-8001-04209a691ee6’, name = ‘Panasonic VIErA’, ipAddress=’192.XXX.X.XX’, profile = ‘viera2011′
    2012-07-29 12:01:43,977 INFO [RendererManager] Stored a new renderer: uuid=’0e488a19-63d7-4290-9807-41de16834615’, name = ‘Panasonic Viera (2010)’, ipAddress=’192.XXX.X.XX’, profile = ‘viera2010’
    2012-07-29 12:03:29,164 WARN [LibraryAdditionsCheckerThread] Folder ‘\\DISKSTATION212J\movies’ is either not an existing directory or cannot be read due to access rights
    2012-07-29 12:08:07,556 INFO [DiscoveryAdvertisementNotifier] Leaving DiscoveryAdvertisementNotifier
    2012-07-29 12:08:07,574 INFO [WebServer] WebServer shutting down
    2012-07-29 12:08:07,575 INFO [DiscoverySSDPMessageListener] Leaving DiscoverySSDPMessageListener
    2012-07-29 12:08:07,577 INFO [EventDispatcher] Leaving EventDispatcher
    2012-07-29 12:08:07,586 INFO [EventSubscriptionExpirationChecker] Leaving EventSubscriptionExpirationChecker, removing all event subscriptions
    2012-07-29 12:08:09,702 INFO [WebServer] WebServer starting on port 8895
    2012-07-29 12:08:09,704 INFO [DiscoveryAdvertisementNotifier] Starting DiscoveryAdvertisementNotifier
    2012-07-29 12:08:09,704 INFO [RendererSearchSender] Searching for Renderer devices
    2012-07-29 12:08:09,704 INFO [EventSubscriptionExpirationChecker] Starting EventSubscriptionExpirationChecker
    2012-07-29 12:08:09,708 INFO [EventDispatcher] Starting EventDispatcher
    2012-07-29 12:08:09,809 INFO [DiscoverySSDPMessageListener] Starting DiscoverySSDPMessageListener using interface eth3 (Realtek RTL8101E Family PCI-E Fast Ethernet NIC (NDIS 6.20)) and address, timeout = 0
    2012-07-29 12:08:11,374 INFO [RendererManager] Stored a new renderer: uuid=’4d454930-0100-1000-8001-04209a691ee6′, name = ‘Panasonic VIErA’, ipAddress=’192.XXX.X.XX’, profile = ‘viera2011′
    2012-07-29 12:08:11,915 INFO [RendererExpirationChecker] Leaving RendererExpirationChecker
    2012-07-29 12:08:24,274 INFO [RendererManager] Stored a new renderer: uuid=’8749ca89-2fc4-4ac2-8dab-73b76ea075c4’, name = ‘Panasonic Viera (2010)’, ipAddress=’192.XXX.X.XX’, profile = ‘viera2010’
    2012-07-29 12:08:29,223 WARN [LibraryAdditionsCheckerThread] Folder ‘\\DISKSTATION212J\movies’ is either not an existing directory or cannot be read due to access rights
    2012-07-29 12:08:41,925 WARN [ServiioStatusService] AuthenticationException occured. Returning error code 401 to the REST layer. Message: Cannot log in with an empty password.
    2012-07-29 12:13:29,284 WARN [LibraryAdditionsCheckerThread] Folder ‘\\DISKSTATION212J\movies’ is either not an existing directory or cannot be read due to access rights

    If you could provide an idiots guide to how to grant a Windows User account remote access to the DSM, that would be awesome, as I’m sure there will be lots of people using a remote machine to handle the transcoding for files held remotely.

    Many thanks!

  36. tomtom2000

    I have a DS212j and tried to install this. I have put the ejre-7u4-fcs-b20-linux-arm-sflt-headless-12_apr_2012.tar.gz file in public folder,but I keep getting told that java 6 or 7 can’t see it in their and needs it to run.

    I have downloaded a few versions from Java and other sites. The version I downloaded from the tinyurl is different from the one requested.

    I have DSM 4 and am not sure what else to try.


  37. Niels-e

    Hi, first of all thanks for this great package!

    Secondly, I’ve just upgraded to the 4.1 beta firmware and now it seems that the package doesn’t install the right way. It won’t make a shortcut in the menu and doesn’t make any servio folder in the public folder on volume1. The web interface works tho.

    Any thoughts?

  38. Zorya

    Hello everyone and thank you for all your great stuff.

    I love Serviio 0.6.2 but I don’t want to upgade to the version 1.0 now (as my current release is very stable and I’m not interressed by new features). So I’m affraid to clic on the “update” button by mistake.
    In case of, is there a way to downgrade from 1.0 to 0.6.2?

    Also, can I download somewhere the syno package (spk release 0.6.2) for an offline installation?


  39. Gonza

    Hi. I was wondering about the impact of running this DLNA server on a Synology DS212j. The NAS for itself have a very limited amount of memory so I was wondering if leaving serviio running in the background makes the NAS slower or unresponsive. Can somebody answer this simple question? Would you recommend to install serviio on my NAS or it’s better to leave that to a computer? Thanks!

    1. patters Post author

      It will be fine. Linux is very good at swapping out memory that isn’t actively being used to disk. I leave mine running Serviio continuously. Serviio runs very well on a NAS provided your renderer device has good format support. If it needs videos to be transcoded then unfortunately the NAS won’t have enough CPU power to do that in realtime.

      1. Gonza

        Ok thank you for the answer and for your work!!
        One last question: Do you know what versions of serviio and java are the most lightweight?

      2. patters Post author

        I believe that I read somewhere at that Java 6 is slightly leaner and more highly optimised (Java 7 is still improving with each revision), and since Serviio doesn’t use any of the new Java 7 functionality yet (Macs lack Java 7) maybe you should use Java 6. As for Serviio I think newer is better. There have been significant improvements with the library additions threads and adjustments to how online resources are scanned.

  40. Mender

    Ahoj patters ;-)

    I have installed the Serviio 1.0 on my Synology DS212j with DSM 4.0 and it is working without problems.

    To my pleasure, Finally I am able see my NIKON DSLR photos on my Samsung TV. On Synology built in Media server I saw only thumbnails.

    But I see one problem. My DS212j is not going to sleep mode with Serviio running.

    What can I do???

    1. patters Post author

      Hi, unfortunately I haven’t figured this out yet. It seems to me that all the Java apps I have run seem to stop the NAS hibernating (CrashPlan included), so I just accept this. I did once try to create a ramdisk and symlink the Serviio log folder to that but it didn’t seem to help. If anyone figures a solution out, please let me know.

      1. Gonza

        Wasn’t that supposed to be a filesystem constant scanning problem?? And that the use of inotify would fix it sometime? At least that’s what I’ve read on Serviio forums.

    2. tomtom2000

      How did you get the Java installed on the NAS. I have the same model and as I posted before when I try to install Java it tells me that the file it is expecting is not in the right folder.
      I have tried a few versions, but still nothing.

      Any suggestions please??

      1. tomtom2000

        I think the problem is more between the chair and the keyboard. I love my tech, but I have no idea how to use the finer points of it most of the time! Thanks to every one here. Much appreciated.

      2. patters Post author

        :) I’ve updated the notes on the Java page. I had answered certain questions quite frequently in the comments and so I hadn’t realized that the actual blog post didn’t adequately stress these.

      3. tomtom2000

        I set all users to read/write and put both types in the folder public and still get this

        This is why I am unsure what to do next. When I download the packages they miss the .tar and only display the .gz so I have added them in manually as others here have.


        (The public folder was auto created, do I need a new one?)

      4. tomtom2000

        Nope, its not being extracted first (did try that as well)….oh well, I guess I can’t use it.

        Thanks for the help


      5. patters Post author

        Check that ‘public’ appears in the Shared Folder DSM Control Panel. Also check that Windows File Service is enabled in the Win/Mac/NFS DSM Control Panel. My script uses the Windows File Service’s smb.conf to locate the actual folder path of the Public share (it might not be on volume1). Can you report back if that fixes it for you.

        EDIT – I think the problem might be that you called your folder ‘Public’ and not ‘public’. This being Linux, it is case sensitive.

  41. Bob

    I have had numerous issues and just want to go back to what was working. Where can get the 0.6.2 package to reinstall until I figure this out?. – Thank you.

      1. Chewie

        I, too, am having issues. I get DLNA errors on my PS3 that I never had before while using the new Serviio version. No matter where I place the online plugins in the public folder, Serviio won’t load them. And Serviio won’t restart after my NAS shuts down and starts up (as it does everyday).

        How do I go about reinstalling 0.6.2 after I’ve downloaded it from the above link?

  42. Bo

    Why was the console removed from synology with the upgrade? Can I reinstall it on the synology nas server like it used to be. It was an all encompassing install before and now you expect us to use two computers. If not, how do I revert to the old version?

    1. patters Post author

      The reasons are explained in the text of the blog post. Look a few posts back in these comments for a download link to the 0.6.2 package if you really want.

  43. François

    hello, excuse me for my english i am french people

    I have a DS712+ DSM 4.0-2228 and as I tried to install serviio.
    I put in the public directory files:

    after installing the java status shows: stop.
    and in the log :

    /var/packages/java6/scripts/postinst: line28: not found
    Systeme installed locales:


    when I install serviio package I get the message:

    java is not installed or not properly configured. The Java binary could not be located. Download and install the java package from

    Can you help me? and tell me how to fix this? for information I use the DS712 + with mac os X, but I do not think that’s the problem
    I started with the use of the DS712 + i am novice

    thank you in advance for your help


    1. patters Post author

      You’re using a Mac, so perhaps your Synology has the Windows File Sharing Service disabled. You will need this to be enabled just for the time you install the package. This is because I use its config file to locate the ‘public’ shared folder.

      1. François

        thank you for your help, I managed to walk serviio.
        for information I used IE9 to download files and configure the NAS, maybe that’s it.
        thank you again.

      2. François

        I just download the file with IE and java is ok over the error message.
        but during the installation of serviio I get the message:

        The User Home service is not enabled. Please enable this feature in the User control panel.

        thank you for your help.


      3. François

        thank you for your answer but windows sharing is enabled.
        I do not understand why I can not install a package.
        if you have a solution?
        thank you

  44. alf

    Hi :d

    I upgrade my Serviio package on my ds411, and now when I want to acces webui, serviio ask me a password.
    I try my admin password and I have this anwser :

    You did not create a password for the web user. Enter it in the Serviio console.

    So I must enter in the servio consol, Okay but how ???
    I try whit Putty to acces on my Nas on the 23424 but nothing… I’m sure it’s a easy thing !! but not for me ! :)

    THX ;)

    1. patters Post author

      Look at the updated Notes section of the blog post. You need to install Serviio Console on your computer then edit the settings so it connects to the NAS’s instance of Serviio.

  45. similian

    No java expert but loved previous version, can no longer get to console to configure. please a newbie guide will help


Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s