Put video resolution into "Dimensions" column too?

Features wanted...
Post Reply
tobwen
Posts: 40
Joined: 08 Jan 2022 08:43

Put video resolution into "Dimensions" column too?

Post by tobwen »

When I enable "Dimensions" column then width and height of *.jpg photos are correctly shown in it.

Unfortunately the resolution of MP4 videos is not shown.

Can the "Dimension" column be used to shown for both (images AND videos (at least MP4))?

Thank you

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

Re: Put video resolution into "Dimensions" column too?

Post by highend »

Just use a custom column?

Code: Select all

Snip: CustomColumn 1
  XYplorer 26.20.0106, 08.07.2024 11:38:37
Action
  ConfigureColumn
Caption
  Dimensions
Type
  3
Definition
      // Image(s)
      if (strpos(get("genericfiletype", "{:Image}"), "*.<cc_ext>") != -1) {
          return property("#image.dimensions", <cc_item>);
  
      // Video(s)
      } elseif (strpos(get("genericfiletype", "{:Video}"), "*.<cc_ext>") != -1) {
          $fw = property("System.Video.FrameWidth", <cc_item>);
          if ($fw) { return $fw . " x " . property("System.Video.FrameHeight", <cc_item>); }
          return "";
      }
Format
  0
Trigger
  0
Item Type
  0
Item Filter
  {:Image};{:Video}
Execute ::snippet; from the address bar and paste in the above code...
One of my scripts helped you out? Please donate via Paypal

tobwen
Posts: 40
Joined: 08 Jan 2022 08:43

Re: Put video resolution into "Dimensions" column too?

Post by tobwen »

Thank you for your snippet.
I will use it as a last resort.

However I would prefer a built-in solution.

Can this be added in the next release?
Last edited by tobwen on 09 Jul 2024 07:57, edited 1 time in total.

RalphM
Posts: 2054
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Put video resolution into "Dimensions" column too?

Post by RalphM »

Now you're just confusing your current topics that you posted in. :whistle:
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

tobwen
Posts: 40
Joined: 08 Jan 2022 08:43

Re: Put video resolution into "Dimensions" column too?

Post by tobwen »

RalphM wrote: 08 Jul 2024 23:12 Now you're just confusing your current topics that you posted in. :whistle:
;) Sorry, was wrong browser tab. I edited my post.
The request is still open

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

Re: Put video resolution into "Dimensions" column too?

Post by admin »

I was a bit surprised that this did not work out of the box. Looking at notes in the code, I found that I had added this experimentally on 20220606, but found it to be too slow. However, I have since found ways to speed this up, so I was able to resurrect that old experimental code. The next beta will support dimension display for video files out of the box. :party:

tobwen
Posts: 40
Joined: 08 Jan 2022 08:43

Re: Put video resolution into "Dimensions" column too?

Post by tobwen »

admin wrote: 09 Jul 2024 11:55 I was a bit surprised that this did not work out of the box. Looking at notes in the code, I found that I had added this experimentally on 20220606, but found it to be too slow. However, I have since found ways to speed this up, so I was able to resurrect that old experimental code. The next beta will support dimension display for video files out of the box. :party:
Great news!
I hope photos and videos use the same column. Keep it simple stupid

Malarki
Posts: 208
Joined: 03 Dec 2019 02:51
Location: Windows 10 x64; 100% Scaling

Re: Put video resolution into "Dimensions" column too?

Post by Malarki »

Thanks for upgrading this video dimension capability, which seems to work on my MP4 and AVI files.

However, it only works on about 2/3 of my MKV videos. I understand that MKV is a container format and different contents might make it much harder to handle. So you may have no interest in trying to do so.

But if you want to look, I've uploaded the smallest example that I have (80MB) to Dropbox:
https://www.dropbox.com/scl/fi/z9jwm94n ... o6as3&dl=0

BTW the "MediaInfo" tool does show the dimensions of this correctly as 1800 x 1080.

Thanks

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

Re: Put video resolution into "Dimensions" column too?

Post by admin »

That video works fine here. 1800 x 1080 is shown in the Dimensions column.

Malarki
Posts: 208
Joined: 03 Dec 2019 02:51
Location: Windows 10 x64; 100% Scaling

Re: Put video resolution into "Dimensions" column too?

Post by Malarki »

Below are my results in a ::fresh instance of XY v26.20.0205 on Windows 10 x64.

Since it works for you, and for a large fraction of my other MKVs, can you suggest why it doesn't work on this one on my PC? Something I can investigate maybe.

[SIDE NOTE. With this Bico video I get the same result with a Trigger of "Browse" or "List". If I choose "Click" for the Trigger, I see a green "play" arrow in the Dimension box (see second picture below). If I click on that arrow, it just disappears, leaving an empty box. For an MKV file for which dimensions are displayed with "Browse" or "List", if I choose "Click" I get the same green arrow. But now when I click on the arrow it disappears and the dimensions are displayed. Probably nothing about this is surprising; just thought I'd mention it].
CAP_ 38853.jpg
CAP_ 38853.jpg (52.75 KiB) Viewed 2734 times
Attachments
CAP_ 38854.jpg
CAP_ 38854.jpg (18.22 KiB) Viewed 2734 times

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

Re: Put video resolution into "Dimensions" column too?

Post by admin »

XYplorer does not retrieve this information natively for MKV files, but uses the shell, which in turn uses a property handler, which is usually installed along with the application/codec you use to preview a certain file type, in this case MKV files.

Here I'm using K-Lite Codec Pack v56.

(Use Sysinternals Process Explorer to find out what you are using.)

Malarki
Posts: 208
Joined: 03 Dec 2019 02:51
Location: Windows 10 x64; 100% Scaling

Re: Put video resolution into "Dimensions" column too?

Post by Malarki »

Thanks! I've read the caveats on K-Lite Codec and decided to go ahead and install it. That fixed this symptom, and will probably let me play a few very old video files that had just stopped working (if they aver did) under VLC, which was the only major video tool I had installed.

Post Reply