Page 1 of 1
Put video resolution into "Dimensions" column too?
Posted: 08 Jul 2024 11:27
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
Re: Put video resolution into "Dimensions" column too?
Posted: 08 Jul 2024 11:40
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...
Re: Put video resolution into "Dimensions" column too?
Posted: 08 Jul 2024 13:21
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?
Re: Put video resolution into "Dimensions" column too?
Posted: 08 Jul 2024 23:12
by RalphM
Now you're just confusing your current topics that you posted in.

Re: Put video resolution into "Dimensions" column too?
Posted: 09 Jul 2024 07:58
by tobwen
RalphM wrote: ↑08 Jul 2024 23:12
Now you're just confusing your current topics that you posted in.

Sorry, was wrong browser tab. I edited my post.
The request is still open
Re: Put video resolution into "Dimensions" column too?
Posted: 09 Jul 2024 11:55
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.

Re: Put video resolution into "Dimensions" column too?
Posted: 09 Jul 2024 14:23
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.
Great news!
I hope photos and videos use the same column. Keep it simple stupid
Re: Put video resolution into "Dimensions" column too?
Posted: 16 Jul 2024 22:50
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
Re: Put video resolution into "Dimensions" column too?
Posted: 16 Jul 2024 22:56
by admin
That video works fine here. 1800 x 1080 is shown in the Dimensions column.
Re: Put video resolution into "Dimensions" column too?
Posted: 17 Jul 2024 00:02
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 (52.75 KiB) Viewed 2743 times
Re: Put video resolution into "Dimensions" column too?
Posted: 17 Jul 2024 09:14
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.)
Re: Put video resolution into "Dimensions" column too?
Posted: 17 Jul 2024 17:36
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.