Friday, June 22, 2007

Viewing video in an image?

  • The Magic Color Out of space (shameless H.P.Lovecraft reference)


A while back there was a blog post about this but when I tried to search for it it turned up with broken images and for some reason the Author had put the color codes etc in the images so I had to back engineer the way he did it to get the contents of this post.. Anyway, I figured it would be a neat trick to be able to play video in the background of my text editors when I was working on something. (Don't ask me why, I just get these kinds of ideas sometimes.)



The principle behind it is that when playing a video in a player like VLC Media Player the hardware renders a one colored image that the video is then overlayed on, this is why problems occur when you try to make a Print screen screenshot of something in the video. The screenshot is of the overlayed one colored image instead of the video. There are ways around this but it isn't the topic of this post.



Now I was thinking, what if I could use this color to do some neat tricks.



Enter:





  • The video everywhere mode
Now this color is a very simple color (at least in VLC Media Player, haven't tried it in other players). Its color coordinates are #000001 or Red 0 Green 0 Blue 1.

You can easily get this color by simply taking a print screen screenshot of video playing.



But how is this useful? Since I'm writing a lot (it's one of my main hobbies), I figured: If I could play a video in the background of the text editor and still be able to work with the text I could have some real fun with this.



Enter:



  • The Text Editor Trick
Now since in editors like Notepad2 and SciTE you can define your own background color I figured I could have some real fun with it. (this also works in other programs where you can set your background color to a custom color. like IRC clients etc).



The basic idea, In either Notepad2 or SciTE is to change the background color to the color #000001 you can easily do this yourself (for a simple description  on how to change the background in SciTE check out my earlier post, and for Notepad2 I recommend switch to the second default color scheme and edit the background color)



Now that we have the background color set we can play around with VLC Media Player a bit. Since the Media player has a Wallpaper mode it already uses this technology so getting it to work is piece of cake. Just make sure you can play the video in Wallpaper mode and you should be all set.



Open the video in VLC Media Player and resize the window to fit your text editor window, then just minimize the media player and the video should still be visible.



If you have trouble with seeing the text over the video try changing your font color around a bit or got to Settings > Extended GUI in VLC Media Player and change the hue, saturation and contrast around a bit and you should be able to get a good clean image while still being able to see your video.





  • How is this usefull?
I haven't got the faintest idea, it's a cool trick but it can be a bit distracting. But since we can have wallpapers at our desktops why not wallvideo as well. It's a fun trick and it demonstrates some of the fun you can have with the video technology that is available for free on the net.