The Windows Green-Screen
I wanted to post this a few years back but I just didn’t have the time.
This is something really interesting and it seems that nobody else has come across this little secret.
Many members from dreamincode.net Forums asked me how I could make my signature show videos running in the background and I’ve finally found time to explain how.
This is how my Forum Signature looks like (or looked like when I was writing this post) :
To see how this works, follow these steps:
- Open your favourite media player and play any video file.
- Ensure that the media player window is covering the image above.
- Now, minimize the media player.
- You should now see a portion of the video being played on the image as if the image itself were a media player.
Awesome, isn’t it?
I figured this out while I was experimenting with an application of mine which tried to modify Media Player Classic on-the-fly.
It seems that in Windows XP (might also be true for other windows OSes and other OSes), Video files can only be displayed on a portion of the screen that has a particular colour. The video can only be displayed on a portion of the screen which is currently displaying a specific colour.
That specific colour is RGB(16,0,16).
Try it out for yourself. Create an image with a background colour of RGB(16,0,16) like this:
Now play any video over this image and minimize the video player. The video should now be visible on the image.
My guess as to why this works is that Windows (or other OSes) needs to be able to figure out where a video should be displayed when a media player requests for playback. According to me, this has been intentionally included in the video playback design.
If the media player just provided co-ordinates of a rectangle to the OS for displaying the video, that would mean that if any other application was placed on top of the media player window, the video would be displayed over the application’s interface which would not allow the user to see the application’s user interface (forms, controls etc.)
Here’s what I think they did to fix the problem.
The principle behind this design could have been that “if a video could be displayed only within a rectangle that displayed only a specific colour, no overlapping application would be affected.”
But which colour would be best suitable for this purpose? Black is the first colour that comes to my mind for obvious reasons but black is a common colour and is used frequently in desktop wallpapers or in user interface elements.
Hence they chose a colour that’s technically not black but would look just like black and hence they must have come up with the colour RGB(16,0,16)
My reasoning probably isn’t correct but I’m pretty sure that the real reason is based somewhere along the lines.
I just find it ironic that something that behaves just like a green screen doesn’t even have a hint of green in its colour code (its 16,0,16 in RGB) 😉
As I’m still not sure if this works on other operating systems, I’d appreciate it if you could test this on your operating system and post the result as a comment to this post. Thanks.