When you opened a screen shot of a video in Paint, the video was playing in it

372 pointsposted 3 days ago
by birdculture

64 Comments

cgijoe

18 hours ago

Fun Fact: This same sort of thing also happened on the Classic Macintosh Quadra 840AV, when running in 8-bit (256 color) mode. Playback of realtime video capture reserved color index #243 (a very dark green in the system palette), and ANYWHERE that color was used, it would be replaced with the live video. I created some cool effects using this back in the 90s.

dietrichepp

14 hours ago

Yes, other Mac AV models did the same thing. I remember doing this on the 6100/60AV that we had.

mkagenius

13 hours ago

Are you the one who created the techno-anthem "pump up the jam"? Sweet!

Stratoscope

4 hours ago

Pump Up the Jam always reminds me of Philomena Cunk.

If you have Netflix, look up "Cunk on Earth". Trust me, you won't regret it.

jowood

8 hours ago

I discovered this by accident and won a few beers back in my university days by betting I could play a video in MS Paint. :)

whiatp

2 hours ago

Long time back I'd play PS2 games in a chat window in EverQuest while waiting for mobs to spawn. I had a capture card that would overlay over a particular shade of purple that I discovered while trying to screen shot something from a game. I made an empty chat window in EQ that color and where it overlapped the card's application window behind the video would render. Was super jank picture in picture, but it worked.

kqr

11 hours ago

> These special surfaces were called “overlays” because they appeared to overlay the desktop.

I have some vague memory of programs whose windows had funky shapes (i.e. not rectangular) also using overlays of some kind. Maybe that's a different sort of overlay?

grishka

8 hours ago

Those are called regions.

FMecha

4 hours ago

I realized this when I tried to capture the test pattern used by a PowerDVD diagnostics application.

dqh

8 hours ago

This reminds me of the time when Quake started rendering inside the start button of the Windows 95 desktop (or maybe Win 98). I wish I could remember the details but it think it was something to do with alt-tab.

geon

8 hours ago

When I did the same experiments in win98, the magic color was not bright green but #010000, the darkest possible red.

Was this dependent on the OS? Or the driver?

dusted

5 hours ago

yeh, I remember it being the darkest red too, maybe depended on bith depth ?

zelphirkalt

8 hours ago

This was always annoying, when you wanted to take an actual screenshot of a high resolution video and use it as a desktop background for example. I assumed it was connected to hardware/software acceleration or something.

k__

9 hours ago

I also remember that I couldn't make any screenshots of videos at all.

They were rendered in some kind of overlay, that the rest of the GUI didn't know anything about.

jakub_g

9 hours ago

As far as I can tell, it's still the case if the video is DRM-ed. Then any screenshots of it will be black square, because the OS can't "see" the video, it's sent directly to the monitor, similar as in the article.

grishka

8 hours ago

No, it's not that. Usually, the OS does see the video and the compositor still renders it to the screen like normal, but when you take a screenshot, the OS itself is an accomplice here by not rendering that surface in screenshots.

CrossVR

3 hours ago

Any DRM protection where the OS sees the video is useless, because the OS is under full control of the user. (For now at least)

grishka

3 hours ago

Not true about Android at least — there is secure boot where the bootloader will snitch on you if you unlock it, and you can't do anything about it because the attestation happens in a trusted execution environment, a hypervisor with higher privileges than the OS kernel, that you never get to unlock.

karel-3d

3 hours ago

that's literally what the article is about

edgineer

2 days ago

"Nowadays, video rendering is no longer done with overlays."

Darn, I thought this explained why, after upgrading my GPU, videos playing in Chrome have a thin green stripe on their right edge.

ack_complete

9 hours ago

A green stripe on the right/bottom is usually due to a different issue: interpolation errors in chroma planes when decoding YCbCr video. The chroma planes use a biased encoding where 0 (no color) is mapped to 128. A sloppy YCbCr to RGB conversion without proper clamping can interpolate against 0 at edges, which is interpreted as max negative chroma red/blue -- which combined together produces green. This can happen either due to an incorrectly padded texture or failing to handle the special final sample case for 4:2:2 chroma.

This issue can happen with overlays, but also non-overlay GPU drawing or CPU conversion routines.

kimixa

14 hours ago

They still use "overlays" - just they're a lot more featureful in modern implementations than "Replace all of one colour with another surface" - so they tend not to have the same limitations and quirks.

MS started exposing some capabilities using MPO in the windows 8 era [0], and they've pretty much always had pretty comprehensive composition pipes in hardware for mobile platforms due to the power/bandwidth limitations meaning compositing the display can be a significant fraction of the total device's performance.

I suspect green (or other block colour) artifacts on video edges are due to bugs/mismatches in specification with the hardware video decoder and how the app displays it, and the bugs that often fall out of that.

Most video compression requires pretty large blocks, normally from 16x16 up 64x64 depending on format, and that may not align with the actual video size (e.g. 1080 does not divide by either). But often implementations still need that extra surface, as things like motion vectors may still refer to data in the "invisible" portion. And it has to be filled with something. It's then real easy to fall into bugs where small numeric errors in things like blending, or even just mix-ups between the different "sizes" that surface has, to cause issues at the edges.

I suspect the other comment about using ANGLE/dx9/dx11-on-12 may be effective as it /also/ causes the hardware video decoder not to be used, which is often a source of "unexpected" differences or limitations that commonly cause errors like that.

[0] https://learn.microsoft.com/en-us/windows-hardware/drivers/d...

BearOso

21 hours ago

Video rendering can still be done with overlays, but it's a little more substantial, involving separate planes with the locations configurable on the graphics card. Look up MPO, Multi-Plane Overlay.

Your green stripe is likely because of the classic combination of unclamped bilinear filtering and a texture that's larger than the output region being used as the drawing surface for the video.

petermcneeley

16 hours ago

This is simply wrong. Videos are still rendering in overlays in windows in Chrome right now. There are many reasons why overlays are still used.

Kwpolska

9 hours ago

[citation needed]

If video rendering used overlays, then YouTube could not put the toolbar or subtitles on top of the video, and they’ve been doing so for a long time.

petermcneeley

3 hours ago

Modern overlay systems support alpha compositing. The video is placed behind and the elements (toolbar etc) are in front with an alpha hole.

nomel

3 days ago

I made extensive use of this, when I found it by accident, in my Winamp skins and GUI programs!

nicce

9 hours ago

I found this also by accident when I was kid and I used it as putting video as wallpaper for my desktop. I thought it was pretty cool.

jgilias

9 hours ago

It definitely was pretty cool.

dixie_land

21 hours ago

Iirc you can also set that "green screen" as wallpaper and have video as desktop background!

cluckindan

19 hours ago

Or you could set the WinAmp AVS visualizer to render to overlay, and have it as your desktop background.

lotyrin

16 hours ago

Yeah, I used to have a few "live wallpaper" type videos I'd use this way. Around the time AVC-ish algorithms were democratized by DivX. IIRC the player I used had #0000A0 as its overlay color... may have even been the DivX branded player.

...This is the oldest I've ever felt, unsure of my own memories regarding something I have to consult historical records about...

janwl

3 days ago

This unlocked some memories. I remember on my system the chroma colour not being green but some very dark shade of grey that was almost black but not really black… something like #010101

HansHamster

16 hours ago

This brings back memories of my old HP laptop with an Athlon 64 and a Radeon X200M. The crappy FGLRX driver only supported overlays (afair) and so when running something like Compiz it would transform the window with the green background but the video itself would stay in place and it would just stick parts of the video on top where it happened to overlap. I still remember being excited when the open source drivers finally gained support for r300 and could do proper textured video...

zaptheimpaler

19 hours ago

If you watch Twitch, you can see that all instances of the same emote in chat animate together. Then I tested this more generally in a web page, and the same thing happens - if the same gif is placed multiple times in a page, all instances of that gif will play in sync even if loaded at different times. I guess there's a similar idea in browsers then, where maybe there's only one memory representation of the gif across the page or the browser.

OCTAGRAM

2 days ago

This was a nice trick to protect text from copying. For instance, student assignments. Students could still use digital camera on CRT display, but 20 years ago cameras were costly and students did not have them. And typing text from scratch was a tedious job. So online served assignments were not shared too fast.

magic_hamster

15 hours ago

Around 2005 digital cameras were commonplace. Mobile phones also had cameras by then, even if not very good ones by today's standards. Maybe you're talking about an earlier time?

ffsm8

14 hours ago

2005 is pre iPhone.

While cameras were definitely common, they also weren't quiet as ubiquitous as they're today.

Lots of families only had them for trips etc, not readily available for kids to make photos of screens.

1dom

9 hours ago

This might have been the case where you were, but it wasn't everywhere.

I was about 15 at the time, I'd had multiple digital cameras and had a phone with a crappy camera on it. All of my friends had digital cameras. Myspace had already peaked, Facebook was taking off, and that was largely driven by kids taking pictures.

The idea that the ability to take a photo wasn't ubiquitous for big parts of the western world in 2005 doesn't seem accurate.

throwaway290

6 hours ago

Now everybody has a phone with a good camera, back then cameras were not so affordable and cameras in phones were very bad quality

LukeShu

12 hours ago

Many flip phones had cameras by then. For instance, the Razr V3 was the best selling phone of 2005, and had a 640×480px camera.

doublerabbit

9 hours ago

It's not that Cameras didn't exist, more that the technological features were not sophisticated enough to enlist cheating compared to now. A personal OCR Python library wasn't a thing back then.

Not saying that cheating was impossible but uneasy unlike to now where there's a library for everything.

xattt

7 hours ago

AABBY FineReader was very pirate-able since the early 2000s. The workflow would have been a bit clunky, but it was still very doable.

ffsm8

5 hours ago

Nobody argued that it was impossible before. Nor did I claim that there were no cameras before 2005.

Cameras just weren't as ubiquitous as today. Unironically arguing that point is silly. They just weren't (I know you didn't, but we're in a comment chain that made that argument).

Yes, in most groups of people, there were a few of them that had cameras readily available, but it wasn't the norm for everyone.

What was available (not just cameras, but ocr etc pp) was a lot less accessable then it is today - where you just point your phone at it and it transparently extracts you the full text of whatever is on screen/lens, consequently the issue got a lot more problematic and widespread, which was the only thing what was put forward here.

ezst

12 hours ago

> 2005 is pre iPhone

I hate how incompetent tech writing and marketing rewrote and simplified mobile phone history into pre/post-iphone. Yes, we did have touchscreens, smartphones and camera-enabled devices many years before the iPhone. Arguably, on several metrics, many Symbian/Linux/blackberry phones of that era are better smartphones than today's iPhone/Androids as defined by hardware capabilities which got removed over time while arbitrary constraints got added on the software front.

realusername

11 hours ago

Don't know about other markets but the first iPhone didn't sell well especially because it was behind the high end feature phones of the time for a more expensive price.

The iPhone which made it was the 3G.

ffsm8

4 hours ago

I'm fully aware. I merely used that as a timeframe anchor to make my point.

bapak

12 hours ago

I had my first digital camera in 2003 and my first videocall-capable phone in 2004 (Nec e313). I was a kid

accrual

16 hours ago

> And typing text from scratch was a tedious job

At least by typing them the typer might learning something. :)

jdthedisciple

10 hours ago

I remember this personally!

I was always stumped as to what the hell was happening.

5-

21 hours ago

i had forgotten about this technique when i was at the excellent https://tnmoc.org recently, looking at their sgi irix exhibit featuring a webcam.

the latency of the camera feed on the crt screen was unbelievable even (especially?) by modern standards!

after a minute of pure wonder i remembered about overlays. still mighty impressive.

userbinator

15 hours ago

Good to see the first comment there corrects him, and that it's not actually green pixels; at least for the Intel and nVidia drivers I've used before, it appears to be more of a dark magenta. It could be configurable or hardcoded somewhere in the driver, but I don't think it's fixed in hardware.

The desktop compositors takes the graphics content of all the windows, including their composition visuals, and combines them to form a full desktop image that is sent to the monitor.

...at the cost of latency and efficiency.

anthk

8 hours ago

Xine and TVTime worked the same with the overlay video output. If you tried to create a screenshot with X11, you would get a blue/greenish window instead of the video.

You had to use the builtin screenshot function from your video player/tv viewer.

The current MPlayer under OpenBSD 7.7 still has the overlay video output

        mplayer -vo xover

stefan_

19 hours ago

The irony is that in 2025, this answer is now wrong again. Starting with smartphones, scanout hardware supports multiple planes/overlays again that are composited on the fly by fixed function blocks. This bypasses having to power on the GPU and wasting memory bandwidth (a large amount of power use in a smartphone). No longer involves hacks with green pixels though.

reactordev

17 hours ago

Right, because we have alpha channels now

ahartmetz

15 hours ago

Not necessary for blending in video overlays, and wasteful. Well, necessary inside the overlay if that is where the controls should appear. Alpha blending is two reads, one write per pixel, for the whole affected region (whatever that is, could be the whole screen). An opaque overlay is one read, one write, only for every pixel in the desired rectangle.

ack_complete

9 hours ago

The video overlays in question are not drawn by blending into a framebuffer in memory. They're two separate display planes that are read in parallel by the display path, scaled, and blended together at scan-out time. There are only reads, no writes. Modern GPUs support alpha-blended display planes using the alpha channel that is otherwise often required to exist anyway as padding.

As OP noted, using hardware display planes can have efficiency advantages for cases like floating controls over a video or smoothly animating a plane over a static background, since it avoids an extra read+write for the composited image. However, it also has some quirks -- like hardware bandwidth limits on how small a display plane can be scaled.

halyconWays

20 hours ago

I had a Matrox Millenium card with a breakout box for capturing RCA, S-Video, and Cable TV; I'd watch TV on my Windows 98 SE2 computer, which was the craziest thing back then, but I always felt like the green-screen like effect was some kind of mysterious bug that I'd better not mess with, or video capture would break. Windows 98 was barely working on a good day, so it felt like the computer was in the process of failing in a graceful and useful way, so I'd better not push my luck.

Every so often you could get a glimpse of the man behind the curtain, by dragging the window quickly or the drivers stuttering, which would momentarily reveal the green color (or whatever color it was) before the video card resumed doing its thing. Switching between full screen and windowed mode probably also revealed the magic, or starting a game that attempted to grab the video hardware context. And of course sometimes other graphical content would have the exact right shade of color, and have video-displaying pixels.

precommunicator

3 days ago

I've used that trick as far as Windows XP, playing videos inside 3D models in programs like SketchUp

perryizgr8

11 hours ago

I remember using overlay mode in Winamp AVS made it run much faster. Wonder why that was.