Video Aspect Ratio Column

Discuss and share scripts and script files...
Post Reply
DarKHawK
Posts: 15
Joined: 25 Nov 2012 04:55

Video Aspect Ratio Column

Post by DarKHawK »

Hello,

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

Thanks.

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Video Aspect Ratio Column

Post 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)
One of my scripts helped you out? Please donate via Paypal

DarKHawK
Posts: 15
Joined: 25 Nov 2012 04:55

Re: Video Aspect Ratio Column

Post by DarKHawK »

Thank you.

Post Reply