Page 1 of 1

[QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 04:54
by StuartP
Hi folks,

Alright, I've been working on this for about a day and I'm just lost. My linux skills are pretty average, but as far as I can tell I'm doing everything right but it just won't work...

I'm running a QNAP 419P. I've followed just about every guide I can find which seemed useful and it's gotten me to the point I'm at now. I'm hoping someone here can help me get the last mile.

Mediainfo I managed to get installed and is working, if I use "# mediainfo file/location/name" it spits out a big chunk of information. All looks very nice.

But if I run filebot -script fn:sysinfo I get the following:

Code: Select all

FileBot 4.0 (r2056)
JNA Native: 4.0.0
May 26, 2014 10:19:48 AM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/share/HDA_DATA/.qpkg/Optware/local/bin/filebot/FileBot.jar])
Java HotSpot(TM) Embedded Client VM warning: You have loaded library /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so: /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so: ELF file version does not match current one (Possible cause: endianness mismatch)
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: DISABLED
Groovy Engine: 2.2.0
Java(TM) SE Embedded Runtime Environment 1.8.0 (headless)
32-bit Java HotSpot(TM) Embedded Client VM
Linux (arm)
Linux KilNAS 2.6.33.2 #1 Sat Apr 12 05:57:06 CST 2014 armv5tel unknown
Done ヾ(@⌒ー⌒@)ノ
Now, I downloaded the libmediainfo.so, libzen.so and lib7-Zip-JBinding.so from here and placed them in my filebot directory (/opt/local/bin/filebot) but filebot doesn't seem to be seeing them or, in the case of 7-Zip, doesn't seem to like them.

I'm guessing I need to download and compile the *.so sources for myself, but can't seem to find where to get them. Ideas? Suggestions?

(Also, if anyone could explain the difference between fn:renall and fn:amc, that'd be dandy. From what I can tell they both rename and move things, but amc can also notify my xbmc?)

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 05:53
by rednoah
1.
Currently there's only ARM binaries for ARMv7 so ARMv5 is not supported.

So if you need mediainfo support you will need to compile the libmediainfo.so yourself.

I used this project to cross-compile the ARM v6/7 binaries so it might be easy to do v5 as well, if it works at all that is:
https://github.com/SynoCommunity/spksrc

EDIT:
Tried with spksrc and it seems the syno sdk armv5 cross compiler crashes. You'll figure this out for yourself, and more importantly you need to ask yourself if you really need any of the optional mediainfo features. ;)

2.
amc script => 520 lines
renall script => 20 lines

amc docs => multiple pages
renall docs => 2 lines

Naturally amc and renall are not similar at all, and are in fact completely different in every possible aspect, and a simple -rename call can do "rename and move things". Just read the docs, they're completely different, as are the scripts.

https://github.com/filebot/scripts/blob ... amc.groovy
https://github.com/filebot/scripts/blob ... all.groovy

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 07:05
by StuartP
1.
Could I not just download the source for the .so files and compile them on the NAS to save cross compiling?

No, I don't /need/ mediainfo, but it would certainly be nice.

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 07:50
by rednoah
Then grab the source and go for it ;)
http://mediaarea.net/en/MediaInfo/Download/Source

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 13:35
by StuartP
Ok... That seems to have worked. I now seem to have a functional libmediainfo.so. fn:sysinfo now provides:

Code: Select all

FileBot 4.0 (r2056)
JNA Native: 4.0.0
May 26, 2014 9:33:36 PM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
MediaInfo: MediaInfoLib - v0.7.69
Java HotSpot(TM) Embedded Client VM warning: You have loaded library /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so: /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so: ELF file version does not match current one (Possible cause: endianness mismatch)
chromaprint-tools: fpcalc -version failed (fpcalc)
Extended Attributes: DISABLED
Groovy Engine: 2.2.0
Java(TM) SE Embedded Runtime Environment 1.8.0 (headless)
32-bit Java HotSpot(TM) Embedded Client VM
Linux (arm)
Linux KilNAS 2.6.33.2 #1 Sat Apr 12 05:57:06 CST 2014 armv5tel unknown
Done ヾ(@⌒ー⌒@)ノ
Anyone able to advise where I get the source code for 7-zip and ZenLib nescessary for compiling their respective .so files?

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 14:54
by rednoah
1.
ZenLib is part of the mediainfo project, and it's only required by libmediainfo.so not filebot itself.

2.
7-Zip-JBinding Code => https://sourceforge.net/p/sevenzipjbind ... ster/tree/

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 15:19
by StuartP
1.
So the "WARNING: Failed to preload libzen" isn't a concern?
I thought that was because I didn't have an appropriate libzen.so...

2.
Thank you very much. =)

3.
The command:

Code: Select all

filebot --action test -script fn:amc . --output /share/TVArchive -non-strict --format "{n}/Season {s}/{n} - S{s.pad(2)}E{e.pad(2)} - {t}{'.'+lang.getDisplayName(Locale.ENGLISH)}{pad(1)+{'('+{ac}{'-'+af}+pad(1)+{vc}{'-'+vf}+')'}}" --def xbmc=192.168.1.68 --db thetvdb
Produces:

Code: Select all

Argument: /share/HDA_DATA/Qdownload/test
May 26, 2014 9:23:55 PM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x4caa9744, pid=32762, tid=1082504336
#
# JRE version: Java(TM) SE Embedded Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Embedded Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C  [jna6648950137756023307.tmp+0x12744]  ffi_prep_cif_machdep+0x16c
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /share/HDA_DATA/Qdownload/test/hs_err_pid32762.log
Segmentation fault
I currently believe this to be related to the lib7-zip as sysinfo gives a warning about:

Code: Select all

Java HotSpot(TM) Embedded Client VM warning: You have loaded library /share/HDA_DATA/.qpkg/Optware/local/bin/filebot/lib7-Zip-JBinding.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
I'm just mentioning it here in case it's not related and there's a known fix, as it'll probably be a while before I finish compiling 7zips jbindings to test again.

Re: [QNAP 419P] Filebot + MediaInfo = Help?

Posted: 26 May 2014, 16:44
by rednoah
1.
It's just a warning. So if a call to libmediainfo crashes the process you probably will know why.

3.
If you suspect any native code crashing the process, just remove the libraries.