Raspberry Pi and Filebot

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
iPwnThePhone
Posts: 3
Joined: 28 Feb 2013, 18:58

Raspberry Pi and Filebot

Post by iPwnThePhone »

Finally I got Filebot working on my Raspberry Pi.

In my first Setup I used Openjdk 6 and Filebot 3.4 on Raspbian.
A run using the amc script with about 4 Episodes took more then half an hour.

Now I did a second run which was much faster.

Here I'll post a little tutorial how I got Filebot work:

1. First you need a Raspberry Pi running the latest Raspbian version.
2. Install Java 8 ARM (the page seems to be offline right now, I'll add a link if it's back online)
3. Download filebot_3.5_arm.ipk at filebot.net
4. Extract the ipk using 7-zip or something similar, you'll get a data.tar, which you also have to extract. (Navigate to usr->share->filebot)
5. Copy the filebot folder to your raspberry pi into /usr/share
6. Edit the filebot.sh (sudo nano /usr/share/filebot/bin/filebot.sh) to look like this:
#!/bin/sh
java -Dunixfs=false -DuseExtendedFileAttributes=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.analytics=true -Duser.home=/usr/share/filebot/data -Dapplication.dir=/usr/share/filebot/data -Djava.io.tmpdir=/usr/share/filebot/data/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar -Xms400M -Xmx400M /usr/share/filebot/FileBot.jar "[email protected]"
7. Make the script executable, if it isnt already:
sudo chmod +x /usr/share/filebot/bin/filebot.sh
8. Run the script by default using /usr/share/filebot/bin/filebot.sh --parameters

I hope you'll get filebot running relatively fast. In my case renaming 5 Episodes out of 4 Tv-Shows took 7min (with copying)

Pls tell me any improvements or if it worked;)
My English isnt really good, but I hope you understood everything, if not write me a message.

Greets,
iPwnThePhone
User avatar
rednoah
The Source
Posts: 18830
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Raspberry Pi and Filebot

Post by rednoah »

Code: Select all

-Xms400M -Xmx400M
Giving the JVM an initial (-Xms) 400m block of memory is WAY OVERKILL. Default is like 16m and it'll dynamically grow as needed. Also, especially on cmdline, FileBot would never get even close to the (-Xmx) 400m max-memory you specified, but nevermind that, it's just a maxium, never gonna grow that big anyway.

EDIT:
Especially if you sequence filebot calls using the new --log-file --log-lock options you really don't wanna barely initialized FileBot instances waiting their turn gobble 400m of memory when it doesn't even need 10m.
:idea: Please read the FAQ and How to Request Help.
iPwnThePhone
Posts: 3
Joined: 28 Feb 2013, 18:58

Re: Raspberry Pi and Filebot

Post by iPwnThePhone »

Thanks,
yeah I know filebot will never reach that limit, but without Xms it didnt worked and I thought there is no problem with this because it still starts with about 10mb Ram growing to about 180mb
User avatar
rednoah
The Source
Posts: 18830
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Raspberry Pi and Filebot

Post by rednoah »

When it's processing scripts like amc it'll eat lots of memory. But with --log-file and --log-lock you can have make it run only one single instance at a time. So first instance will go ahead and process and eat lots of ram. When u start a second one at the same time it'll start, and then wait for the lock, i.e. for the first filebot process to finish. That's before loading groovy, caches, etc before doing anything at all really. So that second one, in waiting state, will need about as much memory as a Hello World program, a few meg at most.

I recommend not setting -Xms at all and leave it at whatever the default may be, now -Xmx you can set as high as you want or need.
:idea: Please read the FAQ and How to Request Help.
Post Reply