below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k

Any questions? Need some help?
Post Reply
DigidocTN
Posts: 10
Joined: 10 Jul 2025, 12:45
Location: N Georgia, near Chattanooga

below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k

Post by DigidocTN »

I have been using Filebot for 3 years now. I also have dementia so cannot think as well as when I was younger.

My renaming needs are simple. For TV shows, I use the following expression:

Format: Select all

{n} {s.pad(2)}x{e.pad(2)} {t.upperInitial()} {" [$vf]"} { if (vcf != /HEVC/) ' [NOT HEVC]' }
Today, my name expression vanished and it reverted back to the program default. I was mostly able to recover. I would also like it to show resolution of below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k. Thanks for any help provided.
User avatar
rednoah
The Source
Posts: 24105
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 720 as SD; 720p or 1080p as HD

Post by rednoah »

DigidocTN wrote: 28 Jul 2025, 14:54 show resolution of below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k. Thanks for any help provided.
The {hd} video definition class binding might just do the trick:

Format: Select all

{ hd }

Alternatively, you can take full control like so:

Format: Select all

{
	if (width >= 3840 || height >= 2160) return "4K"
	if (width >= 1280 || height >= 720) return "HD"
	return "SD"
}
:idea: Please read the FAQ and How to Request Help.
DigidocTN
Posts: 10
Joined: 10 Jul 2025, 12:45
Location: N Georgia, near Chattanooga

Add Capitalization of name, genre, resolution, and encoding

Post by DigidocTN »

Format: Select all

{n.colon(' - ')} ({y}){subt}{
	if (width >= 3840 || height >= 2160) return " [4K]"
	if (width >= 1280 || height >= 720) return " [HD]"
	return " [SD]"
}
This works. How can I add Capitalize Each Word In Name and add [genre of movie] after the name? Also, if the encoding is not HEVC, add [Not HEVC] to remind me it needs compressed. I am sorry for my poor thinking, I just break my expression when I try to fix it myself.

Here is an example of what I would like to get:
Bridget Jones Mad About The Boy (2025) [Romance, Comedy, Drama]-[4K].mkv
DigidocTN
Posts: 10
Joined: 10 Jul 2025, 12:45
Location: N Georgia, near Chattanooga

Articles: A, An, The removed from front of title

Post by DigidocTN »

I almost forgot. Add articles A,an,the to the end of the title. I managed to lose the code to change the title.
i.e. To change this:

The curse of bridge hollow (2022).mkv

into this instead:

Curse Of Bridge Hollow, The (2022)[Adventure, Comedy, Horror, Family]-[4K].mkv
DigidocTN
Posts: 10
Joined: 10 Jul 2025, 12:45
Location: N Georgia, near Chattanooga

Expression within { }

Post by DigidocTN »

I continue to try and learn. Each expression included within { } is a standalone, right? Is there a list of the published meta characters which can be used? For instance, t. is title; n. is name; s. is season, e. is episode and so on. Is there a list of all available codes? What are the codes for genre? For resolution? For encoding? For year? Do these characters come from the coding inside the Filebot program?

{t.upperInitial()} is the title for TV shows, but {n.upperInitial()} is the name for movies? Are they interchangeable or differ due to the type of lookup done? (1 rule for episode mode, another rule for movie mode?) I am not yet ready for music mode.

I assume then all these expressions can be strung together into the code you want? I am just starting to see nested expressions but do not tell me about those just yet. (They make my brain hurt). Please forgive my simplistic questions.
User avatar
rednoah
The Source
Posts: 24105
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k

Post by rednoah »

e.g. capitalize each word:

Format: Select all

{ n.upperInitial() }
e.g. add {genre} to the file path, but you likely mean to add the first 4 {genres} so that would work like so:

Format: Select all

{ genres.take(4) }
e.g. add [NOT HEVC] if it's not yet encoded:

Format: Select all

{ if (vcf != /HEVC/) ' [NOT HEVC]' }
e.g. put the The at the end:

Format: Select all

{ n.sortName('$2, $1') }


:arrow: You can thus put it all together like so:

Format: Select all

{ n.colon(' - ').upperInitial().sortName('$2, $1') } 
({y}) 
{ genres.take(4) }
{
	if (width >= 3840 || height >= 2160) return "-[4K]"
	if (width >= 1280 || height >= 720) return "-[HD]"
	return "-[SD]"
}
{ if (vcf != /HEVC/) ' [NOT HEVC]' }
{subt}


:arrow: You can find the list of top-level bindings in the Format Expressions › Binding Reference manual page.
:idea: Please read the FAQ and How to Request Help.
DigidocTN
Posts: 10
Joined: 10 Jul 2025, 12:45
Location: N Georgia, near Chattanooga

Re: below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k

Post by DigidocTN »

Thanks for the help, my renaming of movies is about perfect. After the naming is complete, is it possible to examine all the files in a folder, and -if- they do not include a defined year (2019); then move only those to another folder to examine then further?Perhaps to ask the year first, insert it as a variable into the expression, and move only those not containing that name?
User avatar
rednoah
The Source
Posts: 24105
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: below 720 as SD; 720p or 1080p as HD, and to show resolution of 2160p as 4k

Post by rednoah »

You can add a condition to your expression.

e.g. add this to the beginning of your format to move movies from 2019 into a separate folder from all other movies:

Shell: Select all

{ y == 2019 ? 'X:/path/to/2019-movies/' : 'X:/path/to/movies/' }
:idea: Please read the FAQ and How to Request Help.
Post Reply