MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
viceversa
Posts: 6
Joined: 05 Oct 2016, 19:34

MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Post by viceversa »

Well, I updated my QNAP today to 4.3 which is now a full 64 bit environment so I thought I'd give a crack at getting mediainfo to work. My QNAP is a TS-451+ with Intel processor and 64 bit kernel and use entware-ng for package management. I gathered the compiled libraries from https://github.com/filebot/filebot/tree ... inux-amd64

and placed them into the needed directory:

APP_ROOT="/opt/share/filebot"
LD_LIBRARY_PATH: /opt/share/filebot

I also needed to place fpcalc over in "/opt/bin/" and filebot seems to pick it up just fine. libzen also appears to be picked up by filebot (as its not complaining about it missing when I run "filebot -script fn:sysinfo").

What my current problem is i'm running into an exception when trying to load libmediainfo.so

Code: Select all

[/opt/share/filebot/bin] # filebot -script fn:sysinfo
FileBot 4.7.2 (r4178)
JNA Native: 4.0.1
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path ([file:/share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/filebot/FileBot.jar])
Apache Commons VFS: [zip, rar]
Chromaprint: 1.1.0
Extended Attributes: OK
Script Bundle: 2016-11-07 (r458)
Groovy: 2.4.7
JRE: Java(TM) SE Runtime Environment 1.8.0_101 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 16 MB Used Memory
OS: Linux (amd64)
Package: IPKG
Data: /share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/filebot/data/admin
uname: Linux qfano 4.2.8 #1 SMP Sun Dec 11 01:13:24 CST 2016 x86_64 GNU/Linux
Running a strace -f filebot -script fn:sysinfo yields this:

Code: Select all

[pid 18062] open("/share/CACHEDEV1_DATA/.qpkg/JRE/jre/bin/../lib/amd64/jli/libmediainfo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18062] open("/share/CACHEDEV1_DATA/.qpkg/JRE/jre/bin/../lib/amd64/libmediainfo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18062] open("/opt/share/filebot/libmediainfo.so", O_RDONLY|O_CLOEXEC) = 17
[pid 18062] lstat("/lib/libmediainfo.so", 0x7f2afa00a670) = -1 ENOENT (No such file or directory)
[pid 18062] stat("/lib64/libmediainfo.so", 0x7f2afa00d3c0) = -1 ENOENT (No such file or directory)
[pid 18062] lstat("/usr/lib/libmediainfo.so", 0x7f2afa00a670) = -1 ENOENT (No such file or directory)
[pid 18062] stat("/usr/lib/libmediainfo.so", 0x7f2afa00d3c0) = -1 ENOENT (No such file or directory)
[pid 18062] lstat("/lib/libmediainfo.so", 0x7f2afa00a670) = -1 ENOENT (No such file or directory)
[pid 18062] stat("/lib/libmediainfo.so", 0x7f2afa00d3c0) = -1 ENOENT (No such file or directory)
[pid 18062] lstat("/usr/local/lib/libmediainfo.so", 0x7f2afa00a670) = -1 ENOENT (No such file or directory)
[pid 18062] stat("/usr/local/lib/libmediainfo.so", 0x7f2afa00d3c0) = -1 ENOENT (No such file or directory)
[pid 18062] open("/share/CACHEDEV1_DATA/.qpkg/JRE/jre/bin/../lib/amd64/jli/libmediainfo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18062] open("/share/CACHEDEV1_DATA/.qpkg/JRE/jre/bin/../lib/amd64/libmediainfo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18062] open("/opt/share/filebot/libmediainfo.so", O_RDONLY|O_CLOEXEC) = 17
[pid 18062] write(1, "MediaInfo: net.filebot.mediainfo"..., 298MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path ([file:/share/CACHEDEV1_DATA/.qpkg/Entware-ng/share/filebot/FileBot.jar])
Any help on the cause for the exception is greatly appreciated! Also, I am interested in compiling my own libraries for my QNAP but can't figure it out :shock:
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Post by rednoah »

So according to this logs it tries to load the correct library, correct?

Code: Select all

[pid 18062] open("/opt/share/filebot/libmediainfo.so", O_RDONLY|O_CLOEXEC) = 17
But apparently fails and moves on.

No idea, but you'll probably need to compile the native libraries yourself, which is not an easy task. You'll have to ask smarter people than me if you need help with porting native code. ;)
:idea: Please read the FAQ and How to Request Help.
viceversa
Posts: 6
Joined: 05 Oct 2016, 19:34

Re: MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Post by viceversa »

reverted to libmediainfo 0.7.69 and its working now!

For anyone else, these older versions can be found here: https://github.com/filebot/filebot/comm ... d503e6c691
frankw
Posts: 21
Joined: 15 Feb 2016, 16:29

Re: MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Post by frankw »

Weird, I just upgraded to the latest filebot and also started getting this error. Apparently filebot contained mediainfo before, but is now looking for the system version?

Anyway, this did the trick for me (was not installed before):

Code: Select all

apt install libmediainfo0v5
Edit: And this was on Ubuntu 16.04.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so

Post by rednoah »

The Debian packages include the native libraries, but might prefer the system ones if installed.
:idea: Please read the FAQ and How to Request Help.
Post Reply