Aspect ratio column for video files

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Aspect ratio column for video files

Post by kiwichick »

Is it possible to have a column to display the aspect ratio for video files? I have the latest XY beta, MediaInfo Lite and K-Lite Codec Pack installed.

I tried adding a column as follows but the column is empty:
1. Right-click a column header and select "Add column".
2. Right-click the added column header and select "Select Special Property".
3. Choose "Aspect ratio".

I also created a custom column as follows but the column is still empty:
Format: Text Right-Aligned
Trigger: Browse
Item type: Files
Item filter: mp4;mkv;avi;flv;mpg;mpeg;m4v
Windows 10 Pro 22H2

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Aspect ratio column for video files

Post by admin »

Currently not supported. The problem here is that extracting the dimensions for videos is usually much slower than for images (because for most image formats I have learned to do it myself over the years, whereas for videos I have to rely on 3rd party shell extensions).

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Aspect ratio column for video files

Post by highend »

Ofc you could do it with a scripted custom column (but it would be slow...)
One of my scripts helped you out? Please donate via Paypal

kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Re: Aspect ratio column for video files

Post by kiwichick »

admin wrote: 06 Jun 2022 12:13 Currently not supported. The problem here is that extracting the dimensions for videos is usually much slower than for images (because for most image formats I have learned to do it myself over the years, whereas for videos I have to rely on 3rd party shell extensions).
Thanks Don, I do apologise. Perhaps I should have read the Help file first (insert pace palm emoji here) and I would have known that aspect ratio is for images not videos.
Windows 10 Pro 22H2

kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Re: Aspect ratio column for video files

Post by kiwichick »

highend wrote: 06 Jun 2022 12:16 Ofc you could do it with a scripted custom column (but it would be slow...)
Thanks, it's not the type of column I would have visible by default. It's just that sometimes it would be handy to have a column to show instead of bringing up MediaInfo for each file.
Windows 10 Pro 22H2

kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Re: Aspect ratio column for video files

Post by kiwichick »

admin wrote: 06 Jun 2022 12:13 Currently not supported. The problem here is that extracting the dimensions for videos is usually much slower than for images (because for most image formats I have learned to do it myself over the years, whereas for videos I have to rely on 3rd party shell extensions).
Hi Don, just wondering if there's any way to display the video aspect ratio (and dimensions) as part of the Status Bar Template? That way it would only be required to extract the info for one file at a time so, presumably, nowhere near as slow as displaying that info for all files in a column.
Windows 10 Pro 22H2

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Aspect ratio column for video files

Post by admin »

OK, in the next beta you can use a status bar template like this (note: 2 spaces between dimensions and "%w% x %h% [%a%]":

Code: Select all

ic||* - <get dimensions  "%w% x %h% [%a%]">
It will work for images and videos.

kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Re: Aspect ratio column for video files

Post by kiwichick »

admin wrote: 09 Jun 2022 10:40 OK, in the next beta you can use a status bar template like this (note: 2 spaces between dimensions and "%w% x %h% [%a%]":

Code: Select all

ic||* - <get dimensions  "%w% x %h% [%a%]">
It will work for images and videos.
Fantastic, Don, thanks. I'll be sure to check it out.

UPDATE: Wow, that new Beta works great!!! Perfect :tup:
Windows 10 Pro 22H2

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Aspect ratio column for video files

Post by jupe »

This isn't a request, it's just a suggestion, but since you are already recently working on this, it might be an idea to have a variable for Area too, it would allow access to it in places scripting isn't possible, and save manual calculation where scripting is available.
If you were to implement it, I realize %a% is already taken, but since its a new feature not doc'd yet, you could possibly change that to %r% and have %a% for Area.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Aspect ratio column for video files

Post by admin »

Love it. :tup:

kiwichick
Posts: 557
Joined: 08 Aug 2012 04:14
Location: Pahiatua, New Zealand

Re: Aspect ratio column for video files

Post by kiwichick »

admin wrote: 09 Jun 2022 10:40 OK, in the next beta you can use a status bar template like this (note: 2 spaces between dimensions and "%w% x %h% [%a%]":

Code: Select all

ic||* - <get dimensions  "%w% x %h% [%a%]">
It will work for images and videos.
Don, I just had to come back and comment on this again. Thank you, thank you, thank you so much for this. In the relatively short time it's been since you added it, you wouldn't believe how many times I've used it as a quick reference in my status bar! :appl: :appl: :appl: :appl: :appl: :appl: :appl:
Windows 10 Pro 22H2

Post Reply