Page 1 of 1

VC Pulls Writing Library Instead of Video Codec

Posted: 04 Jun 2021, 15:37
by techmattr
When using the VC format expression it pulls the writing library instead of the actual codec.

Image

ATEME is the writing library. It should parse the codec for HEVC or pull the format.

Image

Re: VC Pulls Writing Library Instead of Video Codec

Posted: 05 Jun 2021, 01:58
by rednoah
I'm not familiar with ATEME and if there's anything special about it. {vc} primarily relies on video[0].Encoded_Library_Name because it works best for common codecs such as x264 and friends that are all AVC format compatible.


:arrow: If {vc} doesn't work well for your files, then you can just use any other MediaInfo property, whichever works best for your files:

Code: Select all

video[0].Format

Re: VC Pulls Writing Library Instead of Video Codec

Posted: 05 Jun 2021, 03:30
by techmattr
Looks like its mainly an issue with UHD files. Probably because the uploaders are using some encoding on the fly software that uses that library for encoding HEVC.

It's not my files that are an issue its that library isn't the correct field for identifying the codec. As its the software used to encode the file. Not the codec itself. It's like x264 vs H.264/AVC. x264 isn't the codec its the library. I've seen a lot of files pulling x264 as the codec as well which is incorrect. Most files don't contain a video[0].Encoded_Library_Name though. In those instances it pulls the correct codec. Does it fallback to Format when it doesn't find Encoded_Library_Name?

I've yet to come across a file that didn't have the correct codec in the Format field though.

Re: VC Pulls Writing Library Instead of Video Codec

Posted: 05 Jun 2021, 05:58
by rednoah
techmattr wrote: 05 Jun 2021, 03:30 It's not my files that are an issue its that library isn't the correct field for identifying the codec. As its the software used to encode the file. Not the codec itself. It's like x264 vs H.264/AVC. x264 isn't the codec its the library.
That's technically correct, but {vc} yields the value that (most) users expect to see, and not necessarily the video codec value that is technically correct. Just like how {vf} would yield 720p instead 680i for 1000x680-interlaced.


techmattr wrote: 05 Jun 2021, 03:30 Does it fallback to Format when it doesn't find Encoded_Library_Name?
{vc} is based on one of the following MediaInfo properties, whichever one exists, in order of priority:

Code: Select all

"Encoded_Library_Name", "Encoded_Library/Name", "CodecID/Hint", "Format"

techmattr wrote: 05 Jun 2021, 03:30 I've yet to come across a file that didn't have the correct codec in the Format field though.
Best to just use video[0].Format in your custom format. Some users prefer how {vc} works. Some users prefer {video[0].Format}. "correctness" is ultimately a personal preference in this case.



EDIT:

FileBot r8606 adds the {vcf} video compression format binding.

Re: VC Pulls Writing Library Instead of Video Codec

Posted: 06 Jun 2021, 01:45
by techmattr
Yeah I updated mine to use {video[0].Format}. This seems to result in the most accurate to the original file naming conventions.

Code: Select all

{n} ({y})/{if (ext == 'idx') 'Subs/'}{if (ext == 'sub') 'Subs/'}{if (ext == 'srt') 'Subs/'}{n} ({y}) - {''+hdr+'.'}{vf}.{source}{'.'+fn.match(/REMUX/)}.{video[0].Format}.{aco}.{channels}.{group}