FileBot 4.6 on Synology

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

FileBot 4.6 on Synology

Post by spz82 »

Hi,
I want to start using FileBot on my NAS (DS712+ Intel based), but have a problem with recent version.
But maybe first start with what I had with FileBot 4.5 installed from filebot_4.5_i686.ipk:

Code: Select all

synek> filebot -script fn:sysinfo
Jun 02, 2015 12:55:38 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
FileBot 4.5 (r2612)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: OK
chromaprint-tools: fpcalc version 1.1.0 (/opt/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.3.7
JRE: Java(TM) SE Runtime Environment 1.8.0_45 (headless)
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 2 Core / 239 MB Max Memory / 13 MB Used Memory
OS: Linux (i386)
uname: Linux synek 3.10.35 #5565 SMP Mon May 11 02:12:55 CST 2015 x86_64 GNU/Lin              ux synology_x86_712+

--- UPDATE AVAILABLE: FileBot 4.6 (r3052) ---
Then when I've installed filebot_4.6_noarch.ipk (there is no i686 version), and have such result:

Code: Select all

synek> filebot -script fn:sysinfo
FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-x86/libmediainfo.so) not found in resource path ([file:/opt/share/filebot/FileBot.jar])
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Jun 02, 2015 12:59:14 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Runtime Environment 1.8.0_45 (headless)
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 2 Core / 239 MB Max Memory / 12 MB Used Memory
OS: Linux (i386)
uname: Linux synek 3.10.35 #5565 SMP Mon May 11 02:12:55 CST 2015 x86_64 GNU/Lin              ux synology_x86_712+
Done ăž(ďź âăźâďź )ă
Notice errors:
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-x86/libmediainfo.so) not found in resource path ([file:/opt/share/filebot/FileBot.jar])
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory



The same result I got when try to install FileBot from synology package (according to instruction).
I've tried to manualy execute mediainfo and it works. From some reason FileBot 4.6 cannot find or load it.
Any suggestion?
User avatar
AsCavaco
Posts: 48
Joined: 05 May 2015, 17:04

Re: FileBot 4.6 on Synology

Post by AsCavaco »

hi there

The first error , you have to put the libzen file in the /volume1/@appstore/Filebot , if that is your filebot folder , once you do that , it will go away the errror , ou need both these files there - libmediainfo.so and libzen.so.

The Second error , you dont have the file fpcalc in /usr/local/chromaprint/bin , once you put the fpcalc there , it will stop the error , if you dont have that folder make it !!!


;)
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

sorry but you are wrong ;) first of all filebot installed from ipkg is not installed in /volume1/@appstore/Filebot (only the one from package is there).
secondly mediainfo files are in LD_LIBRARY_PATH path, but are not loaded.
later on I will analyze how exaclty libraries are searched by filebot, but
4.5 - works:

Code: Select all

synek> cat /opt/share/filebot/bin/filebot.sh
#!/bin/sh

# force JVM language and encoding settings
export LANG=en_US.utf8

java -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.analytics=true -Duser.home=/opt/share/filebot/data -Dapplication.dir=/opt/share/filebot/data -Djava.io.tmpdir=/opt/share/filebot/data/temp -Djna.library.path=/opt/share/filebot -Djava.library.path=/opt/share/filebot -Dnet.filebot.AcoustID.fpcalc=/opt/share/filebot/fpcalc -jar /opt/share/filebot/FileBot.jar "[email protected]"
4.6 - do not work:

Code: Select all

synek> cat /opt/share/filebot/bin/filebot.sh
#!/bin/sh

APP_ROOT="/opt/share/filebot"
APP_DATA="$APP_ROOT/data/$USER"

# add APP_ROOT to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]
then
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT"
else
    export LD_LIBRARY_PATH="$APP_ROOT"
fi

# force JVM language and encoding settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

java -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dnet.filebot.Archive.extractor=SevenZipExecutable "-Dnet.filebot.Archive.7z=7z" "-Dnet.filebot.AcoustID.fpcalc=fpcalc" "-Duser.home=$APP_DATA" "-Dapplication.dir=$APP_DATA" "-Djava.io.tmpdir=$APP_DATA/temp" -jar "$APP_ROOT/FileBot.jar" "[email protected]"
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

You're using Synology NAS. What are you using ipkg for?

Just READ THE MANUAL:
viewtopic.php?f=3&t=1802

I wrote a whole page dedicated to the SPK. Please read it. Pay attention to the part that says you should install the MediaInfo package from SynoCommunity.
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

Hi rednoah,
I'm using ipkg because it is easier to test, upgrade, revert changes etc, and I have the same problem on ipkg as on syno package.
As I wrote in the first post I already followed this instruction and have installed MediaInfo from SynoCommunity (and mediainfo works).
What I see now is FileBot.jar v4.6 is not able to load MediaInfo libraries.

Even when I use filebot.sh from working 4.5 version against FileBot.jar v4.6 libraries are not loaded (I do not change anything with regards to MediaInfo between upgrade from 4.5 to 4.6)
Regards,
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

The IPKG and SPK package ARE NOT THE SAME.

So please do yourself a favour and install FileBot, MediaInfo, AcoustID SPKs all via Package Manager from their respective Synology package sources, do not use IPKG, and you will find that everything works out-of-the-box.
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

I did not write that those are the same, but I've got the same behaviour.
At the begining I've star started with packages, but when got those errors I dig into, played with ipkg and then noticed that on ipkg filebot 4.5 it works while on any 4.6 it does not.

To prove it, I've just cleaned everything up, and installed 3 mentioned packages:
Image

and have the same problem:

Code: Select all

synek> filebot -script fn:sysinfo
FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-x86/libmediainfo.so) not found in resource path ([file:/volume1/@appstore/filebot/FileBot.jar])
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
chromaprint-tools: fpcalc -version failed (/usr/local/chromaprint/bin/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Runtime Environment 1.8.0_45 (headless)
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 2 Core / 239 MB Max Memory / 11 MB Used Memory
OS: Linux (i386)
uname: Linux synek 3.10.35 #5565 SMP Mon May 11 02:12:55 CST 2015 x86_64 GNU/Linux synology_x86_712+
Done ăž(ďź âăźâďź )ă
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

Run this command and post the output:

Code: Select all

ls -l /usr/local/mediainfo/lib
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

Code: Select all

synek> ls -l /usr/local/mediainfo/lib
lrwxrwxrwx    1 root     root            21 May 26 18:43 libmediainfo.so -> libmediainfo.so.0.0.0
lrwxrwxrwx    1 root     root            21 May 26 18:43 libmediainfo.so.0 -> libmediainfo.so.0.0.0
-rwxrwxrwx    1 root     root       6341080 May 26 18:44 libmediainfo.so.0.0.0
lrwxrwxrwx    1 root     root            13 May 26 18:22 libz.so -> libz.so.1.2.8
lrwxrwxrwx    1 root     root            13 May 26 18:22 libz.so.1 -> libz.so.1.2.8
-rwxrwxrwx    1 root     root        112328 May 26 18:44 libz.so.1.2.8
lrwxrwxrwx    1 root     root            15 May 26 18:22 libzen.so -> libzen.so.0.0.0
lrwxrwxrwx    1 root     root            15 May 26 18:22 libzen.so.0 -> libzen.so.0.0.0
-rwxrwxrwx    1 root     root        269880 May 26 18:44 libzen.so.0.0.0
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

1.
Then it should work but it doesn't. The library is broken. The executable might work, but the library is broken. Please report the problem => https://github.com/SynoCommunity/spksrc/issues

The fpcalc executable seems to be broken as well.

2.
Since You're on i386 Linux you can probably just use (extract) a working library from the official Linux releases or grab one from my repository. Then you just need to put it into the library path. See filebot.sh for details on that.

Same for the fpcalc executable if you need it. Just grab the official 32-bit Linux binary from AcoustID => https://acoustid.org/chromaprint
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

are you sure?
how do you explain that libraries are loaded properly by filebot 4.5 installed from ipkg?
please see first code in first post - both MediaInfo and chromeprint are recognized properly by this version.


btw I did not change ANYTHING in terms of both packages before 4.6 upgrade...
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

hmm just noticed that filebot 4.5 reports different MediaInfo version that installed from package:
MediaInfo: MediaInfoLib - v0.7.69 vs 0.7.73-2 in package details..

is it possible that filebot via ipkg also installs mediainfo?
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

FileBot 4.5 i386 ipk includes it's own fpcalc and libmediainfo binaries. That's why it works. That's why it says MediaInfo: MediaInfoLib - v0.7.69 and /opt/share/filebot/fpcalc in your first post even though you have "installed" a different version via SPKSRC.

The binaries that were previously included now have to be downloaded separately, as a last resort I suppose, if the SPKSRC builds don't work.
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

I've installed FileBot 4.5 i686, but in general you are right, it has it's own libraries and fpcalc
I've adjusted filebot.sh (this one for 4.6) to make use of those libraries and now it looks like this:

Code: Select all

synek> cat /volume1/@appstore/filebot/filebot.sh
#!/bin/sh
PRG="$0"

# resolve relative symlinks
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG="`dirname "$PRG"`/$link"
  fi
done

# make it fully qualified
WORKING_DIR=`pwd`
PRG_DIR=`dirname "$PRG"`
APP_ROOT=`cd "$PRG_DIR" && pwd`

# restore original working dir
cd "$WORKING_DIR"

# user per user app data location to avoid permission conflicts between root and admin users
APP_DATA="$APP_ROOT/data/$USER"

# add 3rd party packages to the library path by default
#SYNO_LIBRARY_PATH="/usr/local/mediainfo/lib"
SYNO_LIBRARY_PATH="/opt/share/filebot"

# add APP_ROOT to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]
then
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SYNO_LIBRARY_PATH:$APP_ROOT"
else
  export LD_LIBRARY_PATH="$SYNO_LIBRARY_PATH:$APP_ROOT"
fi

# force JVM language and encoding settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

java -Djava.awt.headless=true -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Djna.nosys=true -Dapplication.deployment=spk -Dnet.filebot.Archive.extractor=SevenZipExecutable "-Dnet.filebot.Archive.7z=/usr/syno/bin/7z" "-Dnet.filebot.AcoustID.fpcalc=/opt/share/filebot/fpcalc" "-Dapplication.dir=$APP_DATA" "-Djava.io.tmpdir=$APP_DATA/temp" "-Duser.home=$APP_DATA" -Djava.util.prefs.PreferencesFactory=net.filebot.util.prefs.FilePreferencesFactory "-Dnet.filebot.util.prefs.file=$APP_DATA/prefs.properties" -jar "$APP_ROOT/FileBot.jar" "[email protected]"

Now sysinfo seem to work as expected (with a little older Mediainfo and fpcalc):

Code: Select all

synek> filebot -script fn:sysinfo
FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.69
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
chromaprint-tools: fpcalc version 1.1.0 (/opt/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Runtime Environment 1.8.0_45 (headless)
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 2 Core / 239 MB Max Memory / 14 MB Used Memory
OS: Linux (i386)
uname: Linux synek 3.10.35 #5565 SMP Mon May 11 02:12:55 CST 2015 x86_64 GNU/Linux synology_x86_712+
Done ăž(ďź âăźâďź )ă
Thanks for your support and great tool.
Regards,
User avatar
rednoah
The Source
Posts: 18970
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot 4.6 on Synology

Post by rednoah »

Now that you've confirmed that the spksrc packages don't work, please report the problem so it might get fixed for others. ;)
:idea: Please read the FAQ and How to Request Help.
spz82
Posts: 11
Joined: 02 Jun 2015, 11:11

Re: FileBot 4.6 on Synology

Post by spz82 »

done: https://github.com/SynoCommunity/spksrc/issues/1738

btw.
I've just realized that there is separete Synology & Embedded Linux forum. Please move this thread there. Sorry for making mess ;)
User avatar
Axel Foley
Posts: 19
Joined: 27 Mar 2014, 15:47

Re: FileBot 4.6 on Synology

Post by Axel Foley »

Confirmed. With the latest MediaInfo 0.7.73-2 (that installs libemediainfo.so) and Chromeprint 1.2-1 (that installs fpcalc), both the library (libmediainfo.so) and the utility (fpcalc) have issues.

I have a DS1812+ with DSM 5.2-5565. Here's the uname output:

[Wed Jun 03 12:59:10 [email protected]:/volume1/@appstore/filebot]# uname -a
Linux nas 3.10.35 #5565 SMP Mon May 11 02:14:34 CST 2015 x86_64 GNU/Linux

@rednoah: I noticed that in the filebot.sh file there's a fixed path for fpcalc. It was driving me crazy because I put your fpcalc (from github) in /usr/local/bin but filebot wasn't picking it up. Then I found the chromeprint hard path in the script. Can I suggest to put that as an env variable in the script, as you do for the SYNO_LIBRARY_PATH, where I put the path to the libmediainfo.so downloaded from github.

Thanks a lot.
User avatar
AsCavaco
Posts: 48
Joined: 05 May 2015, 17:04

Re: FileBot 4.6 on Synology

Post by AsCavaco »

for me after i installed all the packages from syno comunity , the media info stoped working

Synology-1813> filebot -script fn:sysinfo
FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-x86/libmediainfo.so) not found in resource path ([file:/volume1/@appstore/filebot/FileBot.jar])
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
chromaprint-tools: fpcalc version 1.1.0 (/usr/local/chromaprint/bin/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_33 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Server VM
CPU/MEM: 4 Core / 878 MB Max Memory / 37 MB Used Memory
OS: Linux (i386)
uname: Linux Synology-1813 3.10.35 #5565 SMP Mon May 11 02:14:34 CST 2015 x86_64 GNU/Linux synology_cedarview_1813+
Done ヾ(@⌒ー⌒@)ノ


ony when i put the source rednoah gives in the repository it works again , is it because the syno packages are not working ???
User avatar
AsCavaco
Posts: 48
Joined: 05 May 2015, 17:04

Re: FileBot 4.6 on Synology

Post by AsCavaco »

Because i think on arm its working , look a friends ARM synology , that i installed using only syno comunity packages

NAS_Gouveia> filebot -script fn:sysinfo
FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.73
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
chromaprint-tools: fpcalc version 1.2.0 (/usr/local/chromaprint/bin/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_33 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 2 Core / 245 MB Max Memory / 11 MB Used Memory
OS: Linux (arm)
uname: Linux NAS_Gouveia 3.2.40 #5565 SMP Mon May 11 02:13:03 CST 2015 armv7l GNU/Linux synology_armadaxp_ds214+
Done ヾ(@⌒ー⌒@)ノ

On I386 , its not right ???
User avatar
AsCavaco
Posts: 48
Joined: 05 May 2015, 17:04

Re: FileBot 4.6 on Synology

Post by AsCavaco »

any guesses why on arm it works and on i386 it doesnt ???
Post Reply