June 16, 2005

Video Using Table Background Colours

If any of you have ever idly wondered whether it would be possible to do web page video using a large table with very small cells and messing with the background colours, wonder no longer - it doesn't work.

Having spent a random 45 minutes messing around with the idea this morning before breakfast, it turns out that my 3GHz Pentium can do about 5000 table cell background colour changes a second in Deer Park alpha 1, which isn't nearly enough for video of any decent size, frame rate and movement. Our DOM is good, but not that good :-)

If anyone wants my test code, let me know.

Posted by gerv at June 16, 2005 7:47 AM
Comments

You should be able to emulate 80x25 character mode okay, though - had a bad clone of Nibbles once. For some reason Firefox was faster than IE at setting backgrounds of table cells (at the time, which was IE6 / Firefox pre-1.0)

Maybe you can try using aalib :)

Posted by: Mook at June 16, 2005 9:10 AM

You could use the same information you would use to change the background colors to render new tables for every frame in advance (loading...) and show video frames by switching the entire table visibility.

Posted by: Bram! at June 16, 2005 10:28 AM

Assigning bug to Peterv ;-)

Posted by: Tristan at June 16, 2005 11:23 AM

Surely then this would be an example of analogue TV.

What with being at the cutting edge of technology you should be using colspans and rowspans to make a digital codec where only what changes is shown with keytables every few seconds.

Posted by: Peter Hewitt at June 16, 2005 11:32 AM

Why not use divs instead?

Posted by: Jim at June 16, 2005 12:42 PM

Because you'd have to place them properly...which is more intensive Imagine than tables.

Posted by: AkaXakA at June 16, 2005 1:52 PM

Ok, even for a geek, this is pretty geek.
What's next?
A pure css chess game?

Posted by: Ariel Burone at June 16, 2005 2:04 PM

Wow Gerv!

Hats off to you for being such a geek. Not only is that a geeky idea... but you followed through! Before Food!!

Posted by: Robert Accettura at June 16, 2005 2:37 PM

What's next? A pure css chess game?

A pure css maze.

Posted by: Simplex at June 16, 2005 3:46 PM

Wow.

Its an idea I've never had come to mind... but even with it not working for video, what about instead of using animated gifs, have something like a company logo be DOM-powered using this method?

In the words of the great Mitch Hedberg: "totally unnecessary"

Posted by: Joey at June 16, 2005 3:51 PM

Made something similar with divs. Since the data gets preloaded, it can display any image data. Currently it just generates the data instead.

http://users.tkk.fi/~mvirkkil/divstuff.html

Posted by: mvirkkil at June 16, 2005 4:28 PM

Why not just use Canvas?

Posted by: Neil M. at June 16, 2005 4:35 PM

mvirkkil, wow! Looks nice :)

Posted by: Martijn at June 16, 2005 5:42 PM

I miss Mitch Hedberg...

(sigh)

Posted by: Kommet at June 16, 2005 5:45 PM

For some reason that made me think of this:
http://www.masswerk.at/jsuix/

Posted by: Roger at June 16, 2005 6:45 PM

Gerv, please file a bug, cc me, attach the files needed to test? I'll profile when I get back to town.

Posted by: Boris at June 16, 2005 11:19 PM

you know, I can also go to school by walking the 40000 km around the other side of the earth.

Posted by: Alan Trick at June 17, 2005 1:38 AM

There's now a bug, as bz requested, and attached to it is a canvas implementation of the same thing for Neil M..

The canvas version is probably fast enough, if you consider that you could do multiple contiguous pixels at once, and that it wouldn't suffer from pixel jitter, and that performance is still improving, to do cartoon animation at a reasonable size.

Posted by: Gerv at June 17, 2005 8:51 AM