Help! Seperating Movies into different folders HD & 4k

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
CHA0SENG7NE
Posts: 42
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 07 Oct 2018, 12:41

Thanks rednoah,
That has worked perfectly.
I just tried with a batch of different files. All going to the correct location.

CHA0SENG7NE
Posts: 42
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 08 Oct 2018, 15:28

Hi Rednoah, just want to say thanks. The 3D movies I have are now sorted into the correct folder. Works perfectly :)

howdymilsap
Posts: 34
Joined: 14 Jul 2018, 17:22

Re: Help! Seperating Movies into different folders HD & 4k

Post by howdymilsap » 09 Oct 2018, 20:35

rednoah wrote:
07 Oct 2018, 06:00
On a related note, does anybody have a large collection of 3D movies? Does anybody know any heuristics based on the mediainfo data we can use to detect 3D movies? Like maybe very odd aspect ratio? Or some other 3D encoding field?
I have been working on my format expression to properly organize my collection - which includes some 3D titles. To be honest, I am struggling with this a bit, but that is a topic for another thread.

I can provide to you whatever output you need from mediainfo that might help in better 3D content identification. Just let me know what you need and I will provide it.

btw, I also have downloaded many test 3D files from https://www.demo-world.eu/3d-demo-trailers-hd/, and these files might provide you the information you need without having to have access to a large 3D movie collection.

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 10 Oct 2018, 07:26

You can copy & paste the MediaInfo table, so we can see if there's any characteristics that are common to all 3D movies:
viewtopic.php?f=5&t=4285
:idea: Please read the FAQ and How to Request Help.

yodaspowart
Posts: 6
Joined: 02 Jun 2017, 01:04

Re: Help! Seperating Movies into different folders HD & 4k

Post by yodaspowart » 29 Oct 2018, 23:30

This is what Im using for 3D Movies:

3D|3d|HSBS|3dhsbs|H-SBS|3dhou|H-OU

Code: Select all

--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : fn =~ /3D|3d|HSBS|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y}) - {allOf{match}{s3d}{hd}{vc}{vf}{n.findMatch(group) ? null : '- '+group} join ' '} {' CD'+pi}{'.'+lang}" \

TomTomTuning
Posts: 12
Joined: 23 Nov 2016, 14:46

Re: Help! Seperating Movies into different folders HD & 4k

Post by TomTomTuning » 09 Dec 2018, 20:48

Is there any way I an direct 4K content to a specific folder while using FileBot Node?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 10 Dec 2018, 08:48

Yes. You'll need to pass in your own custom format though, that yields different destination paths for different files, as explained in this thread.

:arrow: Best to use the GUI first to prototype your format, and then just copy & paste it into FileBot Node when you're happy with it.
:idea: Please read the FAQ and How to Request Help.

devster
Posts: 332
Joined: 06 Jun 2017, 22:56

Re: Help! Seperating Movies into different folders HD & 4k

Post by devster » 08 Jun 2019, 11:01

rednoah wrote:
07 Oct 2018, 06:00
On a related note, does anybody have a large collection of 3D movies? Does anybody know any heuristics based on the mediainfo data we can use to detect 3D movies? Like maybe very odd aspect ratio? Or some other 3D encoding field?
For MediaInfo in BluRays there might be MultiView_Count MultiView_Layout and the "Stereo" keyword in Format_Profile in Video

Code: Select all

Format profile                   : Stereo [email protected]
MultiView_Count                  : 2
MultiView_Layout                 : Side by Side (left eye first)
and for MKV only there can be STEREO_MODE defined in the General part.
All these, however, seem to depend on the encoder and not on characteristics of the video file, meaning that if whoever creates the file does not properly tag it there doesn't seem to be a way to detect it, at least with MediaInfo.
Not sure about ffmpeg.
I only work in black and sometimes very, very dark grey. (Batman)

eggsplorer
Posts: 9
Joined: 21 Jun 2019, 23:05

Re: Help! Seperating Movies into different folders HD & 4k

Post by eggsplorer » 01 Oct 2019, 23:28

I'd like to move 4K movies into a seperate subfolder and tried to use the suggested expressions:

Code: Select all

#!/bin/sh
## Variablen
LOG="/srv/dev-disk-by-label-Medien/Downloads/filebot/amc.log"
EXC="/srv/dev-disk-by-label-Medien/Downloads/filebot/amc.txt"
SERIEN="/srv/dev-disk-by-label-Medien/Medien/Serien/{n}/Staffel {s}/{n} - {s00e00} - {t}"
FILME="/srv/dev-disk-by-label-Medien/Medien/{vf =~ /2160p/ ? 'Filme/2. 4K' : 'Filme'}/{n} ({y})/{n} ({y}) [{rating}]"
## FileBot ausführen
/usr/share/filebot/bin/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" -non-strict --def clean=y
/usr/share/filebot/bin/filebot.sh -script fn:cleaner "$1"
This script worked when I used "Filme" insted of the Format Expression "{vf =~ /2160p/ ? 'Filme\2. 4K' : 'Filme'}"
Now my movies are getting moved to "/srv/dev-disk-by-label-Medien/Medien/{n} ({y})/{n} ({y}) [{rating}]" (neither /Filme nor /Filme/2. 4K) and I don't understand why.

I just want "normal" movies to move to "/Medien/Filme"
and 4K Movies to "/Medien/Filme/2. 4K"

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 02 Oct 2019, 03:12

What does filebot -script fn:sysinfo say?


:idea: If {vf =~ /2160p/ ? 'A' : 'B'} fails, you get neither A or B, and since that is what you describe, the most likely culprit is {vf} not yielding any value.


:idea: Please read How to Request Help.
:idea: Please read the FAQ and How to Request Help.

eggsplorer
Posts: 9
Joined: 21 Jun 2019, 23:05

Re: Help! Seperating Movies into different folders HD & 4k

Post by eggsplorer » 02 Oct 2019, 13:08

I tried to use only {vf} but it still doesn't do anything.

This is my console log: https://pastebin.com/MAfwUqrr

My AMC script:

Code: Select all

#!/bin/sh
## Variablen
LOG="/srv/dev-disk-by-label-Medien/Downloads/filebot/amc.log"
EXC="/srv/dev-disk-by-label-Medien/Downloads/filebot/amc.txt"
SERIEN="/srv/dev-disk-by-label-Medien/Medien/Serien/{n}/Staffel {s}/{n} - {s00e00} - {t}"
FILME="/srv/dev-disk-by-label-Medien/Medien/{vf}/{n} ({y})/{n} ({y}) [{rating}]"
## FileBot ausführen
/usr/share/filebot/bin/filebot.sh -script fn:amc --lang de --log-file $LOG --action move "$1" --def "seriesFormat=$SERIEN" "movieFormat=$FILME" -non-strict --def clean=y --def 'kodi=192.168.2.141:8080'
/usr/share/filebot/bin/filebot.sh -script fn:cleaner "$1"
/usr/share/filebot/bin/filebot.sh -script fn:sysinfo
I noticed the error regarding mediainfo. Could this be the root of the problem?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 02 Oct 2019, 13:28

1.
Yes, correct. Since MediaInfo is not working, MediaInfo-based bindings won't work:

Code: Select all

MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'zen': Native library (linux-x86-64/libzen.so) not found in resource path ([file:/usr/share/filebot/jar/filebot.jar])
:idea: viewtopic.php?t=4285


2.
:?: How did you install FileBot? Which package exactly? Are all dependencies installed?

:arrow: I recommend using the deb.sh auto-installer script: viewtopic.php?f=11&t=6028

:!: Running is root is also strongly discouraged.
:idea: Please read the FAQ and How to Request Help.

eggsplorer
Posts: 9
Joined: 21 Jun 2019, 23:05

Re: Help! Seperating Movies into different folders HD & 4k

Post by eggsplorer » 02 Oct 2019, 15:42

Unfortunately I don't recall how I installed filebot but I just installed it again using your reccommendet method:

Code: Select all

bash -xu <<< "$(curl -fsSL https://raw.githubusercontent.com/filebot/plugins/master/installer/deb.sh)"
I still get errors for MediaInfo and 7zip: https://pastebin.com/SaDKcfLC

Is there a way to install them manually?

Edit:
Now I'm not sure whether or not I uninstalled and installed filebot correctly.
I used "apt-get remove --purge filebot" and then used the command mentioned above (deb.sh).
Shouldn't my license be purged aswell?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 02 Oct 2019, 16:06

Is libzen installed?
https://packages.debian.org/buster/libzen0v5

Are dependencies being installed when apt install filebot is called?

:!: It is possible to configure apt to not install recommended dependencies.

You can check:

Code: Select all

apt-cache depends filebot
:idea: https://unix.stackexchange.com/a/32860/78608
:idea: Please read the FAQ and How to Request Help.

eggsplorer
Posts: 9
Joined: 21 Jun 2019, 23:05

Re: Help! Seperating Movies into different folders HD & 4k

Post by eggsplorer » 03 Oct 2019, 02:34

It worked!

Those are the dependencies:

Code: Select all

apt-cache depends filebot
filebot
  Hängt ab von: openjdk-8-jre
  Hängt ab von: libjna-java
  Empfiehlt: openjfx
  Empfiehlt: mediainfo
  Empfiehlt: libchromaprint-tools
  Empfiehlt: p7zip-full
  Empfiehlt: <unrar>
  Wertet auf: nautilus-actions
So I just installed the missing dependencies manually:

Code: Select all

sudo apt-get install libzen0v5
sudo apt-get install mediainfo
sudo apt-get install p7zip-full
sudo apt-get install unrar (didn't work!!!)
sudo apt-get install unrar-free
This is my result: https://pastebin.com/pe3Jwm8c

I still get an error for unrar, maybe because I couldn't install "unrar" and had to install "unrar-free".

Code: Select all

unrar: Archive not specified
 unrar: net.filebot.ExecuteException: [unrar] failed (1)
For now I don't need to use unrar but I will propably try it since it seems to be the recommended method to combine jDownloader and FileBot.

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 03 Oct 2019, 07:19

JD would typically unrar files before passing them on to FileBot (via the glue logic scripts found here in the forums) but if JD requires the unrar tool for that I cannot say, though probably does.
:idea: Please read the FAQ and How to Request Help.

eggsplorer
Posts: 9
Joined: 21 Jun 2019, 23:05

Re: Help! Seperating Movies into different folders HD & 4k

Post by eggsplorer » 03 Oct 2019, 11:38

JD usually does unrar the files and calls FileBot with the EventScripter after the package is extracted which works fine.
There is one "known issue" though (also mentioned in your Tutorial) which does indeed cause trouble:
If JDownloader finishes extracting a package ( -> calling FileBot) but is still extracting a second package, FileBot will start processing the partially extracted files.
This is obviously a JDownloader issue or rather results from combining those two tools, but it is really inconvinient.

You posted a solution but to be honest I don't really understand what it does and how it is solving this problem.

Post Reply