Log in

View Full Version : Info2 / ShowFrameNumber2 / ShowTime2 / ShowSMPTE2 - fast alternatives


wonkey_monkey
6th May 2026, 23:50
Info2 v0.2 (https://horman.net/avisynth/)
Direct link (https://horman.net/avisynth/download/info2_v0.2.zip)
Documentation: https://horman.net/avisynth/info2/info2.html

https://horman.net/avisynth/info2/all-in-one.jpg
All four filters applied to the same clip

I recently discovered just how slow ShowFrameNumber is - 15fps on 8-bit 4:2:0 4K video - so I've updated my old Info2 (https://forum.doom9.org/showthread.php?t=176563) plugin to add ShowFrameNumber2, ShowTime2, and ShowSMPTE2 as much faster alternatives (~900fps on 8-bit 4:2:0 4K video).

Info2 has also been updated with frame property pass-through support.

I haven't copied ShowFrameNumber's left/right repeating column or scroll layouts (and won't, unless someone can make a really good case for them), but I have included indicators for top/bottom frames of field-separated video.

ShowSMPTE2 shows drop-frame timecode (https://en.wikipedia.org/wiki/SMPTE_timecode#Drop-frame_timecode) on 29.97 fps and 59.94 fps clips. 23.976, 47.952, and 119.88 fps clips are also accepted, but rounded up. Otherwise only integer framerates are accepted.

There are no colour or halo options, but you can change the position, font, size, and aspect ratio.

https://horman.net/avisynth/info2/sfn1.jpg https://horman.net/avisynth/info2/sp1.jpg
ShowFrameNumber2 _______ | _______ ShowSMPTE2_______

StainlessS
7th May 2026, 01:26
Thank you my lord.

EDIT: Dear god, apparently source code too. (tanks wonkey)

Reel.Deel
7th May 2026, 20:26
Thank you wonkey, looks good!

ShowFrameNumber, et al, are faster when anti-aliasing is disabled (noaa=true), not sure by how much. I believe I asked pinterf once about adding the ability to use 'Text' rather than 'Subtitle' for rendering. Using Text would be much faster.

wonkey_monkey
7th May 2026, 21:56
ShowFrameNumber, et al, are faster when anti-aliasing is disabled (noaa=true), not sure by how much.

Really? At what resolution and colour space?

I get the same framerates whether noaa is on or off - 350fps at 720x756, 55fps at 1920x1080, and 15fps at 3840x2160.

Whereas ShowFrameNumber2 gives me 27500fps, 5800fps, and 860fps respectively.

Edit: ah, did you just mean faster than themselves with noaa off? I thought you meant faster than mine. I see hardly any speed difference between noaa = false or true.

wonkey_monkey
7th May 2026, 22:42
Bit more investigating: it looks like the Antialiaser class - used in common by the Show* functions and Subtitle - creates a bitmap which is 8 times (!) the width and height of the video - even if the text is going to be a tiny fraction of that - and scales the whole thing down. That's 530 million pixels to draw to and scale down for 4K video, every frame (if the text is changing every frame, as it does for Show* functions). At least it's a 1-bit bitmap, so it's only 66 megabytes, but that seems super inefficient.

Reel.Deel
7th May 2026, 23:34
Edit: ah, did you just mean faster than themselves with noaa off? I thought you meant faster than mine. I see hardly any speed difference between noaa = false or true.

Yeah I meant the internal filters are faster with noaa on. But my memory could be off. I remember testing the Subtitle and Text filters when I was working on the docs (https://avisynthplus.readthedocs.io/en/stable/avisynthdoc/corefilters/subtitle.html). Subtitle is way slower than Text due to the anti-aliasing stuff, as you found out. I'll test noaa = false / true again since my memory is a bit hazy

edit: seems that noaa does not do anything performance wise, even when set to true all of the anti-alias heavy processing still takes place. Hopefully pinterf sees this thread...

pinterf
9th May 2026, 06:03
So this is where you encountered crc32 :)
Nice layouts, I like the elegant top/bottom markers and the possibility of setting 'white' for HDR footage.
There exists a quicker version of these internal filters, though they are using the fixed internal fonts (Terminus, info_h) which are not that nice you've chosen for your plugin.
The "Text"-like overlay fonts are used on Linux and on NO_WIN_GDI defined windows builds. When I tested them I had to rebuild with this flag to test how it looks on Linux. It may deserve an extra parameter (also makes the tests easier for me), but I won't touch the positions and the layout. Yours is much cleaner.

wonkey_monkey
9th May 2026, 12:43
Thanks pinterf, that is high praise indeed!

I thought about halving the frame count for separated video, so it would be showing the frame number, not the field number, but then it messes up if you've used selecteven or something. Perhaps I should make a separate function to print only the field indicators.

I had a quick look at Linux options, but wouldn't really know where to start with drawing fonts. I'm hoping it works with Wine, at least. And at least the Glyph class is platform-agnostic, if a little messy (the drawing functions should really belong to it, but I was being lazy about accessing vi and plane pointers). One limitation with it is that it has no sense of kerning. It just draws "WW" and "MM" to make a guess at spacing, and it deliberately treats the digits as equal-width, even if the font itself isn't monospace.

And yes, my current HDR project inspired the 'white' parameter. And then I thought, why not be nice and stick to limited range for Y video (at the white end, at least; the box and outline generation treat 0 as black, not 16), since it costs nothing in fps to do so.

You may also notice that, for YUV clips, the shaded box is completely desaturated, whereas with RGB it remains coloured. That was for speed and simplicity.

I'll add ShowCRC32_2 at some point, but wanted to wait until an all-planes version was established to make sure I can provide the same options and produce the same checksums.

Just had another thought: could it be useful for ShowCRC32 to make the CRC available as a frame property (and perhaps optionally not print it)?

------

I did have a thought about the functions in text-overlay.cpp in that they might benefit a lot if the Antialiser class can be clipped to a smaller section of the video. I assume it hasn't changed much since we only had 8-bit SD video to worry about.

StainlessS
9th May 2026, 14:36
I'm hoping it works with Wine
There is a (flatpak) app on Linux called Bottles (Wine under the hood), that is quite nice,
I've only tried it once to run PotPlayer under linux Mint, seems to work well.
Apparently makes Wine easier to use (I've never used pure Wine proper).

https://github.com/bottlesdevs/bottles
[Usually available via your linux software installer thingy]

How to Use Bottles on Linux Mint (Easy Method):- https://www.youtube.com/watch?v=FEgWebkXBW4

How to install Windows software on Linux with Bottles:- https://www.youtube.com/watch?v=Fiiq4IkLvzM

Run Windows Apps on Linux: A Hands-On Comparison of Bottles and WinBoat:- https://www.youtube.com/watch?v=92j9JbCHzB0
[WinBoat, is an alternative to Bottles]

One day I'm gonna try install MeGUI into Bottles.

hello_hello
9th May 2026, 22:22
One day I'm gonna try install MeGUI into Bottles.

If you get it to work, please share how.
MeGUI was easy enough to get working in Wine. I use WineTricks to create Wine prefixes and install dependencies. In the case of Wine 11.0 Stable and MeGUI, all it required was to use WineTricks to install DotNet 4.8.
Unfortunately it has no installer for DotNet 4.8.1 yet, and I haven't been successful installing it manually, so I'm running MeGUI 6.6.6.6 20241125 x64 as newer versions require DotNet 4.8.1.

Bottles has installers for DotNet 4.8 and 4.8.1, but testing with the same version of MeGUI, I couldn't get it to run. I don't really know why, but I tried a few different Bottle configurations without any luck.

StainlessS
10th May 2026, 09:54
OK, whether success or fail, I will report (one day, maybe).

StainlessS
11th May 2026, 10:23
MeGUI has some older history with Wine on Linux, so maybe not impossible.
https://appdb.winehq.org/objectManager.php?sClass=application&iId=9892