Page 1 of 1
Help! Seperating Movies into different folders HD & 4k
Posted: 22 Aug 2018, 13:03
by CHA0SENG7NE
Hi
I would like to be able to send movies to different folders depending whether is 4k or hd.
I currently use this....
Code: Select all
filebot -script fn:amc --output "\\192.168.0.111\Multimedia" --action move --conflict auto -non-strict --def clean=y --def subtitles=en --def movieFormat=@"C:\Filebot Templates\movie.groovy" seriesFormat=@"C:\Filebot Templates\series.groovy" --def unsortedFormat="\\192.168.0.111\Multimedia\Unsorted Files\{file.structurePathTail}" music=n artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
I would like the 4k target to be \\192.168.0.111\Movies 4K
any help would be appreciated
Movie groovy file
Code: Select all
"Movies/{ny} [{certification}]/{n.colon(' - ')} ({y}) {' CD'+pi} [ {vf} {vc} {bitdepth}bit {ac} {channels} ]"
Series groovy file
Code: Select all
"TV Shows/{n}/{'Season '+s}/{n} - {s00e00} - {t} [ {vf} {vc} {bitdepth}bit {ac} {channels} ]"
Regards

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 22 Aug 2018, 16:09
by rednoah
You could use the
{hd} binding which will give you SD / HD / UHD for each video file:
Alternatively, you can also do something like this:
Code: Select all
{h > 2000 ? 'Movies 4K' : 'Movies'}

i.e. if the video height is more than 2000 pixels, then it's 4K, but you may need to adjust that a bit if you have some kinda super-wide screen media.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 22 Aug 2018, 22:30
by CHA0SENG7NE
Hi Rednoah
Thanks for the info. I would like to use the height method as that seems best for me.
Would I need to add the code to the movie.groovy file at the start?
Not sure where it is supposed to go?
Many thanks
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 23 Aug 2018, 07:42
by CHA0SENG7NE
I have worked it out! Thank you

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 11:27
by CHA0SENG7NE
I have it working so movies are separated depending if 2160p/uhd into its own folder or anything else into the movie folder. Brilliant!
Code: Select all
\\192.168.0.111/{vf =~ /2160p|uhd|UHD/ ? 'uhd movies' : 'movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
I want to move anything uhd/2160p to a different network drive \\192.168.0.111/uhd movies
I have tried adding this into the format
Code: Select all
\\192.168.0.111/{vf =~ /2160p|uhd/ ? '\\192.168.0.111\uhd movies' : 'movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
It doesn't work when called from filebot but using filebot gui it worked fine?
Do I have to change the ouput in utorrent?
Code: Select all
filebot -script fn:amc --output "\\192.168.0.111\Multimedia" --action move --conflict auto -non-strict --def clean=y --def subtitles=en --def movieFormat=@"C:\Filebot Templates\movie.groovy" seriesFormat=@"C:\Filebot Templates\series.groovy" --def unsortedFormat="\\192.168.0.111\Multimedia\Unsorted Files\{file.structurePathTail}" music=n artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
I'm now totally stuck, any suggestions?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 11:44
by rednoah
1.
e.g. just yield different values for the host / share part:
Code: Select all
//{vf =~ /2160p/ ? 'ServerA/ShareA/UHD Movies' : 'ServerB/ShareB/Movies'}/
e.g. alternatively, this works too:
Code: Select all
{vf =~ /2160p/ ? '//ServerA/ShareA/UHD Movies' : '//ServerB/ShareB/Movies'}/
{vf} will never have the value
UHD.
2.
There's many ways to do it, the goal is to
generate a valid UNC path, a
NOT this:
Code: Select all
\\192.168.0.111/\\192.168.0.112\uhd movies\...

Does this kind of path work? IDK. But lets not ever generate file paths like this.

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 12:07
by CHA0SENG7NE
Oh boy I have just realised I'm rubbish at this! HAHAHAHA
Yep I can see how it should work now that makes sense...
Ill give it a try tonight.
Thanks for helping a noob..... again Rednoah

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 14:03
by CHA0SENG7NE
should I still leave the --output "//192.168.0.111/Multimedia" in the utorrent run program? Or will the movie.groovy file sort that now?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 15:40
by rednoah
--output must always point to a valid writable folder for various reasons. Among other things, it's used as base path for relative formats, but if your format is already absolute, then files will be organized exactly as per your absolute format regardless of output folder.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 30 Aug 2018, 15:46
by CHA0SENG7NE
ok perfect. thanks
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 08:29
by CHA0SENG7NE
Code: Select all
\\192.168.0.111\{vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
This is what I ended up using and works perfectly. Thank you
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 08:31
by CHA0SENG7NE
Another issue I sometime get with
Code: Select all
{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
The certification doesn't always get filled in? Is there a way to remove brackets if it isn't available otherwise I get left with []
Thanks
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 10:19
by rednoah
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 11:31
by CHA0SENG7NE
Perfect! I think I'm completely sorted now Rednoah.
Amazing software!
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 11:39
by rednoah
CHA0SENG7NE wrote: 31 Aug 2018, 11:31
Amazing software!
Please spread the word~

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 31 Aug 2018, 11:41
by CHA0SENG7NE
Don't worry I have

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Sep 2018, 06:48
by Redskyer
Hi,
I have a similar problem and don't want to open a new threat for that.
I also want to seperate movies and tv-shows into different folders, but depending on their certification.
It works well as long as the movie or tv-show is certified. When there is no certification, the movie or tv-show won't come into right folder.
I'm using the rednoah/filebot container for docker on a Windows Host.
Code: Select all
filebot -script 'fn:sysinfo'
------------------------------------------
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 37 MB Used Memory
OS: Linux (amd64)
HW: Linux fed35c725cdc 4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018 x86_64 GNU/Linux
DATA: /data/.filebot
Package: DOCKER
License: FileBot License XXXXX (Valid-Until: 2068-08-30)
Done ヾ(@⌒ー⌒@)ノ
------------------------------------------
[Process completed]
This is the part of my script (movie):
Code: Select all
{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}/{n} ({y})/{n} ({y}) {' CD'+pi}
This is the part of my script (tv-show):
Code: Select all
{certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{certification} - {n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
I've created 2 example files to demonstrate what is happening.
Output from GUI:
Code: Select all
filebot -script 'fn:amc' /volume1/JDownloader --output /volume1 --action TEST -non-strict --order Airdate --conflict auto --lang de --def 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=eng' 'clean=y' 'deleteAfterExtract=y' 'minLengthMS=0' 'minFileSize=0' 'seriesFormat={certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? '\''Kinderserien'\'' : '\''Serien'\''}/{n} ({y})/{episode.special ? '\''Special'\'' : '\''Staffel '\''+s.pad(2)}/{n} - {episode.special ? '\''S00E'\''+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart('\'', Part $1'\'')}{'\''.'\''+lang}' 'animeFormat={certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? '\''Kinderserien'\'' : '\''Serien'\''}/{n} ({y})/{episode.special ? '\''Special'\'' : '\''Staffel '\''+s.pad(2)}/{n} - {episode.special ? '\''S00E'\''+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart('\'', Part $1'\'')}{'\''.'\''+lang}' 'movieFormat={certification == "G" || certification == "PG" ? '\''Kinderfilme'\'' : '\''Filme'\''}/{n} ({y})/{n} ({y}) {'\'' CD'\''+pi}' 'musicFormat=Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}' 'unsortedFormat=Unbekannt/{fn}.{cf}' 'excludeList=.excludes' --log all --log-file '/usr/local/filebot-node/data/filebot.log'
------------------------------------------
Locking /usr/local/filebot-node/data/filebot.log
Run script [fn:amc] at [Fri Sep 07 06:36:38 UTC 2018]
Parameter: music = y
Parameter: unsorted = y
Parameter: artwork = y
Parameter: subtitles = eng
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: minFileSize = 0
Parameter: seriesFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Parameter: animeFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Parameter: movieFormat = {certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}/{n} ({y})/{n} ({y}) {' CD'+pi}
Parameter: musicFormat = Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}
Parameter: unsortedFormat = Unbekannt/{fn}.{cf}
Parameter: excludeList = .excludes
Argument[0]: /volume1/JDownloader
Use excludes: /volume1/.excludes (1)
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Input: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
rush.hour.h264.br-rip.mkv [series: Rush Hour, movie: Rush Hour (1998)]
Exclude Series: Rush Hour
Group: [tvs:dragon ball] => [dragon.ball.s01e01.h264.br-rip.mkv, dragon.ball.s01e05.h264.br-rip.mkv]
Group: [tvs:null, mov:rush hour 1998] => [rush.hour.h264.br-rip.mkv]
Get [English] subtitles for 2 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Dragon Ball]
Fetching episode data for [Dragon Ball]
Fetching episode data for [Dragon Ball Z]
Fetching episode data for [Dragon Ball GT]
Fetching episode data for [Dragon Ball Kai]
Fetching episode data for [Dragon Ball Super]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E01 - Das Geheimnis des Dragonballs.mkv]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E05 - Yamchu der Wüstenräuber.mkv]
Processed 2 files
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv]
[TEST] from [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv] to [/volume1/Filme/Rush Hour (1998)/Rush Hour (1998).mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
------------------------------------------
[Process completed]
Output from CLI (PowerShell):
Code: Select all
docker run --rm --volumes-from Filebot_GUI --mount type=bind,source="Z:\Downloads",target=/volume1 --name Filebot rednoah/filebot -script 'fn:amc' /volume1/JDownloader/ --output /volume1/ --action TEST -non-strict --order Airdate --conflict auto --lang de --def 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=eng' 'clean=y' 'deleteAfterExtract=y' 'minLengthMS=0' 'minFileSize=0' 'seriesFormat={certification == "\""TV-Y"\"" || certification == "\""TV-Y7"\"" || certification == "\""TV-G"\"" ? "\""Kinderserien"\"" : "\""Serien"\""}/{n} ({y})/{episode.special ? "\""Special"\"" :"\""Staffel "\""+s.pad(2)}/{n} - {episode.special ? "\""S00E"\""+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart("\"", Part ${1}"\"")}{"\""."\""+lang}' 'animeFormat={certification == "\""TV-Y"\"" || certification == "\""TV-Y7"\"" || certification == "\""TV-G"\"" ? "\""Kinderserien"\"" : "\""Serien"\""}/{n} ({y})/{episode.special ? "\""Special"\"" : "\""Staffel "\""+s.pad(2)}/{n} - {episode.special ? "\""S00E"\""+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart("\"", Part ${1}"\"")}{"\""."\""+lang}' 'movieFormat={certification == "\""G"\"" || certification == "\""PG"\"" ? "\""Kinderfilme"\"" : "\""Filme"\""}/{n} ({y})/{n} ({y}) {"\"" CD"\""+pi}' 'musicFormat=Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}' 'unsortedFormat=Unbekannt/{fn}.{cf}' 'excludeList=.excludes' --log all --log-file '/usr/local/filebot-node/data/filebot.log'
Locking /usr/local/filebot-node/data/filebot.log
Run script [fn:amc] at [Fri Sep 07 07:00:20 UTC 2018]
Parameter: music = y
Parameter: unsorted = y
Parameter: artwork = y
Parameter: subtitles = eng
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: minFileSize = 0
Parameter: seriesFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? "Kinderserien" : "Serien"}/{n} ({y})/{episode.special ? "Special" : "Staffel "+s.pad(2)}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(", Part ${1}")}{"."+lang}
Parameter: animeFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? "Kinderserien" : "Serien"}/{n} ({y})/{episode.special ? "Special" : "Staffel "+s.pad(2)}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(", Part ${1}")}{"."+lang}
Parameter: movieFormat = {certification == "G" || certification == "PG" ? "Kinderfilme" : "Filme"}/{n} ({y})/{n} ({y}) {" CD"+pi}
Parameter: musicFormat = Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}
Parameter: unsortedFormat = Unbekannt/{fn}.{cf}
Parameter: excludeList = .excludes
Argument[0]: /volume1/JDownloader
Use excludes: /volume1/.excludes (1)
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Input: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
rush.hour.h264.br-rip.mkv [series: Rush Hour, movie: Rush Hour (1998)]
Exclude Series: Rush Hour
Group: [tvs:dragon ball] => [dragon.ball.s01e01.h264.br-rip.mkv, dragon.ball.s01e05.h264.br-rip.mkv]
Group: [tvs:null, mov:rush hour 1998] => [rush.hour.h264.br-rip.mkv]
Get [English] subtitles for 2 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Dragon Ball]
Fetching episode data for [Dragon Ball]
Fetching episode data for [Dragon Ball Z]
Fetching episode data for [Dragon Ball GT]
Fetching episode data for [Dragon Ball Kai]
Fetching episode data for [Dragon Ball Super]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E01 - Das Geheimnis des Dragonballs.mkv]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E05 - Yamchu der Wüstenräuber.mkv]
Processed 2 files
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv]
[TEST] from [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv] to [/volume1/Filme/Rush Hour (1998)/Rush Hour (1998).mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
As you can see, Dragon Ball is not moved into the "volume1/Serien/..." folder as expected, but to "/Dragon Ball/...", what makes no sense. Any idea what's going wrong?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Sep 2018, 18:30
by rednoah
I'm not sure what the problem is. Do you have a simple test case that illustrates the problem?
A quick glance shows that you might not take the exceptional / undefined case into account:
viewtopic.php?f=5&t=1895
e.g. if certification is undefined, the expression will fail, and the result will be nothing, and not "Filme" as you might expect from this code:
Code: Select all
{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}
e.g. take certification undefined into account like this:
Code: Select all
{any{if (certification == "G" || certification == "PG") 'Kinderfilme'}{'Filme'}}
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Sep 2018, 20:22
by kim
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Sep 2018, 22:09
by Redskyer
rednoah wrote: 07 Sep 2018, 18:30
I'm not sure what the problem is. Do you have a simple test case that illustrates the problem?
A quick glance shows that you might not take the exceptional / undefined case into account:
viewtopic.php?f=5&t=1895
e.g. if certification is undefined, the expression will fail, and the result will be nothing, and not "Filme" as you might expect from this code:
Code: Select all
{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}
e.g. take certification undefined into account like this:
Code: Select all
{any{if (certification == "G" || certification == "PG") 'Kinderfilme'}{'Filme'}}
That is the solution for my problem!
Thank you very much!
@kim: That's also a good idea. Everytime I see a problem like this, I'll update the database.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 06 Oct 2018, 16:20
by CHA0SENG7NE
Code: Select all
\\192.168.0.111\{vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
With moving fIles to different folders using resolution is it also possible to add another folder for just 3d movies?
E.g depending on whether its 2160p,3d or standard movie?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 06 Oct 2018, 17:36
by rednoah
Yes, works exactly the same:
Code: Select all
{f =~ /3D/ ? '3D Movies' : vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}

How you identify 3D Movies is more tricky though. In this example we assume that 3D movies have "3D" in the file path.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 06 Oct 2018, 20:40
by CHA0SENG7NE
Thank you. That does make sense but as you are relying on the file containing 3d. Can you add extra options? Say 3-d or 3.d ? Just to give more chance?
Is this correct ?
Code: Select all
{f =~ /3D|3.d|3-d/ ? '3D Movies' : vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}
Thanks again Rednoah
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 06 Oct 2018, 23:51
by kim
Regular Expression:
https://regexr.com/
Code: Select all
{f =~ /(?i)3D|3\.D|3\-D/ ? '3D Movies' : '3D...NOT!'}
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Oct 2018, 06:00
by rednoah
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?
EDIT:
[SNIPPET] Separate 4K Movies and non-4K Movies
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 07 Oct 2018, 12:41
by CHA0SENG7NE
Thanks rednoah,
That has worked perfectly.
I just tried with a batch of different files. All going to the correct location.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 08 Oct 2018, 15:28
by CHA0SENG7NE
Hi Rednoah, just want to say thanks. The 3D movies I have are now sorted into the correct folder. Works perfectly

Re: Help! Seperating Movies into different folders HD & 4k
Posted: 09 Oct 2018, 20:35
by howdymilsap
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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 10 Oct 2018, 07:26
by rednoah
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
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 29 Oct 2018, 23:30
by yodaspowart
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}" \
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 09 Dec 2018, 20:48
by TomTomTuning
Is there any way I an direct 4K content to a specific folder while using FileBot Node?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 10 Dec 2018, 08:48
by rednoah
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.

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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 08 Jun 2019, 11:01
by devster
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
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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 01 Oct 2019, 23:28
by eggsplorer
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"
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 02 Oct 2019, 03:12
by rednoah
What does
filebot -script fn:sysinfo say?

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.

Please read
How to Request Help.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 02 Oct 2019, 13:08
by eggsplorer
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?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 02 Oct 2019, 13:28
by rednoah
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])
viewtopic.php?t=4285
2.

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

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

Running is
root is also strongly discouraged.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 02 Oct 2019, 15:42
by eggsplorer
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?
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 02 Oct 2019, 16:06
by rednoah
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:
https://unix.stackexchange.com/a/32860/78608
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 03 Oct 2019, 02:34
by eggsplorer
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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 03 Oct 2019, 07:19
by rednoah
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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 03 Oct 2019, 11:38
by eggsplorer
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.
Re: Help! Seperating Movies into different folders HD & 4k
Posted: 13 Jul 2022, 22:40
by rednoah