Synolgy and mediainfo PATH problem

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
Timbo925
Posts: 6
Joined: 19 Feb 2015, 23:12

Synolgy and mediainfo PATH problem

Post by Timbo925 »

I freshly installed FileBot on my new Synolgy DS415play edition and the standard renaming works fine using my own script. The problem I now face is using a renaming convention which uses the mediainfo lib. I can't seem to figure out where to put the library files. Where should I put these files so FileBot can find them?

I included my test script for the sysinfo where I set the LD_LIBRARY_PATH variable to the location of the library files. Also tried to create the linux-x86/libmediainfo.so folder the location of filebot (/volume1/@appstore/filebot/filebot.sh) but this also doesn't work.

I grabbed the linux-i686 files from the sourceforge repository. These should be the correct file I think because the synology has an x86 Intel Atom processor.

I also tried to create /opt/share/filebot/linux-x86 folder based on feedback from this post http://www.filebot.net/forums/viewtopic.php?f=3&t=2233. But the same results persists.

Code: Select all

LD_LIBRARY_PATH=/volume1/NetBackup/linux-i686
#Extend path with java location due to .profile not loading when cron task
PATH=$PATH:/volume1/@appstore/java8/ejdk1.8.0_33/linux_i586/jre/bin

/volume1/@appstore/filebot/filebot.sh -script fn:sysinfo

Code: Select all

FileBot 4.5.6 (r2818)
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])
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: no 7-Zip-JBinding in java.library.path
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Groovy Engine: 2.3.9
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_33 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 4 Core / 170 MB Max Memory / 11 MB Used Memory
OS: Linux (i386)
uname: Linux Diskstation 3.2.40 #5022 SMP PREEMPT Wed Jan 7 14:19:42 CST 2015 i686 GNU/Linux synology_evansport_415play
Done ヾ(@⌒ー⌒@)ノ
Thanks in advance,
Timbo925
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Synolgy and mediainfo PATH problem

Post by rednoah »

See filebot.sh for details how things are configured. As long as the Java *.library.path options point to the folder with the library it should work. You seem to be doing it right.

Keep in mind that the generic Linux binaries may not necessarily work on your device, and that "library not found" is the same as "library found but can't load" so error messages can be misleading.
:idea: Please read the FAQ and How to Request Help.
Timbo925
Posts: 6
Joined: 19 Feb 2015, 23:12

Re: Synolgy and mediainfo PATH problem

Post by Timbo925 »

Thanks for the feedback, I found the solution by putting an echo in the filebot.sh file to show me the path.
The files needed to be placed directly at the same location as the .sh file.

The error (linux-x86/libmediainfo.so) trew me off and therefore I put everything in a dir.

For the interested. My full script to sync from server and then use filebot to sort

Code: Select all

#!/bin/sh
LOCKFILE=/volume1/NetBackup/lockfile.txt
PATH=$PATH:/volume1/@appstore/java8/ejdk1.8.0_33/linux_i586/jre/bin

if [ -e ${LOCKFILE} ]; then
    echo "already running"
    exit
fi

echo "------ Starting Sync and File -------"

# make sure the lockfile is removed when we exit and then claim it
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo $$
echo $$ > ${LOCKFILE}

###### My code ######
echo "Starting rsync"
rsync -avz  --include '*/' --include '*.mkv' --include "*.mp4" --exclude '*' --prune-empty-dirs [external location] "/volume1/NetBackup/rsyncPulsed/"
echo "Finished rsync"


echo "Starting Filebot"
/volume1/@appstore/filebot/filebot.sh -script fn:amc --output /volume1/NetBackup/FilebotOutput --log-file amc.log --action copy --conflict auto -non-strict /volume1/NetBackup/rsync --def subtitles=en,nl  "seriesFormat=/volume1/NetBackup/Series/{n}/{n.upperInitial().space('.').replaceAll(/[,]+/)}.{s00e00}.{t.upperInitial().space('.').replaceAll(/[,]+/)}{'.'+vf.match(/720[pP]|1080[pP]/)}{\".\$source\"}{\".\$vc\"}" "movieFormat=/volume1/NetBackup/Movies/{n} ({y}){'['+source+']'}/{n.space('.')}.{y}{'.'+fn.match(/3D/)}{'.'+vf}{'.'+ac}{'.'+af}{'.'+lang}{'.CD'+pi}"
echo "Finished Filebot"

######################

rm -f ${LOCKFILE}
echo
Post Reply