Strange permission problem with Filebot (and mediainfo)

Support for Ubuntu and other Desktop Linux distributions
Post Reply
Ratfiend
Posts: 2
Joined: 11 Sep 2017, 11:55

Strange permission problem with Filebot (and mediainfo)

Post by Ratfiend »

Hello,

I've a strange behavior when I try to rename my files when mediainfo is envolved.

It seems that filebot cannot access the raw video-data via mediainfo without sudo command.

So when I try:

Code: Select all

filebot -mediainfo example.mkv  --format "f={f}; vc={vc}; ac={ac}; vf={vf}; resolution={resolution}; bytes={bytes}"
Output is:

Code: Select all

f=/home/Downloads/example.mkv; vc=; ac=; vf=; resolution=; bytes=167546063
But when I try:

Code: Select all

sudo filebot -mediainfo example.mkv  --format "f={f}; vc={vc}; ac={ac}; vf={vf}; resolution={resolution}; bytes={bytes}"
Output is:

Code: Select all

f=/home/Downloads/example.mkv; vc=x264; ac=AC3; vf=480p; resolution=720x404; bytes=167546063
The permission for /home/Downloads/ is set to -R 777, like the example.mkv too.

Same behavior with

Code: Select all

filebot -script fn:sysinfo

Code: Select all

FileBot 4.7.9 (r4984)
JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path ([file:/usr/share/filebot/FileBot.jar])
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: no 7-Zip-JBinding in java.library.path
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/openhabian/.filebot/????
WARNING: sun.jnu.encoding = ANSI_X3.4-1968
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 32-bit OpenJDK Client VM
CPU/MEM: 4 Core / 235 MB Max Memory / 9 MB Used Memory
OS: Linux (arm)
Package: DEB
uname: Linux openHABianPi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Done ?(?????)?
But with

Code: Select all

sudo filebot -script fn:sysinfo

Code: Select all

FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.73
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /root/.filebot/????
WARNING: sun.jnu.encoding = ANSI_X3.4-1968
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 32-bit OpenJDK Client VM
CPU/MEM: 4 Core / 235 MB Max Memory / 10 MB Used Memory
OS: Linux (arm)
Package: DEB
uname: Linux openHABianPi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Done ?(?????)?
The rest works as expected: Renaming, moving, cleaner. Only the mediainfo-data cannot be processed.

Do you have an idea why this is not working?

My environment:
Raspbian GNU/Linux 8 (jessie) @ RaspberryPi3
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Strange permission problem with Filebot (and mediainfo)

Post by rednoah »

1.
Here's the root of the MediaInfo problem. It can't load libjnidispatch.so (for some unknown reason). I have no idea why it would work with sudo though. Maybe the $PATH is somehow different? Or the *.so file is somehow only readable by root?

Code: Select all

JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path ([file:/usr/share/filebot/FileBot.jar])
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
2.
Your locale is not set correctly. Please read the FAQ for details:

Code: Select all

Unicode Filesystem: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/openhabian/.filebot/????
WARNING: sun.jnu.encoding = ANSI_X3.4-1968
:idea: Please read the FAQ and How to Request Help.
Ratfiend
Posts: 2
Joined: 11 Sep 2017, 11:55

Re: Strange permission problem with Filebot (and mediainfo)

Post by Ratfiend »

Hello again,

1. Well, I used a wrong java version (Zulu Embed). So I changed to Oracle Java and it worked out of the box.
Very strange with Zulu... The files were readable for everyone and the $Path stuff seems to be correct.

2. I changed my locales, everything is fully working now.

Thank you very much for your support :-)

I'm gonna donate now :-D
Post Reply