Page 1 of 1

[{vc}] IF it is using h.264

Posted: 15 Jul 2025, 14:13
by DigidocTN
If this is not posted correctly, or in the correct place, I am sorry.
Here is the format I am using to rename TV shows:

Format: Select all

{n.upperInitial ()} {s.pad 2}x{e.pad 2} {t} [{ vf.replace ('2160p':'4K') }] [{vc}]
While this works, I would like help in refining it just a bit. I am only interested in having the encoding appear [{vc}] IF it is using h.264. Otherwise, do not display it at all. This is a reminder to me that this file should be re-encoded with HEVC to use less storage space. Later, after I convert, this will no longer appear in my title. Thanks for any help.

Re: [{vc}] IF it is using h.264

Posted: 15 Jul 2025, 14:34
by rednoah
:idea: You can use Conditional Structures (if-then-else) like so:

e.g. add {vc} video codec if {vcf} video codec standard is AVC aka h.264:

Format: Select all

{ if (vcf == /AVC/) ' [' + vc + ']' }
e.g. add [NOT HEVC] if {vcf} is not HEVC:

Format: Select all

{ if (vcf != /HEVC/) ' [NOT HEVC]' }
↑↑ this probably better captures your intent of marking files that are not HEVC yet


:!: Note that {s.pad 2}x{e.pad 2} only works for regular episodes; but will fail to format correctly special episodes and multi-episodes. I recommend using {sxe} or {s00e00} instead, possibly like so if you must have the 01x01 pattern:

Format: Select all

{ s00e00.replace('S':'', 'E':'x') }



tl;dr

Format: Select all

{ n.upperInitial().sortName('$2, $1') } { s00e00.replace('S':'', 'E':'x') } [{ vf.replace ('2160p':'4K') }] { if (vcf != /HEVC/) ' [NOT HEVC]' }

Code: Select all

Adventures Of Batman, The 01x01 [480p] [x264] [NOT HEVC]
** I have added sortName() as discussed in PM

Re: [{vc}] IF it is using h.264

Posted: 15 Jul 2025, 15:24
by DigidocTN
Perfect! I like your suggestion { if (vcf != /HEVC/) ' [NOT HEVC]' } better than mine. I do not care what the resolution is, only that I need to compress with HEVC.