FAQ  •  Register  •  Login

Setting up Serviio on my Synology DS110J NAS

<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Wed Feb 02, 2011 9:10 am

Re: Setting up Serviio on my Synology DS110J NAS

OK, the DS111 has the Marvell Kirkwood ARM CPU:
http://forum.synology.com/wiki/index.ph ... y_NAS_have

Anyone know which java I should use? Is JamVM ok? Or should I use something else? Doesn't seem to be much info about this...
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Wed Feb 02, 2011 1:42 pm

Re: Setting up Serviio on my Synology DS110J NAS

patters wrote:OK, the DS111 has the Marvell Kirkwood ARM CPU:
http://forum.synology.com/wiki/index.ph ... y_NAS_have

Anyone know which java I should use? Is JamVM ok? Or should I use something else? Doesn't seem to be much info about this...


just had a quick look on a few other forums and they seem to think there is a version of sunJRE that will work on your NAS but at the moment i can not find were to source it from.


EDIT:

java 1.6 is availible on ' ipkg ' if you know what that is...

ffmpeg is also availible there :)
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Wed Feb 02, 2011 9:38 pm

Re: Setting up Serviio on my Synology DS110J NAS

Finally got around to setting my DS111 up. Had to mess about making a DOS boot floppy (yes my machine is so old it has a floppy drive!) to use the WDIDLE3 utility to turn off the mental disk head parking on the Western Digital drives (it defaults to every 8 seconds - which is reckoned to kill the drive within a year!). It's almost silent now.
Really impressed with the management tool. Feels like an OS, but it's a web app. Now for the Java + Serviio part...

Would be great to one day see Serviio on here:
http://www.synology.com/enu/apps/3rd-party.php

Here are the instructions for getting ipkg (the package manager for embedded Linux systems) onto the system:
http://forum.synology.com/wiki/index.ph ... ,_ipkg_etc
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Thu Feb 03, 2011 1:03 am

Re: Setting up Serviio on my Synology DS110J NAS

Ok, can someone who has this up and running please tell me which JVM they used? There's almost no info about this. JamVM is 1.5 only, and if I grep the list of packages available to ipkg for "java" or "vm" or "jvm" or "jre" I get nothing useful.

Are people using the Embedded JRE directly from Oracle here? http://www.oracle.com/technetwork/java/ ... 59989.html
I see here that the CPU in my unit is a Marvell Kirkwood mv6282 which according to the Marvell spec sheet is "fully ARMv5TE compliant".

Oh dear, the ffmpeg binary in the package repo is nearly three years old :(

SynologyDS111> ipkg list | grep ffmpeg
ffmpeg - 0.svn20080409-3 - FFmpeg is an audio/video conversion tool.


EDIT - ah, I see that there's already a recent ffmpeg binary built-in:


SynologyDS111> ffmpeg
FFmpeg version SVN-r20167-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 23 2010 02:18:46 with gcc 4.2.1
configuration: --arch=arm --cross-prefix=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi- --extra-cflags=-fno-expensive-optimizations --enable-cross-compile --enable-shared --disable-static --disable-network --disable-devices --disable-filters --disable-swscale-alpha --disable-altivec --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-optimizations --disable-armvfp --disable-armv5te
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
At least one output file must be specified
Last edited by patters on Thu Feb 03, 2011 2:44 am, edited 2 times in total.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Thu Feb 03, 2011 2:16 am

Re: Setting up Serviio on my Synology DS110J NAS

I got that Oracle Embedded JRE (ARMv5 build) from the link above installed. I used the readme notes from within the archive. I put it in /opt/java. Is that an appropriate location?
I then set the JAVAHOME environment variable
  Code:
export JAVAHOME=/opt/java/ejre1.6.0_21

and added the Java bin folder to the PATH environment variable:
  Code:
export PATH=$PATH:/opt/java/ejre1.6.0_21/bin

I then extracted the Serviio archive into /opt (it makes its own folder). From the Serviio folder I ran bin/serviio.sh. The disk made some encouraging noises. I force quit after a bit with ctrl-c and lo and behold I see a log folder, containing the following. Hooray! I'll continue tomorrow night... :)
  Code:
SynologyDS111> cat serviio.log
2011-02-03 02:06:03,449 INFO  [MediaServer] ------------------------------------                                                                             ------------------------------------
2011-02-03 02:06:03,455 INFO  [MediaServer] Serviio DLNA media streaming server                                                                              v 0.5 (rev. 975aa458693c)
2011-02-03 02:06:03,455 INFO  [MediaServer] Petr Nejedly 2009-2011
2011-02-03 02:06:03,456 INFO  [MediaServer] http://www.serviio.org
2011-02-03 02:06:03,456 INFO  [MediaServer]
2011-02-03 02:06:03,456 INFO  [MediaServer] Java 1.6.0_21-Sun Microsystems Inc.
2011-02-03 02:06:03,457 INFO  [MediaServer] OS Linux arm 2.6.32.12
2011-02-03 02:06:03,457 INFO  [MediaServer] File encoding: US-ASCII
2011-02-03 02:06:03,457 INFO  [MediaServer] ------------------------------------                                                                             ------------------------------------
2011-02-03 02:06:04,040 INFO  [RestletServer] Starting Restlet server exposed on                                                                              localhost:23423
2011-02-03 02:06:04,332 INFO  [DBSchemaUpdateExecutor] Checking if DB schema nee                                                                             ds to be updated
2011-02-03 02:06:13,223 INFO  [DBSchemaUpdateExecutor] Updating DB schema
2011-02-03 02:06:22,357 INFO  [ProfilesDefinitionParser] Parsing Profiles defini                                                                             tion
2011-02-03 02:06:24,068 INFO  [ProfilesDefinitionParser] Added profile 'Generic                                                                              DLNA profile' (id=1)
2011-02-03 02:06:24,511 INFO  [ProfilesDefinitionParser] Added profile 'Samsung                                                                              TV (B-series)' (id=2)
2011-02-03 02:06:25,239 INFO  [ProfilesDefinitionParser] Added profile 'XBox 360                                                                             ' (id=3)
2011-02-03 02:06:25,466 INFO  [ProfilesDefinitionParser] Added profile 'Playstat                                                                             ion 3' (id=4)
2011-02-03 02:06:25,724 INFO  [ProfilesDefinitionParser] Added profile 'Samsung                                                                              TV (A-series)' (id=5)
2011-02-03 02:06:25,957 INFO  [ProfilesDefinitionParser] Added profile 'DirecTV                                                                              HD-DVR' (id=6)
2011-02-03 02:06:26,276 INFO  [ProfilesDefinitionParser] Added profile 'Samsung                                                                              TV / player (C-series)' (id=7)
2011-02-03 02:06:26,453 INFO  [ProfilesDefinitionParser] Added profile 'LG BD pl                                                                             ayer' (id=8)
2011-02-03 02:06:27,066 INFO  [ProfilesDefinitionParser] Added profile 'Sony Bra                                                                             via TV' (id=9)
2011-02-03 02:06:28,834 INFO  [ProfilesDefinitionParser] Added profile 'Sony BD                                                                              Player (EU)' (id=10)
2011-02-03 02:06:30,799 INFO  [ProfilesDefinitionParser] Added profile 'Sony BD                                                                              Player (US)' (id=11)
2011-02-03 02:06:31,132 INFO  [ProfilesDefinitionParser] Added profile 'Panasoni                                                                             c Viera' (id=12)
2011-02-03 02:06:31,457 INFO  [ProfilesDefinitionParser] Added profile 'Toshiba                                                                              Rezga' (id=13)
2011-02-03 02:06:31,584 INFO  [VideoDeliveryEngine] Cleaning transcode engine an                                                                             d its data
2011-02-03 02:06:31,703 INFO  [WebServer] Socket buffer set to 65535 bytes
2011-02-03 02:06:31,865 INFO  [WebServer] WebServer starting on port 8895
2011-02-03 02:06:31,910 INFO  [Device] Created UPnP Device with UUID: c41c5514-0                                                                             d79-3774-967b-023b9e31d01f, bound address: 192.168.0.2
2011-02-03 02:06:32,016 INFO  [CompositeCacheManager] Creating cache manager fro                                                                             m config file: /cache.ccf
2011-02-03 02:06:32,044 INFO  [ThreadPoolManager] thread_pool.default PoolConfig                                                                             uration = useBoundary = [true] boundarySize = [2000] maximumPoolSize = [150] min                                                                             imumPoolSize = [4] keepAliveTime = [300000] whenBlockedPolicy = [RUN] startUpSiz                                                                             e = [4]
2011-02-03 02:06:32,058 INFO  [CompositeCacheConfigurator] Setting default auxil                                                                             iaries to null
2011-02-03 02:06:32,059 INFO  [CompositeCacheConfigurator] No special CompositeC                                                                             acheAttributes class defined for key [jcs.default.cacheattributes], using defaul                                                                             t class.
2011-02-03 02:06:32,066 INFO  [CompositeCacheConfigurator] setting defaultCompos                                                                             iteCacheAttributes to [ useLateral = true, useRemote = true, useDisk = true, max                                                                             Objs = 100, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2011-02-03 02:06:32,066 INFO  [CompositeCacheConfigurator] No special ElementAtt                                                                             ribute class defined for key [jcs.default.elementattributes], using default clas                                                                             s.
2011-02-03 02:06:32,067 INFO  [CompositeCacheConfigurator] setting defaultElemen                                                                             tAttributes to [ IS_LATERAL = true, IS_SPOOL = true, IS_REMOTE = true, IS_ETERNA                                                                             L = true, MaxLifeSeconds = -1, IdleTime = -1, CreateTime = 1296698792067, LastAc                                                                             cessTime = 1296698792067, getTimeToLiveSeconds() = -1, createTime = 129669879206                                                                             7 ]
2011-02-03 02:06:32,080 INFO  [CompositeCacheConfigurator] No special ElementAtt                                                                             ribute class defined for key [jcs.region.local_resetafterplay.elementattributes]                                                                             , using default class.
2011-02-03 02:06:32,150 INFO  [LRUMemoryCache] initialized LRUMemoryCache for lo                                                                             cal_resetafterplay
2011-02-03 02:06:32,151 INFO  [CompositeCache] Constructed cache with name [loca                                                                             l_resetafterplay] and cache attributes [ useLateral = true, useRemote = true, us                                                                             eDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2011-02-03 02:06:32,152 INFO  [CompositeCacheConfigurator] No special ElementAtt                                                                             ribute class defined for key [jcs.region.local_default.elementattributes], using                                                                              default class.
2011-02-03 02:06:32,152 INFO  [LRUMemoryCache] initialized LRUMemoryCache for lo                                                                             cal_default
2011-02-03 02:06:32,153 INFO  [CompositeCache] Constructed cache with name [loca                                                                             l_default] and cache attributes [ useLateral = true, useRemote = true, useDisk =                                                                              true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = 0 ]
2011-02-03 02:06:32,153 INFO  [CompositeCacheConfigurator] Parsed regions [local                                                                             _resetafterplay, local_default]
2011-02-03 02:06:32,153 INFO  [CompositeCacheConfigurator] Finished configuratio                                                                             n in 100 ms.
2011-02-03 02:06:32,165 INFO  [DiscoveryAdvertisementNotifier] Starting Discover                                                                             yAdvertisementNotifier
2011-02-03 02:06:32,165 INFO  [EventDispatcher] Starting EventDispatcher
2011-02-03 02:06:32,166 INFO  [EventSubscriptionExpirationChecker] Starting Even                                                                             tSubscriptionExpirationChecker
2011-02-03 02:06:32,195 INFO  [DiscoverySSDPMessageListener] Starting DiscoveryS                                                                             SDPMessageListener using interface eth0 (eth0) and address 192.168.0.2, timeout                                                                              = 0
2011-02-03 02:06:32,209 INFO  [RendererSearchSender] Searching for Renderer devi                                                                             ces
2011-02-03 02:06:32,225 INFO  [RendererExpirationChecker] Starting RendererExpir                                                                             ationChecker
2011-02-03 02:06:35,045 INFO  [RendererManager] Stored a new renderer: uuid='5cd                                                                             38c52-960f-4e14-822e-a258360fdf11', name = 'Unrecognized device', ipAddress='192                                                                             .168.0.1', profile = '1'
2011-02-03 02:06:58,395 INFO  [LibraryAdditionsCheckerThread] Started looking fo                                                                             r newly added files
2011-02-03 02:06:58,460 INFO  [LibraryUpdatesCheckerThread] Started looking for                                                                              updates to currently shared files
2011-02-03 02:07:33,930 INFO  [LibraryAdditionsCheckerThread] Finished looking f                                                                             or newly added files
2011-02-03 02:07:33,933 INFO  [WebServer] WebServer shutting down
2011-02-03 02:07:33,945 INFO  [DiscoveryAdvertisementNotifier] Leaving Discovery                                                                             AdvertisementNotifier
2011-02-03 02:07:33,946 INFO  [EventSubscriptionExpirationChecker] Leaving Event                                                                             SubscriptionExpirationChecker, removing all event subscriptions
2011-02-03 02:07:33,947 INFO  [EventDispatcher] Leaving EventDispatcher
2011-02-03 02:07:33,954 INFO  [DiscoverySSDPMessageListener] Leaving DiscoverySS                                                                             DPMessageListener
2011-02-03 02:07:33,966 INFO  [DatabaseManager] Shutting down database
2011-02-03 02:07:34,126 INFO  [VideoDeliveryEngine] Cleaning transcode engine an                                                                             d its data
SynologyDS111>
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Feb 03, 2011 9:27 am

Re: Setting up Serviio on my Synology DS110J NAS

That is looking good. The FFmpeg, though, may be built in 2010, but revision number 20k-something is quite old. Serviio currently bundles 26xxx revision build.
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Thu Feb 03, 2011 11:09 am

Re: Setting up Serviio on my Synology DS110J NAS

Though I have occasionally played with Linux systems since 1999 when I first tried RedHat 5.0, dabbling with penetration testing distros, and having owned a hacked TiVo, and an NLSU2 NAS - literally the only thing I have ever managed to compile successfully was a 3dfx driver which wasn't distributed as a binary. Literally everything else I have ever tried fails to compile and when you ask on forums they always suggest making a ton of edits to the makefile. Since I'm not able to intuitively spot these, I'm not too confident about my chances of compiling a newer FFmpeg. :) Are you set up to potentially cross-compile one, or is that the sort of thing that has a minuscule success rate?

EDIT - This seems promising...
http://plugcomputer.org/plugforum/index.php?topic=848.0
Last edited by patters on Fri Feb 04, 2011 2:57 am, edited 1 time in total.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Thu Feb 03, 2011 1:15 pm

Re: Setting up Serviio on my Synology DS110J NAS

patters wrote:Though I have occasionally played with Linux systems since 1999 when I first tried RedHat 5.0, dabbling with penetration testing distros, and owning a hacked TiVo, and an NLSU2 NAS - literally the only thing I have ever managed to compile successfully was a 3dfx driver which wasn't distributed as a binary. Literally everything else I have ever tried fails to compile and when you ask on forums they always suggest making a ton of edits to the makefile. Since I'm not able to intuitively spot these, I'm not too confident about my chances of compiling a newer FFmpeg. :) Are you set up to potentially cross-compile one, or is that the sort of thing that has a minuscule success rate?

EDIT - This seems promising...
http://plugcomputer.org/plugforum/index.php?topic=848.0


link look good to me patter give it a shot and go from there.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Thu Feb 03, 2011 3:16 pm

Re: Setting up Serviio on my Synology DS110J NAS

I don't even know what the free toolchain of choice is. Any suggestions?
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Fri Feb 04, 2011 2:24 am

Re: Setting up Serviio on my Synology DS110J NAS

Ok, did some more testing. I couldn't get the remote console working and I didn't want to start messing with host files so I decided to go for AcidumIrae's excellent PHP Web UI, since it's neater to be able to access the console from any device around the house, including iPhone :)

The real beauty on a Synology running DSM 3.0 is that it's already running PHP. All you need to do is go to Control Panel -> Web Services > Web Applications > Enable Web Station. This creates the folder /volume1/web. Use the root account to put the extracted Web UI files in say /volume1/web/serviio and browse to http://yourNASip/serviio and it just works - no configuration required at all. So simple!

I found that Serviio does occasionally throw errors to the console. I haven't investigated in detail (debug logging wasn't enabled) but here's the error:
  Code:
SynologyDS111> Exception in thread "Thread-14" java.lang.StringIndexOutOfBoundsException: String index out of range: -6
        at java.lang.String.substring(String.java:1937)
        at java.lang.String.substring(String.java:1904)
        at org.serviio.upnp.webserver.AbstractRequestHandler.getRequestPathFields(AbstractRequestHandler.java:100)
        at org.serviio.upnp.webserver.ServiceEventSubscriptionRequestHandler.handleRequest(ServiceEventSubscriptionRequestHandler.java:61)
        at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:52)
        at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
        at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
        at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
        at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)
Exception in thread "Thread-15" java.lang.StringIndexOutOfBoundsException: String index out of range: -6
        at java.lang.String.substring(String.java:1937)
        at java.lang.String.substring(String.java:1904)
        at org.serviio.upnp.webserver.AbstractRequestHandler.getRequestPathFields(AbstractRequestHandler.java:100)
        at org.serviio.upnp.webserver.ServiceEventSubscriptionRequestHandler.handleRequest(ServiceEventSubscriptionRequestHandler.java:61)
        at org.serviio.upnp.webserver.AbstractRequestHandler.handle(AbstractRequestHandler.java:52)
        at org.apache.http.protocol.HttpService.doService(HttpService.java:293)
        at org.serviio.upnp.webserver.ServiioHttpService.doService(ServiioHttpService.java:58)
        at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:212)
        at org.serviio.upnp.webserver.WebServer$WorkerThread.run(WebServer.java:187)
SynologyDS111>


I then tried playing a few clips on my Sony BDP and I discovered a fairly serious problem - the /tmp folder which Serviio defaults to using for transcoding seems to be on a partition with very limited space on these units. I couldn't log into my NAS at all (it tells you that it has run out of diskspace), but luckily I had an SSH session open so I was able to find /tmp/serviio and delete the offending file.
So on a Synology we need to configure the temp path in the transcoding tab of the console to use something like /volume1/@tmp which is stored on the main data partition.

Now how on earth to compile a newer FFmpeg... More clues here:
http://forum.synology.com/enu/viewtopic ... 37&t=21068
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Sat Feb 05, 2011 1:27 am

Re: Setting up Serviio on my Synology DS110J NAS

Installing the developer tools (ipkg install optware-devel) will break the wget binary. It claims it clashes with wget-ssl or something. I then stupidly ran ipkg remove wget, which then prevents you from downloading any packages at all. Wget is still present, but it's linked to a missing library. Fortunately the solution is here:
http://forum.synology.com/enu/viewtopic ... 40&t=15087

Once you copy the wget binary from the Synology's software back into /opt/bin it's fine. Then you can re-run ipkg install optware-devel to get past the point where it failed.

Next we need to run ipkg install lame because the FFmpeg compile depends on this.

Then using a few examples I saw of compiling on ARM and looking at the options used for the Windows-compiled FFmpeg that Zip included with Serviio I ran this configure command in the folder of the source code I got from the Serviio downloads page.

  Code:
./configure --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --arch=arm --enable-runtime-cpudetect --target-os=linux --enable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-iwmmxt --disable-mmi --disable-neon


I ran make (slow with loads of warnings but no actual errors), then I ran make install. Seemed ok.

I've got it built but when I run ffmpeg from the command line it prefers the old one that's already in the path. Because I didn't supply a prefix in the configure options, the newly compiled one is in /usr/local/bin. If I go there and run ./ffmpeg I get this error:

  Code:
./ffmpeg: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory


I've read that I need to use the command ldd on the binary to list the dependencies but that's not installed, nor is it on ipkg.
The bzip2 ipkg package is installed, but that library is nowhere on my system.

EDIT - found and compiled libbz2 using the source here:
http://bzip.org/downloads.html
From the readme you'll see you need make -f Makefile-libbz2_so to build the library. I manually copied it over to /lib and made the symlink to the filename FFmpeg is looking for.

Now it wants libz. :(

EDIT 2 - Got that from http://www.zlib.net/
Run ./configure, then make. Don't bother installing it, it won't be detected. Manually copy the binary to /lib and create the symlinks to match what it made in the compilation folder.

And then... HOLY FRICKING COW! I DID IT! :D

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 5 2011 01:38:10 with gcc 4.2.3
configuration: --enable-static --disable-shared --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --arch=arm --enable-runtime-cpudetect --target-os=linux --enable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-iwmmxt --disable-mmi --disable-neon
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
SynologyDS111>
Last edited by patters on Sun Feb 06, 2011 1:18 am, edited 2 times in total.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Feb 05, 2011 11:03 am

Re: Setting up Serviio on my Synology DS110J NAS

congrats patters :!:

maybe you could compile all the bits into 1 tutorial topic and we can make it stricky
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Sat Feb 05, 2011 1:54 pm

Re: Setting up Serviio on my Synology DS110J NAS

Will do once I've tidied up all the loose ends. Now I need to get my head around where I should be installing these user-compiled binaries so they survive updates of the Synology DSM software (I think I should be using /opt/bin and /opt/lib). Also I need to figure what to put in init.rc to get Serviio running at bootup and so on.

It would be fantastic to get it all built into a Synology package, but I think there are several barriers to that. One possibly being that Serviio is not open source, and the other being that there are at least three different CPU architectures for these NASes (some are Freescale PPC, some are Marvell ARM, and others are Intel Atom), and different models of each so it may well just be better for people to compile. It's not hard though once someone like me has outlined all the steps (and stupid pitfalls). What I really find irritating are the people who post things like "please help me to install/compile this". Then they respond to their thread with "I fixed it" but with no information to help anyone else.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Sat Feb 05, 2011 3:01 pm

Re: Setting up Serviio on my Synology DS110J NAS

I've just tested it running and it seems to be able to transcode dts audio in hi-def mkv down to 2 channel ac3 in m2ts ok. The CPU use leaps up to 100% but I guess that's because it's running ahead transcoding down to the end of the file (and is CPU-bound).

If I play something that's only remuxing mkv to m2ts (copying streams) then the CPU stays at around 40% (because it's I/O-bound) then 5 mins into a film it falls away to pretty much idle - I guess it has finished remuxing.


Memory use even while running Serviio is around 20% at idle, 30% during a remux with audio transcode. I have a 2011 product so it has 256MB of RAM. This seems to indicate that the value line of products (with the J suffix) like the DS110J should run Serviio on their 128MB. They only have an 800MHz CPU though (Vs 1.6GHz on mine), so it would need testing by someone.

All in all it would seem that the Synology products are very capable Serviio appliances!
Last edited by patters on Sun Feb 06, 2011 12:55 pm, edited 2 times in total.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Sun Feb 06, 2011 1:27 am

Re: Setting up Serviio on my Synology DS110J NAS

I have read up on the configure options for compiling FFmpeg and have refined the config, removing unnecessary disables, and sorting out the paths to use /opt:
  Code:
./configure --arch=arm --enable-armv5te --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

It takes around 25 minutes to compile on the NAS.

For info - the CPU features of the Marvell Kirwood mv6282 are:
  Code:
SynologyDS111> cat /proc/cpuinfo
Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1589.24
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Synology 6282 board
Revision        : 0000
Serial          : 0000000000000000
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Feb 06, 2011 11:39 am

Re: Setting up Serviio on my Synology DS110J NAS

patters wrote:Memory use even while running Serviio is around 20% at idle, 30% during a remux with audio transcode. I have a 2011 product so it has 256MB of RAM. This seems to indicate that the value line of products (with the J suffix) like the DS110J should run Serviio on their 128MB. They only have an 800MHz CPU though (Vs 1.6GHz on mine), so it would need testing by someone.

Normally Serviio doen't require much memory but 385MB is recommended for when you index high def (ie 16 mpix) pictures - it loads it all into bitmap memory to resize for thumbnails.
<<

Zek

User avatar

Serviio lover

Posts: 72

Joined: Wed Nov 24, 2010 11:03 am

Location: Boulder, Colorado, USA

Post Sun Feb 06, 2011 10:58 pm

Re: Setting up Serviio on my Synology DS110J NAS

patters wrote:I've just tested it running and it seems to be able to transcode dts audio in hi-def mkv down to 2 channel ac3 in m2ts ok. The CPU use leaps up to 100% but I guess that's because it's running ahead transcoding down to the end of the file (and is CPU-bound).


Holy shit patters. If an ARM can do that then yes all Synology boxes should be able to. Been reading up on Atom D510 optimizations but it seems like won't have to if your ARM can take the heat. Nice work man.

if you write up a page like Zip said I'll get fired up and adapt it for my 1010+ with the Atom D510 in it.

Cheers,
Zek
Sony Bravia KDL-55NX810 | Serviio 0.5 (rev. 975aa458693c) | Synology DS-1010+
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Mon Feb 07, 2011 2:31 am

Re: Setting up Serviio on my Synology DS110J NAS

Ok fellas. It's taken me the best part of the whole day to write up, and it's so complex that I've decided to make it a blog post on account of improved presentation options, and the hundreds of edits it took, but here it is:
http://pcloadletter.co.uk/2011/02/07/se ... h-arm-cpu/

It works beautifully! Well, it's clearly never going to manage realtime video transcoding, but it does audio transcoding and remuxing fine.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Feb 07, 2011 9:38 am

Re: Setting up Serviio on my Synology DS110J NAS

brilliant mate.
<<

patters

User avatar

DLNA master

Posts: 1282

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Mon Feb 07, 2011 6:35 pm

Re: Setting up Serviio on my Synology DS110J NAS

Just logged into my NAS after leaving it running Serviio all day and I see that the Resource Monitor clains 70% RAM is in use - the physical RAM is 256MB.
Running top gives this, which looks like Serviio is allocated 512MB of virtual memory:

  Code:
Mem: 229312K used, 26472K free, 0K shrd, 7344K buff, 37812K cached
CPU:  1.9% usr  0.5% sys  0.0% nic 97.4% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.00 0.00 0.00 1/108 15306
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 1955     1 root     S    12672  4.9  0.2 /usr/syno/bin/scemd
 2597  2592 serviio  S     524m209.8  0.0 /opt/java/ejre1.6.0_21/bin/java -Xmx384M -Djava.net.preferIPv4Stack=true -Dderby.system.home=/opt/serviio/library -Dserviio.home=/opt/serviio -classpath /opt/serviio
 2574  2513 nobody   S    59936 23.4  0.0 /usr/syno/apache/bin/httpd
 3195  2513 nobody   S    59672 23.3  0.0 /usr/syno/apache/bin/httpd
11280  2513 nobody   S    59672 23.3  0.0 /usr/syno/apache/bin/httpd
17057  2513 nobody   S    59664 23.3  0.0 /usr/syno/apache/bin/httpd
 3703  2513 nobody   S    59540 23.2  0.0 /usr/syno/apache/bin/httpd
 2513     1 root     S    58920 23.0  0.0 /usr/syno/apache/bin/httpd
 2309  1495 admin    S    34804 13.6  0.0 postgres: admin photo [local] idle
 1497  1495 admin    S    33896 13.2  0.0 postgres: writer process
...


I stopped and restarted Serviio using my daemon script and it's back to reporting around 30% memory used, but the top output looks similar:
  Code:
Mem: 191580K used, 64204K free, 0K shrd, 6656K buff, 95308K cached
CPU: 73.9% usr  1.3% sys  0.0% nic 24.5% idle  0.1% io  0.0% irq  0.0% sirq
Load average: 0.13 0.13 0.06 2/100 25709
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
21372 21367 serviio  S     510m204.3 72.3 /opt/java/ejre1.6.0_21/bin/java -Xmx384M -Djava.net.preferIPv4Stack=true -Dderby.system.home=/opt/serviio/library -Dserviio.home=/opt/serviio -classpath /opt/serviio
 1955     1 root     S    12672  4.9  0.4 /usr/syno/bin/scemd
 2574  2513 nobody   S    59936 23.4  0.0 /usr/syno/apache/bin/httpd
 3195  2513 nobody   S    59672 23.3  0.0 /usr/syno/apache/bin/httpd
11280  2513 nobody   S    59672 23.3  0.0 /usr/syno/apache/bin/httpd
17057  2513 nobody   S    59664 23.3  0.0 /usr/syno/apache/bin/httpd
 3703  2513 nobody   S    59540 23.2  0.0 /usr/syno/apache/bin/httpd
 2513     1 root     S    58920 23.0  0.0 /usr/syno/apache/bin/httpd
 2309  1495 admin    S    34804 13.6  0.0 postgres: admin photo [local] idle
 1497  1495 admin    S    33896 13.2  0.0 postgres: writer process
 1495     1 admin    S    33756 13.1  0.0 /usr/syno/pgsql/bin/postgres -D /var/services/pgsql --config_file=/usr/syno/pgsql/etc/postgresql.conf --hba_file=/usr/syno/pgsql/etc/pg_hba.conf
 1498  1495 admin    S    33756 13.1  0.0 postgres: wal writer process
 1934     1 root     S N  20936  8.1  0.0 /usr/syno/sbin/synoindexd
 2360     1 root     S    19612  7.6  0.0 /usr/syno/sbin/smbd -D
 2362  2360 root     S    19612  7.6  0.0 /usr/syno/sbin/smbd -D
...


CPU use is high (presumably it's checking for new content, which I have backed off to once every 2 hours to prevent the drive spinning up), but I have a much bigger library than when I was first testing (40GB of music and about 200GB of films). Is this a healthy expected situation - more of the DB being cached for instance - or could there be memory leak somewhere?
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.1 package for Synology NAS - with limited hardware transcoding support!
PreviousNext

Return to NAS installation

Who is online

Users browsing this forum: No registered users and 9 guests

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