Filebot picks up featurettes instead of movie file
Filebot picks up featurettes instead of movie file
Is it possible to have the amc script to pick the biggest file in the folder looked up?
Say I have a folder with actual movie file and featurettes. Sometimes filebot renames a featurette file as actual movie while ignoring actual movie file.
Actual movie file is always the biggest one hence i thought that if it's possible to make the script pick that would solve the issue. But if there's another way would be ok too.
Say I have a folder with actual movie file and featurettes. Sometimes filebot renames a featurette file as actual movie while ignoring actual movie file.
Actual movie file is always the biggest one hence i thought that if it's possible to make the script pick that would solve the issue. But if there's another way would be ok too.
Re: Filebot picks up featurettes instead of movie file
Per folder, not in particular. But you can probably use --def minFileSize to exclude everything that isn't a full-featured movie based on file size alone.
Re: Filebot picks up featurettes instead of movie file
The problem with that is that there are featurette files which are bigger than movie files (I mean for different movies). For a movie I might have a featurette file of say 2,3GB. For another movie I might have the actual movie file of 1,9GB. That's why I was thinking to pick up the biggest, not to set an absolute minimum size. But I seem to understand it isn't possible.
A way around could be this. Featurette files are in a subfolder (featurettes). Is it possible to have the script to ignore subfolders?
A way around could be this. Featurette files are in a subfolder (featurettes). Is it possible to have the script to ignore subfolders?
Re: Filebot picks up featurettes instead of movie file
If you know which files to process, then you can just pass those in directly, i.e. don't pass in a folder, pass in files.
This might be useful:
viewtopic.php?f=3&t=4222
This might be useful:
viewtopic.php?f=3&t=4222
Re: Filebot picks up featurettes instead of movie file
Structure is like this:
Movies to process/Mission Impossible/Mission Impossible.mkv
Movies to process/Mission Impossible/Featurettes/Mission Impossible Behind The Scenes.mkv
Movies to process/The Interview/The Interview.mkv
and so on...
Each movie has its own folder. If I'm understanding well, solution above doesn't fit.
To be clear, right now I'm using
Hence it looks all files in that folder and subfolders.
Movies to process/Mission Impossible/Mission Impossible.mkv
Movies to process/Mission Impossible/Featurettes/Mission Impossible Behind The Scenes.mkv
Movies to process/The Interview/The Interview.mkv
and so on...
Each movie has its own folder. If I'm understanding well, solution above doesn't fit.
To be clear, right now I'm using
Code: Select all
move "/Movies To process"
Last edited by Catmal on 27 Jul 2018, 02:22, edited 1 time in total.
Re: Filebot picks up featurettes instead of movie file
1.
Isn't anything with "Featurettes" in the folder already excluded by default? If not, then you can just set --def ignore="Featurettes|Interview". You might need to add additional blacklisted words depending on your files.
2.
This command will print the largest file for each folder structure:
➔ You can use -exec to pass those file paths as arguments to a second filebot amc call.
Isn't anything with "Featurettes" in the folder already excluded by default? If not, then you can just set --def ignore="Featurettes|Interview". You might need to add additional blacklisted words depending on your files.
2.
This command will print the largest file for each folder structure:
Code: Select all
filebot -mediainfo -r . --file-filter 'folder.files.every{ it.length() <= f.length()}' --format {f}
Re: Filebot picks up featurettes instead of movie file
I actually did a mistake on last reply on folder structure. Fixed now..
Anyway as featurette files to ignore are always inside "Featurettes" folders, setting --def ignore="Featurettes" should solve the issue. As wrong files are choosen randomly I can't reproduce it at the moment. If problem still there I will post again. Thanks for now!
Anyway as featurette files to ignore are always inside "Featurettes" folders, setting --def ignore="Featurettes" should solve the issue. As wrong files are choosen randomly I can't reproduce it at the moment. If problem still there I will post again. Thanks for now!
Re: Filebot picks up featurettes instead of movie file
Just adding this to clarify for anyone that comes along. The files aren't randomly skipped/included for renaming. They are skipped/included for renaming depending on their size and length. That size and length is a hard number that rednoah has chosen in collaboration with Mr. Turner.
Re: Filebot picks up featurettes instead of movie file
I forget this even exists. I guess the current numbers work well for most use cases. 
Checking the code... for FileBot 4.9.2 (and possibly earlier) the default limits are 150 MB and 30 minutes respectively but are also configurable via system properties now:
The clutter pattern is hard-coded however and cannot be configured:
If a file matches these patterns, then it's going to get excluded, unless it's large enough or long enough as per limits discussed above, as to avoid false positives on auto-excluded extras.
TL;DR Files are excluded primarily based on file path (e.g. keyword "Behind the Scenes" is excluded) but large or long video files are always included regardless.
EDIT:
Clutter File Size Limits

Checking the code... for FileBot 4.9.2 (and possibly earlier) the default limits are 150 MB and 30 minutes respectively but are also configurable via system properties now:
Code: Select all
filebot -script fn:properties --def net.filebot.media.clutter.size=150 net.filebot.media.clutter.length=PT30M
The clutter pattern is hard-coded however and cannot be configured:
Code: Select all
(?<=[!\\-\\(\\[])(?:Sample|Trailer)|(?:Sample|Trailer)(?=[\\-\\)\\]])|(?<=[.\\-]|^)(?:s|t|Sample|Trailer)$|(?:NCED|NCOP|(?:OP|ED)\\p{Digit}\\p{Alpha})|(?:Extras|Trailers|Featurettes|Interviews|Scenes|Shorts)$|Behind.the.Scenes|Deleted.and.Extended.Scenes|Deleted.Scenes


EDIT:

Re: Filebot picks up featurettes instead of movie file
Is there anyway I can use
in the GUI with my format:
Does skip files or folders. Case sensitive?
Code: Select all
--def ignore="behindthescenes|deleted|featurettes|interview"
Code: Select all
{plex.derive{' {imdb-'}{imdbid}{'}'}{' ['+allOf{tags}{audio.language}{vf}{vs}{vc}{crc32}.join(' ')}{']'}}{if (dc > 1) '.'+di}
Code: Select all
--def ignore="…"
Re: Filebot picks up featurettes instead of movie file
1.
--def ignore is a amc script option so it has no effect on the GUI nor typical CLI calls.
2.
You can use scriptable file filters in Presets though, akin to --file-filter on the command-line:

--def ignore is a amc script option so it has no effect on the GUI nor typical CLI calls.
2.
You can use scriptable file filters in Presets though, akin to --file-filter on the command-line:

Re: Filebot picks up featurettes instead of movie file
Your hardcoding suggests you have settled on supporting Plex's subdirectory method of organizing local files for trailers and extras versus their inline method?
You may want to capitalize "the" in your hardcoding? "Behind The Scenes"

Organized in Subdirectories
You can organize your local extras into specific subdirectories inside the main directory named for the movie. Extras will be detected and used if named and stored as follows:Where Extra_Directory_Type is one of:Code: Select all
Movies/MovieName (Release Date)/Extra_Directory_Type/Descriptive_name.ext
It is recommended that you provide some sort of descriptive name for the extras filenames.Code: Select all
Behind The Scenes Deleted Scenes Featurettes Interviews Scenes Shorts Trailers Other
Code: Select all
/Movies /Avatar (2009) Avatar (2009).mkv /Behind The Scenes Performance Capture.mkv /Deleted Scenes Bar Fight.mp4 Lost Sister.mkv /Interviews Sigourney Weaver.mp4 Stephen Lang.mp4 /Scenes Arrival.mp4 /Trailers Teaser Trailer.mp4 Theatrical Trailer #1.mp4 Theatrical Trailer #2.mp4
Re: Filebot picks up featurettes instead of movie file
Well, these patterns have evolved with user input, and I guess there's a few Plex users among them. FileBot only "supports" these kinds of files in the sense that it knows that it doesn't support them at all, and thus wisely excludes them from processing by default.
Re: Filebot picks up featurettes instead of movie file
I think if you have created an amc script for Plex people would assume that it would support Plex conventions. I think it's great to have that script. Makes it so easy for the user.
That being said, I understand that creating and maintaining support for all of those platforms and their ever changing naming structures, their platform evolution, could become an unwanted burden.
That being said, I understand that creating and maintaining support for all of those platforms and their ever changing naming structures, their platform evolution, could become an unwanted burden.
Re: Filebot picks up featurettes instead of movie file
This is what I was thinking before I wrote. I am guessing the "!" excludes?rednoah wrote: ↑12 Oct 2020, 20:22 1.
--def ignore is a amc script option so it has no effect on the GUI nor typical CLI calls.
2.
You can use scriptable file filters in Presets though, akin to --file-filter on the command-line:
Re: Filebot picks up featurettes instead of movie file
! means not. It's just Groovy code as always.
e.g. select *.mp4 files
e.g. select everything but *.srt files
e.g. select *.mp4 files
Code: Select all
ext =~ /mp4/
Code: Select all
!(ext =~ /srt/)