FAQ  •  Register  •  Login

Running server side on FreeBSD

<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Mon Dec 13, 2010 8:00 am

Re: Running server side on FreeBSD

Any suggestion?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 13, 2010 9:30 am

Re: Running server side on FreeBSD

can you give an example of what a folder looks like on the file system and how it's presented on the TV?

Also check Serviio log (the beginning), it should say what character encoding is used on your OS.
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Tue Dec 14, 2010 6:29 am

Re: Running server side on FreeBSD

thanks please see attached.

the log:

  Code:
2010-12-13 12:20:54,671 INFO  [MediaServer] ------------------------------------------------------------------------
2010-12-13 12:20:54,684 INFO  [MediaServer] Serviio DLNA media streaming server v 0.4.2 (rev. 683706a96104)
2010-12-13 12:20:54,684 INFO  [MediaServer] Petr Nejedly 2009-2010
2010-12-13 12:20:54,684 INFO  [MediaServer] http://www.serviio.org
2010-12-13 12:20:54,685 INFO  [MediaServer]
2010-12-13 12:20:54,685 INFO  [MediaServer] Java 1.6.0_07-The FreeBSD Foundation
2010-12-13 12:20:54,685 INFO  [MediaServer] OS FreeBSD i386 7.3-RELEASE-p3
2010-12-13 12:20:54,685 INFO  [MediaServer] File encoding: ISO-8859-1
2010-12-13 12:20:54,685 INFO  [MediaServer] ------------------------------------------------------------------------
2010-12-13 12:20:54,905 INFO  [RestletServer] Starting Restlet server exposed on 10.0.0.20:23423
2010-12-13 12:20:54,946 INFO  [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2010-12-13 12:20:56,518 INFO  [ProfilesDefinitionParser] Parsing Profiles definition
2010-12-13 12:20:56,687 INFO  [ProfilesDefinitionParser] Added profile 'Generic DLNA profile' (id=1)
2010-12-13 12:20:56,762 INFO  [ProfilesDefinitionParser] Added profile 'Samsung TV (B-series)' (id=2)
2010-12-13 12:20:56,834 INFO  [ProfilesDefinitionParser] Added profile 'XBox 360' (id=3)
2010-12-13 12:20:56,851 INFO  [ProfilesDefinitionParser] Added profile 'Playstation 3' (id=4)
2010-12-13 12:20:56,875 INFO  [ProfilesDefinitionParser] Added profile 'Samsung TV (A-series)' (id=5)
2010-12-13 12:20:56,934 INFO  [ProfilesDefinitionParser] Added profile 'DirecTV HD-DVR' (id=6)
2010-12-13 12:20:56,955 INFO  [ProfilesDefinitionParser] Added profile 'Samsung TV / player (C-series)' (id=7)
2010-12-13 12:20:56,969 INFO  [ProfilesDefinitionParser] Added profile 'LG BD player' (id=8)
2010-12-13 12:20:57,063 INFO  [ProfilesDefinitionParser] Added profile 'Sony Bravia TV' (id=9)
2010-12-13 12:20:57,162 INFO  [ProfilesDefinitionParser] Added profile 'Sony BD Player' (id=10)
2010-12-13 12:20:57,465 INFO  [VideoDeliveryEngine] Cleaning transcode engine and its data
2010-12-13 12:20:57,549 INFO  [WebServer] WebServer starting on port 8895
2010-12-13 12:20:57,562 INFO  [Device] Created UPnP Device with UUID: 461c11b5-b7d4-34d6-a97a-0cf6e58b040b, bound address: 10.0.0.20
2010-12-13 12:20:57,618 INFO  [CompositeCacheManager] Creating cache manager from config file: /cache.ccf
2010-12-13 12:20:57,628 INFO  [ThreadPoolManager] thread_pool.default PoolConfiguration = useBoundary = [true] boundarySize = [2000] maximumPoolSize = [150] minimumPoolSize = [4] keepAliveTime = [300000] whenBlockedPolicy = [RUN] startUpSize = [4]
2010-12-13 12:20:57,630 INFO  [CompositeCacheConfigurator] Setting default auxiliaries to null
2010-12-13 12:20:57,630 INFO  [CompositeCacheConfigurator] No special CompositeCacheAttributes class defined for key [jcs.default.cacheattributes], using default class.
2010-12-13 12:20:57,632 INFO  [CompositeCacheConfigurator] setting defaultCompositeCacheAttributes to [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 100, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2010-12-13 12:20:57,632 INFO  [CompositeCacheConfigurator] No special ElementAttribute class defined for key [jcs.default.elementattributes], using default class.
2010-12-13 12:20:57,632 INFO  [CompositeCacheConfigurator] setting defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL = true, IS_REMOTE = true, IS_ETERNAL = true, MaxLifeSeconds = -1, IdleTime = -1, CreateTime = 1292242857632, LastAccessTime = 1292242857632, getTimeToLiveSeconds() = -1, createTime = 1292242857632 ]
2010-12-13 12:20:57,633 INFO  [CompositeCacheConfigurator] No special ElementAttribute class defined for key [jcs.region.local_resetafterplay.elementattributes], using default class.
2010-12-13 12:20:57,644 INFO  [LRUMemoryCache] initialized LRUMemoryCache for local_resetafterplay
2010-12-13 12:20:57,644 INFO  [CompositeCache] Constructed cache with name [local_resetafterplay] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2010-12-13 12:20:57,645 INFO  [CompositeCacheConfigurator] No special ElementAttribute class defined for key [jcs.region.local_default.elementattributes], using default class.
2010-12-13 12:20:57,645 INFO  [LRUMemoryCache] initialized LRUMemoryCache for local_default
2010-12-13 12:20:57,645 INFO  [CompositeCache] Constructed cache with name [local_default] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2010-12-13 12:20:57,645 INFO  [CompositeCacheConfigurator] Parsed regions [local_resetafterplay, local_default]
2010-12-13 12:20:57,646 INFO  [CompositeCacheConfigurator] Finished configuration in 17 ms.
2010-12-13 12:20:57,646 INFO  [DiscoveryAdvertisementNotifier] Starting DiscoveryAdvertisementNotifier
2010-12-13 12:20:57,647 INFO  [DiscoverySSDPMessageListener] Starting DiscoverySSDPMessageListener using interface 10.0.0.20
2010-12-13 12:20:57,649 INFO  [EventSubscriptionExpirationChecker] Starting EventSubscriptionExpirationChecker
2010-12-13 12:20:57,650 INFO  [EventDispatcher] Starting EventDispatcher
2010-12-13 12:26:42,782 INFO  [UpdateChecker] Checking if a new version is available
2010-12-13 18:55:02,500 INFO  [ContentDirectoryDefinitionParser] Parsing ContentDirectory definition
2010-12-13 19:42:19,360 INFO  [LibraryAdditionsCheckerThread] Started looking for newly added files
2010-12-13 19:42:19,365 INFO  [LibraryUpdatesCheckerThread] Started looking for updates to currently shared files
2010-12-13 19:42:19,372 INFO  [LibraryAdditionsCheckerThread] Finished looking for newly added files
2010-12-13 19:42:36,846 INFO  [LibraryAdditionsCheckerThread] Started looking for newly added files
2010-12-13 19:42:36,847 INFO  [LibraryAdditionsCheckerThread] Finished looking for newly added files
2010-12-13 19:42:36,851 INFO  [LibraryUpdatesCheckerThread] Started looking for updates to currently shared files
2010-12-13 19:58:35,041 INFO  [LibraryAdditionsCheckerThread] Started looking for newly added files
2010-12-13 19:58:35,044 INFO  [LibraryUpdatesCheckerThread] Started looking for updates to currently shared files
2010-12-13 19:58:38,889 INFO  [LibraryAdditionsCheckerThread] Added file 'עברית.JPG' to Library
2010-12-13 19:58:39,413 INFO  [LibraryAdditionsCheckerThread] Added file 'eng.JPG' to Library
2010-12-13 19:58:39,974 INFO  [LibraryAdditionsCheckerThread] Added file 'עברית.JPG' to Library
2010-12-13 19:58:40,766 INFO  [LibraryAdditionsCheckerThread] Added file 'eng.JPG' to Library
2010-12-13 19:58:40,767 INFO  [LibraryAdditionsCheckerThread] Finished looking for newly added files
2010-12-13 19:58:52,548 INFO  [LibraryAdditionsCheckerThread] Started looking for newly added files
2010-12-13 19:58:52,554 INFO  [LibraryUpdatesCheckerThread] Started looking for updates to currently shared files
2010-12-13 19:58:52,699 INFO  [LibraryAdditionsCheckerThread] Finished looking for newly added files
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Tue Dec 14, 2010 6:35 am

Re: Running server side on FreeBSD

pictures of the SMB view in wodws of the main folder the english named folder and the hebrew named folder.

main_folder.jpg
main_folder.jpg (235.09 KiB) Viewed 15591 times


eng_folder.jpg
eng_folder.jpg (219.85 KiB) Viewed 15591 times


heb_folder.jpg
heb_folder.jpg (228.88 KiB) Viewed 15591 times
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Tue Dec 14, 2010 6:36 am

Re: Running server side on FreeBSD

pictures of what is seen on the tv of both the main folder and the english folder.
I can't enter at the tv to the hebrew folder but on the english folder I can play the hebrew file although it's name is not shown.

tv_main.JPG
tv_main.JPG (55.77 KiB) Viewed 15590 times


tv_eng.JPG
tv_eng.JPG (74.4 KiB) Viewed 15590 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Dec 14, 2010 7:11 pm

Re: Running server side on FreeBSD

so if you log into the NAS, can you see the Hebrew characters of the folders properly? It might be the mounting is not configured right, as it works from the Windows box. You might also try adding
  Code:
-Dfile.encoding=UTF-8
to serviio.sh among the other -D parameters.
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Wed Dec 15, 2010 6:35 am

Re: Running server side on FreeBSD

Hi thanks,

but setting to UTF-8 doesn't seem to help (verfifed at the serviio log that it was really changed to UTF-8).

logging into the NAS shows
  Code:
?????
on the hebrew file names....
nevertheless the fuppes server know how to threat them with the current configuration (but I perfer serviio for the rest of the reasons...).

Any other insight?

thanks.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Dec 15, 2010 9:43 am

Re: Running server side on FreeBSD

I was not able to reproduce it on my Windows box - the file names got the proper Hebrew names. So it must be the way Java sees the mounted folders on the NAS. Not really sure what to try next, as I cannot reproduce it ;-(
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Fri Dec 17, 2010 7:07 am

Re: Running server side on FreeBSD

OK, thanks for now.
<<

clancy76

Serviio newbie

Posts: 8

Joined: Thu Dec 09, 2010 8:22 pm

Post Thu Dec 23, 2010 7:20 pm

Re: Running server side on FreeBSD

found the way!

just need to set the LANG to en_US.UTF-8. (I think that I already tried that before but maybe did somthing wrong anyway now it works...).
as I still don't know how to set this as global variable on freenas (it seems like it overwrites everyhting on boot...).
I just added this to the serviio.sh:

  Code:
LANG=en_US.UTF-8
export LANG


so my serviio.sh file is now as follows:

  Code:
#!/bin/sh
### ====================================================================== ###
##                                                                          ##
##  Serviio start Script                                                    ##
##                                                                          ##
### ====================================================================== ###

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_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 -Dffmpeg.location=/usr/local/bin/ffmpeg -Dfile.encoding=UTF-8 -Dserviio.remoteHost=10.0.0.20"

# 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

LANG=en_US.UTF-8
export LANG

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






Thanks for the help, and hope that I also helped someone.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 23, 2010 7:57 pm

Re: Running server side on FreeBSD

Cool. Well done.
<<

dboy

Serviio lover

Posts: 51

Joined: Sat Nov 13, 2010 11:20 pm

Post Sun Jan 02, 2011 10:37 pm

Re: Running server side on FreeBSD

Did you guys that got Serviio to run on FreeBSD/FreeNAS also got ffmpeg and transcoding to work fine?

What hardware are you running it on?
Can you get HD/1080 to transcode ok aswell?
<<

fafa

Streaming enthusiast

Posts: 30

Joined: Mon Sep 27, 2010 8:03 pm

Location: France

Post Tue Jan 04, 2011 10:18 am

Re: Running server side on FreeBSD

Hey
I am using freebsd 8.1 rc with serviio to serve files to my sony tv. the server is a dual core @1.8g.

Playing of MKVs is not fully functional with my set up, but I guess this is a configuration issue.
Playing 1080 mt2s files is working fine (except that lots of cpu is being used for this whereas transcoding should not be needed with this video format)

hope this helps
<<

fafa

Streaming enthusiast

Posts: 30

Joined: Mon Sep 27, 2010 8:03 pm

Location: France

Post Wed Jan 05, 2011 11:17 pm

Re: Running server side on FreeBSD

Hey

Switched to the ffmpeg-devel build from 31.12.10 (freebsd 8.2 rc1)
Now almost all my MKVs play properly.
720 are fine, 1080 stutter on my e6300 with 1g of ram.

fafa
<<

dboy

Serviio lover

Posts: 51

Joined: Sat Nov 13, 2010 11:20 pm

Post Fri Jan 07, 2011 12:47 pm

Re: Running server side on FreeBSD

So, when building a NAS based on FreeBSD, what would be the required hardware to avoid stutter when transcoding 1080 stuff?
That's what I ask myself these days... :roll:
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Jan 07, 2011 3:26 pm

Re: Running server side on FreeBSD

fafa wrote:Now almost all my MKVs play properly. 720 are fine, 1080 stutter on my e6300 with 1g of ram.

The stutter is probably not due to your NAS, that could be network or dlna renderer (TV/Player) limitation.What is your sony model.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

kot

User avatar

DLNA master

Posts: 104

Joined: Sat Jan 08, 2011 5:36 pm

Post Sat Jan 08, 2011 5:49 pm

Re: Running server side on FreeBSD

I'm almost done with a FreeBSD port of Serviio -- and I already have the rc.d script. You can download the port-to-be (I've not committed it to the FreeBSD ports collection yet) here and perform a "make install"...

There is a problem with it in that it needs to be run with a valid X11-server specified as DISPLAY, for some reason. The script will launch the serviio-process as user "dlna" -- so that user will need to be able to read your (the user running X-session) ~/.Xauthority file. Something like this will be necessary to start the daemon after installing via my port:
  Code:
su
setenv DISPLAY :0
setenv XAUTHORITY ~$USER/.Xauthority
chgrp dlna $XAUTHORITY
chmod 640 $XAUTHORITY
/usr/local/etc/rc.d/serviio.sh forcestart

After it starts, you should be able to run serviio-console as yourself (/usr/local/bin/serviio-console).

But -- before starting the daemon -- be sure to check the log4j settings in /usr/local/etc/serviio first, though. Let me know, how it works for you -- I still have some strange issues, that I'll be asking about here. The database -- and its log-file -- will be under /var/db/serviio.
FreeBSD port of Serviio is now in the tree. Please, try using it and share your experience.
<<

dboy

Serviio lover

Posts: 51

Joined: Sat Nov 13, 2010 11:20 pm

Post Thu Jan 20, 2011 5:21 pm

Re: Running server side on FreeBSD

Kot,

kot wrote:I'm almost done with a FreeBSD port of Serviio -- and I already have the rc.d script. You can download the port-to-be (I've not committed it to the FreeBSD ports collection yet) here and perform a "make install"...


The link is dead, gives a 404 error.
<<

kot

User avatar

DLNA master

Posts: 104

Joined: Sat Jan 08, 2011 5:36 pm

Post Fri Jan 21, 2011 5:16 am

Re: Running server side on FreeBSD

dboy wrote:The link is dead, gives a 404 error.

Argh... Should be working again now...
FreeBSD port of Serviio is now in the tree. Please, try using it and share your experience.
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Jan 30, 2011 7:30 pm

Re: Running server side on FreeBSD

Is anyone here using an Intel Atom? Currently looking at running FreeNAS on a D525 (Dual Core 1.8GHz).
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
PreviousNext

Return to NAS installation

Who is online

Users browsing this forum: No registered users and 17 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.