Page 1 of 1

Video Aspect Ratio Column

Posted: 23 Jun 2017 01:19
by DarKHawK
Hello,

I need help with a script that displays video files aspect ratio, or Width/Height result.

Thanks.

Re: Video Aspect Ratio Column

Posted: 23 Jun 2017 07:47
by highend

Code: Select all

return round(property("System.Video.FrameWidth", <cc_item>) / property("System.Video.FrameHeight", <cc_item>), 2);
But if you don't want a normal value, you probably need to add a lookup table as well
E.g. 1.78 is 16x9
etc.

This does only work with video files supported by either the OS or with a codec installed (e.g. K-Lite Codec package)
If not you would need to use MediaInfo (the command line version of it)

Re: Video Aspect Ratio Column

Posted: 23 Jun 2017 12:20
by DarKHawK
Thank you.