Page 1 of 1

Serviio 1.5 with Ubuntu Server 14.04

PostPosted: Tue Jan 27, 2015 6:14 am
by Kizari
Hey there

I've been trying to set up Serviio to work with my Ubuntu server. I was really enjoying another DLNA service but ran into problems when I realised that it was unable to do transcoding on the fly, so a friend of mine recommended Serviio.

I've been through a lot of effort to get this working. I had to install java 8 from the ppa packages because Serviio doesn't want to work with java 7.
That fixed my first set of errors but now I'm running into this. I can't find an answer anywhere on google.

I used sudo sh -v /srv/serviio-1.5/bin/serviio-console.sh and this was the output

  Code:
#!/bin/sh
### ====================================================================== ###
##                                                                          ##
##  Serviio Console ript                                                    ##
##                                                                          ##
### ====================================================================== ###

DIRNAME=`dirname $0`
PROGNAME=`basename $0`

# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
linux=false;
case "`uname`" in
    CYGWIN*)
        cygwin=true
        ;;

    Darwin*)
        darwin=true
        ;;

    Linux)
        linux=true
        ;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
    [ -n "$SERVIIO_CONSOLE_HOME" ] &&
        SERVIIO_CONSOLE_HOME=`cygpath --unix "$SERVIIO_CONSOLE_HOME"`
    [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Setup SERVIIO_CONSOLE_HOME
if [ "x$SERVIIO_CONSOLE_HOME" = "x" ]; then
    # get the full path (without any relative bits)
    SERVIIO_CONSOLE_HOME=`cd $DIRNAME/..; pwd`
fi
export SERVIIO_CONSOLE_HOME

# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then
        JAVA="$JAVA_HOME/bin/java"
    else
        JAVA="java"
    fi
fi

# Setup the classpath
SERVIIO_CONSOLE_CLASS_PATH="$SERVIIO_CONSOLE_HOME/lib/*:$SERVIIO_CONSOLE_HOME/co                                                                                        nfig"

# Setup Serviio specific properties
JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true                                                                                         -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
    SERVIIO_CONSOLE_HOME=`cygpath --path --windows "$SERVIIO_CONSOLE_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    SERVIIO_CONSOLE_CLASS_PATH=`cygpath --path --windows "$SERVIIO_CONSOLE_CLASS                                                                                        _PATH"`
fi

# Execute the JVM in the foreground
exec "$JAVA" -Xms5M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=5 -XX:Ma                                                                                        xHeapFreeRatio=10 $JAVA_OPTS -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.servii                                                                                        o.console.ServiioConsole "$@"
Exception in thread "Thread-1" java.lang.NullPointerException
        at org.serviio.console.ServiioConsole$ShutdownHook.run(ServiioConsole.java:328)


Without the -v I just get

  Code:
Exception in thread "Thread-1" java.lang.NullPointerException
        at org.serviio.console.ServiioConsole$ShutdownHook.run(ServiioConsole.java:328)


Any help on this matter would be greatly appreciated.

Re: Serviio 1.5 with Ubuntu Server 14.04

PostPosted: Wed Jan 28, 2015 2:32 pm
by zip
It should not output the shell script. try without the sudo or the sh command,like:

  Code:
~ ./serviio-console.sh


Also make sure you run the server first

  Code:
~ ./serviio.sh

Re: Serviio 1.5 with Ubuntu Server 14.04

PostPosted: Mon Feb 02, 2015 12:32 pm
by Kizari
Thank you for the quick response. And may I just say congratulations on what may possibly be the best DLNA service in existence. I've tried about 4 other DLNA services as I said and none of them were as customizable or functional as Serviio, nor did they even work for transcoding my media to my TV, even though they "had working profiles for it."

The problem was quite simple, I thought "serviio.sh" was for the GUI version and "serviio-console.sh" was for the command-line operating systems. But all it took was downloading oracle's java8 from the webupd8 ppas and running serviio.sh. I had to connect by downloading serviio on my laptop and adding -DremoteHost:xxx.xxx to the Serviio-console.sh script to be able to add media, but I got that working. Then I had issues with subtitles not showing so I had to remove ffmpeg and build it from the source files so they would include libass. After that it still wasn't working until I told it to enable burned-in subtitles always, instead of "only when required." I guess it couldn't detect that my TV was requiring them.

Thanks again for your help.