Using Filebot on DSM
Using Filebot on DSM
I would like to use and automate the use of Filebot on my Synology DS411J using cron. I still have not tested using filebot on DSM but I believe it will not work since there is no binary for the ARM architecture or am I missing something ?
Re: Using Filebot on DSM
FileBot runs on any platform that has Java SE 6 or higher. There should be Java implementations for Linux-ARM. How well that'll work I also don't know.
EDIT:
http://java.sun.com/javase/embedded/#FAQ
Maybe you can make it work with that Java 7 for Embedded. That should be enough to run the FileBot cmdline.
EDIT:
http://java.sun.com/javase/embedded/#FAQ
Maybe you can make it work with that Java 7 for Embedded. That should be enough to run the FileBot cmdline.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
I will try this out once I get my hands on the NAS.
Re: Using Filebot on DSM
Let me know how things are coming along. It would be cool if someone could write a tutorial on how to install Java on Linux/ARM and make FileBot run.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
I have installed java on my DS411J as I wanted to run YAMJ on it it.
I am willing to try and Filebot running if someone can help.
I am willing to try and Filebot running if someone can help.
Re: Using Filebot on DSM
Try to find out how to install Java SE for Linux/ARM for your device. Check the link above for packages for Java SE for Embedded.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
I have got java installed already and can execute the .jar file using:
./java -jar FileBot_2.61.jar -version
and have returned:
FileBot 2.61 (r965) / Java(TM) SE Runtime Environment 1.6.0_30 (headless)
./java -jar FileBot_2.61.jar -version
and have returned:
FileBot 2.61 (r965) / Java(TM) SE Runtime Environment 1.6.0_30 (headless)
Re: Using Filebot on DSM
OK, I am learning!
./java -jar FileBot_2.61.jar -rename /volume1/downloads --db thetvdb
Just need to work out how to get rid of the spaces and search sub folders
./java -jar FileBot_2.61.jar -rename /volume1/downloads --db thetvdb
Just need to work out how to get rid of the spaces and search sub folders
Re: Using Filebot on DSM
Seems to be working fine. This is for subtitles:
Code: Select all
./java -jar FileBot.jar -get-missing-subtitles /volume1/downloads --lang en
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
For renaming folders and sub folders you can try this script:
Code: Select all
./java -jar FileBot.jar -script http://filebot.sf.net/scripts/renall.groovy /volume1/downloads --db thetvdb
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Great thanks, will check it out!
Re: Using Filebot on DSM
Looks like I can't use the groovy scripts.
renall.groovy /volume1/downloads --db thetvdb
FileNotFoundException: /usr/local/YAMJ/ejre1.6.0_30/bin/.jar
java.io.FileNotFoundException: /usr/local/YAMJ/ejre1.6.0_30/bin/.jar
at Script2$_run_closure15.doCall(Script2.groovy:22)
at Script2$_run_closure16_closure69.doCall(Script2.groovy:23)
at Script2$_run_closure16.doCall(Script2.groovy:23)
at Script2$_run_closure19.doCall(Script2.groovy:27)
at Script3.run(Script3.groovy:6)
at net.sourceforge.filebot.cli.ScriptShell$2.run(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.run(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
renall.groovy /volume1/downloads --db thetvdb
FileNotFoundException: /usr/local/YAMJ/ejre1.6.0_30/bin/.jar
java.io.FileNotFoundException: /usr/local/YAMJ/ejre1.6.0_30/bin/.jar
at Script2$_run_closure15.doCall(Script2.groovy:22)
at Script2$_run_closure16_closure69.doCall(Script2.groovy:23)
at Script2$_run_closure16.doCall(Script2.groovy:23)
at Script2$_run_closure19.doCall(Script2.groovy:27)
at Script3.run(Script3.groovy:6)
at net.sourceforge.filebot.cli.ScriptShell$2.run(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.run(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Re: Using Filebot on DSM
Is there a way to scan sub folders from the CLI?
Re: Using Filebot on DSM
Are you sure you didn't mess up the cmdline call somehow? Because Groovy seems do alot of things before an exception occurs.
If I run it with illegal arguments I get exactly the same stacktrace as you. So I'm pretty sure there's something wrong with the input.
If I run it with illegal arguments I get exactly the same stacktrace as you. So I'm pretty sure there's something wrong with the input.
Code: Select all
FileNotFoundException: X:\test
java.io.FileNotFoundException: X:\test
at Script2$_run_closure15.doCall(Script2.groovy:22)
at Script2$_run_closure16_closure69.doCall(Script2.groovy:23)
at Script2$_run_closure16.doCall(Script2.groovy:23)
at Script2$_run_closure19.doCall(Script2.groovy:27)
at Script3.run(Script3.groovy:6)
at net.sourceforge.filebot.cli.ScriptShell$2.run(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.run(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Indeed you are right, I screwed up somewhere, now it's fine
Code: Select all
DSMOJO> ./java -jar FileBot_2.61.jar -script http://filebot.sf.net/scripts/renall.groovy /volume1/TVSeries/Rescue.Me/ --db thetvdb -non-strict
Rename episodes using [TheTVDB]
Auto-detected query: [Rescue Me]
Fetching episode data for [Rescue Me]
Fetching episode data for [Rescue Me (2002)]
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x01 - Baptism.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x01 - Baptism.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x02 - French.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x02 - French.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x04 - Jimmy.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x04 - Jimmy.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x05 - Sheila.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x05 - Sheila.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x07 - Play.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x07 - Play.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x08 - Iceman.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x08 - Iceman.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x10 - Control.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x10 - Control.avi] already exists
Skipped [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x11 - Mickey.avi] because [/volume1/TVSeries/Rescue.Me/Season5/Rescue Me - 5x11 - Mickey.avi] already exists
Renamed 8 files
Rename episodes using [TheTVDB]
Auto-detected query: [Rescue Me]
Fetching episode data for [Rescue Me]
Fetching episode data for [Rescue Me (2002)]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E01_Legacy.mkv] to [Rescue Me - 6x01 - Legacy.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E02_Change.mkv] to [Rescue Me - 6x02 - Change.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E03_Comeback.mkv] to [Rescue Me - 6x03 - Comeback.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E04_Breakout.mkv] to [Rescue Me - 6x04 - Breakout.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E05_Blackout.mkv] to [Rescue Me - 6x05 - Blackout.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E06_Sanctuary.mkv] to [Rescue Me - 6x06 - Sanctuary.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E07_Forgiven.mkv] to [Rescue Me - 6x07 - Forgiven.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E08_Cowboy.mkv] to [Rescue Me - 6x08 - Cowboy.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E09_Goodbye.mkv] to [Rescue Me - 6x09 - Goodbye.mkv]
[MOVE] Renamed [/volume1/TVSeries/Rescue.Me/Season6/Rescue.Me.S06E10_A.D.D..mkv] to [Rescue Me - 6x10 - A.D.D..mkv]
Renamed 10 files
Done ã¾(ï¼ âã¼âï¼ )ã
DSMOJO>
Re: Using Filebot on DSM
have you also been able to get mediainfo to work?
I have downloaded the FIleBot JAR and Embedded Java and it's working fine. But I require media information as well.
I'm using a DS411Slim with ARM5 processor.
I have not found a MediaInfo.dll that was compiled for ARM. I tried compiling it myself but have not been successful so far.
In general will FileBot use the MediaInfo.dll if it is compiled correctly and placed in the same folder like FileBot.jar?
I have downloaded the FIleBot JAR and Embedded Java and it's working fine. But I require media information as well.
I'm using a DS411Slim with ARM5 processor.
I have not found a MediaInfo.dll that was compiled for ARM. I tried compiling it myself but have not been successful so far.
In general will FileBot use the MediaInfo.dll if it is compiled correctly and placed in the same folder like FileBot.jar?
Re: Using Filebot on DSM
Yep, FileBot will just use the lib if it's on the same folder, but I have no idea what Java Native Access will do on an ARM system, if it can access/load libs compiled for ARM.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Checked what native libs JNA packages to dynamically access native code.
This is what I got:
darwin
freebsd-amd64
freebsd-i386
linux-amd64
linux-i386
sunos-amd64
sunos-sparc
sunos-sparcv9
sunos-x86
win32-amd64
win32-x86
No support for ARM right now it seems
This is what I got:
darwin
freebsd-amd64
freebsd-i386
linux-amd64
linux-i386
sunos-amd64
sunos-sparc
sunos-sparcv9
sunos-x86
win32-amd64
win32-x86
No support for ARM right now it seems
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Actually the latest JNA package support linux-arm as well. So if manage to build libmediainfo.so and libzen.so for linux-arm I can give you a test build that should be able to load it.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Great!
I have been able to build libmediainfo.so and libzen.so on the DS. I have also compiled mediainfo and tested it.. It shows me the media info with a sample MKV.
Now I have tried to run FileBot using them (placed both files in the same folder as FileBot.jar) and as expected it failed with WARNING: Failed to preload libzen
I have downloaded the 3.4.0 jna.jar and built a new FileBot.jar using it but I get the same warning and no media info is used while renaming.
I would like to try your test build..
I have been able to build libmediainfo.so and libzen.so on the DS. I have also compiled mediainfo and tested it.. It shows me the media info with a sample MKV.
Now I have tried to run FileBot using them (placed both files in the same folder as FileBot.jar) and as expected it failed with WARNING: Failed to preload libzen
I have downloaded the 3.4.0 jna.jar and built a new FileBot.jar using it but I get the same warning and no media info is used while renaming.
I would like to try your test build..
Re: Using Filebot on DSM
Actually that is what I would have done...
1. Get this jar: https://github.com/twall/jna/blob/master/dist/jna.jar
2. Replace filebot/lib/jna.jar with that
3. Package using ant fatjar
Uploaded the new fatjar here: http://sourceforge.net/projects/filebot ... ebot/HEAD/
On Win/Linux/Mac it would usually work without a hitch if there is no problem with looking up the .so files. Maybe that's the problem? Try specifying jna.library.path like I do in the Linux startup script here.
http://filebot.svn.sourceforge.net/view ... filebot.sh
EDIT: Does DSM use ipkg or opkg? If we manage to get this working I can add a another package to my build so people on DSM can just do something like opkg -install filebot and get everything set up.
1. Get this jar: https://github.com/twall/jna/blob/master/dist/jna.jar
2. Replace filebot/lib/jna.jar with that
3. Package using ant fatjar
Uploaded the new fatjar here: http://sourceforge.net/projects/filebot ... ebot/HEAD/
On Win/Linux/Mac it would usually work without a hitch if there is no problem with looking up the .so files. Maybe that's the problem? Try specifying jna.library.path like I do in the Linux startup script here.
http://filebot.svn.sourceforge.net/view ... filebot.sh
EDIT: Does DSM use ipkg or opkg? If we manage to get this working I can add a another package to my build so people on DSM can just do something like opkg -install filebot and get everything set up.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Sorry for the delay, I haven't had the time to look into this further.
It is working now. I had to specify the jna.library.path as you said.
These are all the steps I followed if anybody is interested:
Installed Oracle Java from ejre-7u4-fcs-b20-linux-arm-sflt-headless-12_apr_2012.tar
Installed your patched FileBot.jar to /usr/share/filebot
Tested FileBot .. working fine except MediaInfo -> shows Warning libzen not found
I had to follow step 4 as described on this page http://www.synology-forum.de/showthread ... =mediainfo to fix my Synology's automake. It may be optional! You can try without this first.
Then I was able to compile MediaInfoLib and ZenLib:
this creates /src/MediaInfo_DLL_GNU_FromSource/MediaInfoLib/Project/GNU/Library/.libs/libmediainfo.so
this creates /src/MediaInfo_DLL_GNU_FromSource/ZenLib/Project/GNU/Library/.libs/libzen.so
(my Linux knowledge is very limited.. there might be a way to compile both at the same time)
then I copied libmediainfo.so and libzen.so to /usr/share/filebot
I adjusted the filebot.sh:
Now it works using the following command:
(My sample already has my preferred format.. it shows that mediainfo obtains the same information! I replaced the actual movie name with ___)
I am using ipkg on the Synology DS. I'm not sure if ipkg is possible. It would be very cool to automatically install / update it from there!
It is working now. I had to specify the jna.library.path as you said.
These are all the steps I followed if anybody is interested:
Installed Oracle Java from ejre-7u4-fcs-b20-linux-arm-sflt-headless-12_apr_2012.tar
Installed your patched FileBot.jar to /usr/share/filebot
Tested FileBot .. working fine except MediaInfo -> shows Warning libzen not found
I had to follow step 4 as described on this page http://www.synology-forum.de/showthread ... =mediainfo to fix my Synology's automake. It may be optional! You can try without this first.
Code: Select all
# Create a directory for the source files and link it to root:
mkdir /volume1/src
ln -s /volume1/src /src
cd /src
# Download and extract Tarball
wget ftp://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2
tar xvjf automake-1.11.1.tar.bz2
# build automake
cd automake-1.11.1
./configure --prefix=/opt
make
ipkg -force-depends remove automake
make install
Code: Select all
cd /src
wget http://downloads.sourceforge.net/mediainfo/MediaInfo_DLL_0.7.57_GNU_FromSource.tar.bz2
tar -xjvf MediaInfo_DLL_0.7.57_GNU_FromSource.tar.bz2
cd MediaInfo_DLL_GNU_FromSource
./SO_Compile.sh
Code: Select all
cd /src/MediaInfo_DLL_GNU_FromSource/ZenLib/Project/GNU/Library/
./configure -enable-shared
make clean
make
(my Linux knowledge is very limited.. there might be a way to compile both at the same time)
then I copied libmediainfo.so and libzen.so to /usr/share/filebot
I adjusted the filebot.sh:
Code: Select all
/opt/ejre1.7.0_04/bin/java -Dunixfs=false -Xmx256m -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@"
Code: Select all
/usr/share/filebot/filebot.sh --action test -rename /volume1/video/Movies/_____________.2012.720p.BluRay.x264-AMIABLE.mkv --db imdb -non-strict --format "{n.space('.
')}.{y}.{def h = video.height as int; h > 720 ? 1080 : h > 480 ? 720 : 480}p.{source}.{vc}-{group}"
Rename movies using [IMDb]
Looking up movie by filehash via [IMDb]
IMDb: Hash lookup not supported
Auto-detect movie from context: [/volume1/video/Movies/_____________.2012.720p.BluRay.x264-AMIABLE.mkv]
[TEST] Rename [/volume1/video/Movies/_____________.2012.720p.BluRay.x264-AMIABLE.mkv] to [_____________.2012.720p.BluRay.x264-AMiABLE.mkv]
Processed 1 files
Done ?(?????)?
I am using ipkg on the Synology DS. I'm not sure if ipkg is possible. It would be very cool to automatically install / update it from there!
Re: Using Filebot on DSM
Please send me the native libs you compiled and the paths where apps should be installed. I'll try to build you an ipkg package that works out of the box. Will need your help with testing on this.
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
Thanks for your help! Added the ipkg/arm package to the website.
Now you can just do that to get the latest version:
Now you can just do that to get the latest version:
Code: Select all
ipkg install "http://sourceforge.net/projects/filebot/files/filebot/FileBot_2.62/filebot_2.62_arm.ipk"
Please read the FAQ and How to Request Help.
Re: Using Filebot on DSM
I tried this, got the following error:rednoah wrote:Thanks for your help! Added the ipkg/arm package to the website.
Now you can just do that to get the latest version:Code: Select all
ipkg install "http://sourceforge.net/projects/filebot/files/filebot/FileBot_2.62/filebot_2.62_arm.ipk"
Code: Select all
ipkg install "http://sourceforge.net/projects/filebot/files/filebot/File
Bot_2.62/filebot_2.62_arm.ipk"
Downloading http://sourceforge.net/projects/filebot/files/filebot/FileBot_2.62/filebot_2.62_arm.ipk
Clearing state_want and state_flag for pkg=filebot (arch_priority=0 flag=16 want=2)
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package filebot.
Check the spelling or perhaps run 'ipkg update'
Synology 712+
DSM 4.0-2219