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
Put video resolution into "Dimensions" column too?
Re: Put video resolution into "Dimensions" column too?
Just use a custom column?
Execute
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}
::snippet; from the address bar and paste in the above code...One of my scripts helped you out? Please donate via Paypal
Re: Put video resolution into "Dimensions" column too?
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?
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.
Re: Put video resolution into "Dimensions" column too?
Now you're just confusing your current topics that you posted in. 
Ralph 
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)
-
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?
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. 
FAQ | XY News RSS | XY X
Re: Put video resolution into "Dimensions" column too?
Great news!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.![]()
I hope photos and videos use the same column. Keep it simple stupid
Re: Put video resolution into "Dimensions" column too?
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
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?
That video works fine here. 1800 x 1080 is shown in the Dimensions column.
FAQ | XY News RSS | XY X
Re: Put video resolution into "Dimensions" column too?
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].
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].
- Attachments
-
- CAP_ 38854.jpg (18.22 KiB) Viewed 2737 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?
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.)
Here I'm using K-Lite Codec Pack v56.
(Use Sysinternals Process Explorer to find out what you are using.)
FAQ | XY News RSS | XY X
Re: Put video resolution into "Dimensions" column too?
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.
XYplorer Beta Club