libmediainfo and GNUTLS.so.4

All your suggestions, requests and ideas for future development
Post Reply
nodupe
Posts: 3
Joined: 29 May 2025, 06:26

libmediainfo and GNUTLS.so.4

Post by nodupe »

Hi,

I know nixos is not one of the supported OSs, but I believe my question could apply also to other people.

Is there a way I can tell filebot where to search for the libraries on the cli? I mostly use filebot in scripts to rename files, and I am wondering if there is a flag or option I could use. I'm pretty sure I've seen a very old post ( that I can't find right now ) with such a flag, but I have no clue if it exists still.
The version of libmediainfo that ships with filebot seems to not like GNUTLS.so.4.

If I can set the flag to load another libmediainfo version, shipped by the OS I hope the issue may be solved...

Console Output: Select all

$ filebot -script fn:sysinfo
FileBot 5.1.7 (r10514)
JNA Native: 7.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo':
/nix/store/y2f56kbnc0gznl2g1kq2sbair731x6yj-curl-8.13.0/lib/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found (required by /nix/store/0yp7i7xhphlzv4v22gd5fspg7a989k08-filebot-5.1.7/opt/lib/Linux-x86_64/libmediainfo.so)
/nix/store/y2f56kbnc0gznl2g1kq2sbair731x6yj-curl-8.13.0/lib/libcurl-gnutls.so.4: version `CURL_GNUTLS_3' not found (required by /nix/store/0yp7i7xhphlzv4v22gd5fspg7a989k08-filebot-5.1.7/opt/lib/Linux-x86_64/libmediainfo.so)
Native library (linux-x86-64/libmediainfo.so) not found in resource path (/nix/store/0yp7i7xhphlzv4v22gd5fspg7a989k08-filebot-5.1.7/opt/jar/filebot.jar)
Tools: unrar/7.01
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2025-05-24 (r1007)
Groovy: 4.0.21
JRE: OpenJDK Runtime Environment 17.0.14
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 32 Core / 16 GB Max Memory / 55 MB Used Memory
OS: Linux (amd64)
HW: Linux hostname 6.12.30 #1-NixOS SMP PREEMPT_DYNAMIC Thu May 22 12:29:54 UTC 2025 x86_64 GNU/Linux
CPU/MEM: : AMD Ryzen 9 5950X 16-Core Processor / MemTotal: 67 GB / MemFree: 40 GB / MemAvailable: 52 GB / SwapTotal: 107 GB / SwapFree: 107 GB
Package: TAR


Thank you in advance
User avatar
rednoah
The Source
Posts: 24009
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: libmediainfo and GNUTLS.so.4

Post by rednoah »

:idea: The TAR package includes a libmediainfo.so binary that is compatible with typical Linux distributions, Ubuntu, Debian, etc. If you're using something more unusual then you will need to provide the native dependencies for your specific platform.

:arrow: NixOS presumably provides a compatible mediainfo package so it might be as easy as installing that, and possibly replacing the included libmediainfo.so binary with one specifically compiled and linked for your platform. Simply deleting the built-in libmediainfo.so might just do the trick so that the system will default to loading libmediainfo.so from elsewhere. The library search path is defined in the filebot.sh launcher so you can also edit that to fit your needs.
:idea: Please read the FAQ and How to Request Help.
nodupe
Posts: 3
Joined: 29 May 2025, 06:26

Re: libmediainfo and GNUTLS.so.4

Post by nodupe »

Thank you for the quick reply. This is what I will try to do, but it means on the world of nixos, repackaging filebot for my environment. Not something impossible, but requires some work. I was wondering if there was a short path ( point the cli to the lib I needed). It seems it is not possible.

Thanks the same. In case of success I will document how I've done it here, so other users can benefit.
User avatar
rednoah
The Source
Posts: 24009
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: libmediainfo and GNUTLS.so.4

Post by rednoah »

Simply deleting the built-in libmediainfo.so might just do the trick so that the system will default to loading libmediainfo.so from elsewhere:

Shell: Select all

rm -v /nix/store/0yp7i7xhphlzv4v22gd5fspg7a989k08-filebot-5.1.7/opt/lib/Linux-x86_64/libmediainfo.so

:idea: The system will then search through the $LD_LIBRARY_PATH by default.
:idea: Please read the FAQ and How to Request Help.
nodupe
Posts: 3
Joined: 29 May 2025, 06:26

Re: libmediainfo and GNUTLS.so.4

Post by nodupe »

Hi,

I've sent a patch to the package upstream that did just what you proposed (deleting libmediainfo.so), and replacing it with the "native" one from the OS. It is still to be checked by the maintainers, but it works for me. I'm adding here the link for my file, in case it may help other nixos users: https://github.com/NixOS/nixpkgs/pull/412423/files
Thank you again!
Post Reply