Page 1 of 3

Serviio on UnRaid

PostPosted: Fri Jan 14, 2011 8:26 pm
by kjricker
I am just now experimenting getting Serviio running on my unRaid server. I will try to document my attempt here. If anyone else has already accomplished this I'd love to hear about it.

Here is a post on the unRAID boards from someone who has already accomplished this.

Re: Serviio on UnRaid

PostPosted: Fri Jan 14, 2011 8:36 pm
by kjricker
Currently running Serviio.sh results in an error: "./Serviio.sh: line 67: java: command not found". I believe I have Java installed using the unRaid plugin called unMenu.

Re: Serviio on UnRaid

PostPosted: Sat Jan 15, 2011 12:29 am
by zip
Is it on a path? or in a env property JAVA_HOME ?

Re: Serviio on UnRaid

PostPosted: Sat Jan 15, 2011 1:23 am
by kjricker
Wooooosh. Right over my head. I'm a total Linux noob so this is all new territory to me but I am eager to learn and get it working. I'll figure out what you said after doing some research and post back. I'll sideline my work on getting HD mpeg2 files to stream properly to my Sony TV for the moment. ;)

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 12:15 am
by kjricker
I can see Java installed at usr/lib/java. Does that mean anything to you? I could add to my go script "export JAVA_HOME=/usr/lib/java". Do you think that would be helpful?

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 12:42 am
by kjricker
I figured out how to get java working. Now when I invoke "serviio.sh &" I get the output "[1] 15371". Is that expected?

Now I guess it is time to read up on how to get the console on my window 7 PC to talk to the Server on Unraid.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 12:55 am
by zip
That should be ok. You can check serviio.log to see if it started properly and if there are any errors

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 12:59 am
by kjricker
I've been trying to search the forums on how to connect the Windows console to the unRaid server, but the search page is giving me an error. Can you gimme a hand?

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 1:02 am
by zip
Did you read the FAQ? http://www.serviio.org/component/content/article/21#q2

you need to setup remoteHost property for both, server and console including the server's IP address

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 1:33 am
by kjricker
Thanks. I scanned it, but somehow totally missed that section. I guess 'cause when I scanned it it was 4am.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 2:54 am
by kjricker
Now my next trick is to get ffmpeg installed.

I am using a version of ffmpeg for Slackware 13.1 from http://connie.slackware.com/~alien/slac ... kg64/13.1/

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 3:38 am
by kjricker
Looks like all is up and running. I am having trouble adding paths though. Are SMB paths written differently when running Serviio under Linux? I entered a path like "\\tower\movies" and one like "\\192.168.0.2\Photos", but I don't see any content showing up.

I've also just tried "/mnt/user/Movies" and "mnt/user/Movies", still no luck. In a telnet session I can see all my various files by "cd /mnt/user/Movies".

Here is a log if that helps.

After some more experimenting it appears that "/mnt/user/Movies" is the right syntax. Servvio is jut having issues for some reason. When browsing it from XBMC and trying to view images I'll see the following show up in the telnet session.

  Code:
root@Tower:/boot/custom/serviio/bin# ./serviio.sh: line 67: 28132 Killed
          "$JAVA" -Xmx384M $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.servi
io.MediaServer "$@"

[1]+  Exit 137                serviio.sh

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 11:45 am
by zip
The character encoding on your OS is US-ASCII and some file names have characters that cannot be read. Not sure if there is a way to enforce encoding for the whole OS.
Something similar was discussed here: viewtopic.php?f=14&t=692&p=5572&hilit=hebrew#p5832 (setting it to UTF-8)

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 5:29 pm
by kjricker
Based on that post I added the following to my serviio.sh file:
  Code:
LANG=en_US.UTF-8
export LANG

So it now reads:
  Code:
#!/bin/sh
### ====================================================================== ###
##                                                                          ##
##  Serviio start Script                                                    ##
##                                                                          ##
### ====================================================================== ###

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

LANG=en_US.UTF-8
export LANG

# 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_HOME" ] &&
        SERVIIO_HOME=`cygpath --unix "$SERVIIO_HOME"`
    [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`   
fi

# Setup SERVIIO_HOME
if [ "x$SERVIIO_HOME" = "x" ]; then
    # get the full path (without any relative bits)
    SERVIIO_HOME=`cd $DIRNAME/..; pwd`
fi
export SERVIIO_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_CLASS_PATH="$SERVIIO_HOME/lib/serviio.jar:$SERVIIO_HOME/lib/derby.jar:$SERVIIO_HOME/lib/jcs.jar:$SERVIIO_HOME/lib/concurrent.jar:$SERVIIO_HOME/lib/freemarker.jar:$SERVIIO_HOME/lib/httpcore.jar:$SERVIIO_HOME/lib/jaudiotagger.jar:$SERVIIO_HOME/lib/jul-to-slf4j.jar:$SERVIIO_HOME/lib/jcl-over-slf4j.jar:$SERVIIO_HOME/lib/log4j.jar:$SERVIIO_HOME/lib/sanselan.jar:$SERVIIO_HOME/lib/slf4j-api.jar:$SERVIIO_HOME/lib/slf4j-log4j12.jar:$SERVIIO_HOME/lib/org.restlet.jar:$SERVIIO_HOME/lib/org.restlet.ext.xstream.jar:$SERVIIO_HOME/lib/xstream.jar:$SERVIIO_HOME/config"

# Setup Serviio specific properties
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dserviio.remoteHost=192.168.0.2"

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

# Execute the JVM in the foreground
"$JAVA" -Xmx384M $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"         

Yet in the log it still shows File encoding: US-ASCII. So I must be doing it wrong.
  Code:
2011-01-16 12:24:05,851 INFO  [MediaServer] ------------------------------------------------------------------------
2011-01-16 12:24:05,852 INFO  [MediaServer] Serviio DLNA media streaming server v 0.4.2 (rev. 683706a96104)
2011-01-16 12:24:05,853 INFO  [MediaServer] Petr Nejedly 2009-2010
2011-01-16 12:24:05,853 INFO  [MediaServer] http://www.serviio.org
2011-01-16 12:24:05,853 INFO  [MediaServer]
2011-01-16 12:24:05,853 INFO  [MediaServer] Java 1.6.0_11-Sun Microsystems Inc.
2011-01-16 12:24:05,853 INFO  [MediaServer] OS Linux i386 2.6.32.9-unRAID
2011-01-16 12:24:05,853 INFO  [MediaServer] File encoding: US-ASCII
2011-01-16 12:24:05,853 INFO  [MediaServer] ------------------------------------------------------------------------

So when browsing thru my images I still get the error posted above, but the log show nothing. I will turn on DEBUG and see what it shows.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 5:50 pm
by kjricker
DEBUG log shows nothing just a bunch of lines where it is adding items to the DB.

I am getting a lot of unknown video file type on my .mkv files:
  Code:
2011-01-16 12:48:41,591 DEBUG [ProcessExecutor] Starting ffmpeg -i /mnt/user/TV/Breaking Bad/Season 03/Breaking Bad - S03E10 - Fly.mkv
2011-01-16 12:48:41,629 DEBUG [LibraryManager] Skipping processing metadata for an unsupported file. Message: Unknown video file type.
Do you think my ffmpeg is too old or not installed properly?

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 6:19 pm
by zip
try executing ffmpeg -i <the mkv file> and post the result back

exporting the Language: I'm not sure if it was in the sh file or somewhere else for the whole OS or user session.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 6:34 pm
by kjricker
I'm trying to find out how to set the language for unRaid. Right now I think I am having ffmpeg issues. Invoking ffmpeg gives me an error "cannot execute binary file". So I tried a different version and I got an error about libasound.so.2 not found.
  Code:
root@Tower:/boot# ffmpeg
ffmpeg: error while loading shared libraries: libasound.so.2: cannot open shared
 object file: No such file or directory

So now I am testing yet another version.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 7:16 pm
by zip
Ideal would be if you compile the version here: http://www.serviio.org/files/ffmpeg-23013.tar.gz

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 7:20 pm
by kjricker
Yeah. I am looking into how to do that now. I have never compiled anything, so this may take me a while. I'll report back when I can get that done.

Re: Serviio on UnRaid

PostPosted: Sun Jan 16, 2011 8:08 pm
by Cerberus
kjricker wrote:Yeah. I am looking into how to do that now. I have never compiled anything, so this may take me a while. I'll report back when I can get that done.



what OS are you using ???