Thumb overlay content for video files

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
metalslaw
Posts: 4
Joined: 04 Feb 2023 05:16

Thumb overlay content for video files

Post by metalslaw »

The 25.60 release allowed use of thumb overlay content.

The description was mainly for image files, so I played around with that for a while for image files, and then I tried getting it working for movie files, but alas, no dice.

I did note that in the Tools->Configuration->Preview->Thumbnails, there is a section for, select "show dimensions of original", and then select "for videos as well".

Enabling these two options will obviously show the dimensions on an image, but it will also show the image dimensions of the thumbnail for any movie file... So this is obviously working to some extent, but it's not obvious as to why, for example,

conf("ThumbsOverlayContent", '<prop Type>');

...will work on an image file, but not on a movie file.

Note, I do use Babelsoft's Media Preview program that generates windows thumbnails for movie files, but I don't think it would make a difference, as I indicated before, the overlay obviously works for showing the dimensions of the thumbnail for a movie file, as an overlay.

Is there some internal restriction that is preventing me from using this for movie files?

Ideally I wish to set it up such that movie files will show the "Total bitrate" property (which actually gives the bitrate for a movie file), and also "Frame height" property (which gives the horizontal resolution of the movie file).

I could then use these with ThumbsOverlayContent, with putting a "p" after the Frame height data, so that it shows up as, for example, 2160p.

Let me know if this is a user error, or current implementation restriction.

Thanks,
Ian

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

Re: Thumb overlay content for video files

Post by admin »

Confirmed. It is was indeed a current implementation restriction. Should work in the next beta.

metalslaw
Posts: 4
Joined: 04 Feb 2023 05:16

Re: Thumb overlay content for video files

Post by metalslaw »

Awesome :)

A quick addition/question/possible issue to consider then,

I did note that for all examples so far, they had used a sort of 'concatenated properties' wording for the 'prop' qualifier. i.e. There were none that were like "image.Horizontal Size" (with a space in it), they were all something like image.aspectratio or image.exposuretime (no space).

So will there be a way to qualify a prop with a space in it, such as a property like "Total bitrate"?

Alternatively, maybe a quick workaround is to set up a "Custom Column", and create a property with options of,
Caption : BitRate (i.e. no space in name)
Type : Property
Property : Total bitrate

Then use the new custom column as something like, Prop Video.BitRate?

Just wanted you to consider this, as I hadn't noticed any that used a space in the prop qualifier, so it could be an issue to look out for when implementing it.

Thanks,
Ian

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

Re: Thumb overlay content for video files

Post by admin »

No, properties with spaces are currently not supported in this context. But...

Have you tried just leaving out the space? It often works with shell properties where the official name (= column header) has spaces in it, e.g. "Camera Model". This works:
conf("ThumbsOverlayContent", '<prop CameraModel>');

If TotalBitrate does not work, this should: System.Video.TotalBitrate. Thousands of shell properties can be found here: https://learn.microsoft.com/en-us/windo ... ies-system

metalslaw
Posts: 4
Joined: 04 Feb 2023 05:16

Re: Thumb overlay content for video files

Post by metalslaw »

I got it somewhat working. :)

MP4 files seem to work, no problem. MKV files have issues, because they don't use the standard system based properties. i.e. When I right click, select properties, then click on details tab, virtually nothing is entered here for mkv files.

Anyway, here is what I got working,
xyplorer_example.jpg
xyplorer_example.jpg (37.65 KiB) Viewed 120 times
Current script,

conf("ThumbsOverlayContent", '<prop System.Video.TotalBitrate "Bitrate: *kbps"><crlf><prop System.Media.Duration "Duration: *n"><crlf><prop System.Video.FrameRate "Framerate: *n"><crlf><prop System.Video.FrameHeight>P<crlf><prop Type>');

Formatting for Bitrate worked. And I was able to get a "P" added to FrameHeight, to get it formatted into (for example) 1080P. However, I wasn't able to get Duration to format correctly. Currently it's just giving seconds, with nanoseconds(?) included, as a whole number.

e.g. The F1 video in the thumbnail is 11,362 seconds long. But it is formatted as the original stored number. I'm unsure how to get it formatted correctly to hhmmss.

I have a similar issue with FrameRate, however the *n actually puts a comma in the correct place, to get it to 'look right'. So for example 50000, when formatted with *n, adds a comma after 50, to give 50,000. Ideally I'd like the proper format variable required, as I'm nor sure if my hack method would work for everything.

But given most mkv files don't work, I'm not sure if this is worth further pursuit. They seem to use the containers mediainfo for all this info, rather than setting the inbuilt system properties for each file. So I think that the only workaround is setting these variables individually via a windows batch script interfacing with ffmpeg to extract the required info, then putting them into an xml file, to attach in mkvtoolnix. Given I would need to do this for probably almost all my mkv files. Not sure it's worth it.

Anyway, thanks with your effort on this. I'm sure someone will find some use for it for an collection that is primarily mp4.

Let me know if there is indeed a way to format that duration number into hhmmss. I tried a lot of things, and searched a lot, but couldn't get it to work.

Thanks,
Ian

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

Re: Thumb overlay content for video files

Post by jupe »

If you use the numbered shell properties they are usually preformatted into the desired style, for example if you are on Win10, something like this should be what you want, if on different OS you may have to adjust the numbers.

Code: Select all

conf("ThumbsOverlayContent", '<prop Bitrate:#320><crlf><prop Duration:#27><crlf><prop #315><crlf><prop System.Video.FrameHeight "*p"><crlf><prop Type>');
BTW if you have the correct shell extension installed you can get properties from mkv too.

@Don: It might be nice if the template supported separate prefixes for img and vid like how the CSBI supports prefixes.
eg. |i|<prop AspectRatio>|v|<prop Bitrate>

metalslaw
Posts: 4
Joined: 04 Feb 2023 05:16

Re: Thumb overlay content for video files

Post by metalslaw »

Thanks Jupe, that works perfectly.

For the developer/admin, it appears that mkv files do work, providing the info is in available in the properties->details tab.

I'll see if I can find a program that can easily copy the container properties for an mkv file to the windows properties for the mkv file.

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

Re: Thumb overlay content for video files

Post by admin »

Yes, as jupe said, MKV work fine if you have a fitting shell extension installed. I will try to do something about the format of Duration.
Attachments
2024-04-24_093236.png
2024-04-24_093236.png (55.74 KiB) Viewed 100 times

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

Re: Thumb overlay content for video files

Post by admin »

jupe wrote: 24 Apr 2024 04:05 @Don: It might be nice if the template supported separate prefixes for img and vid like how the CSBI supports prefixes.
eg. |i|<prop AspectRatio>|v|<prop Bitrate>
Whatever CSBI is, this looks like a good idea.

Post Reply