Monday, 12 November 2007

Vector Video Codec

Today lots of comics are streamed over the Internet. But they are saved and compressed with a pixel based algorithm. Why? If I look at comics I see Vectors. So why are these videos not compressed as vector images. As far as a Google search goes there is nothing like this available. Further the backgrounds seam to be quite static in comics so these wouldn't have to be redrawn, only the foreground normally moves.

bash-3.00$ ls -lah /tmp/Spectre.svg
-rw------- 1 xxx 110K Nov 12 14:09 /tmp/Spectre.svg
bash-3.00$ zip /tmp/ /tmp/Spectre.svg
adding: tmp/Spectre.svg (deflated 69%)
bash-3.00$ ls -lah /tmp/
-rw-r--r-- 1 xxx 35K Nov 12 14:10 /tmp/

According to this compression is quite easy too. Comments welcome

1 comment:

Quendus said...

The last week or so I've been toying with a similar idea idea for an animation codec, more specifically one which expresses each [foreground] line as a 3-dimensional surface (probably a level surface of a restricted class of polynomials in 3 variables x, y, t). Colours within the bounds of those lines could be expressed efficiently if the codec is smart enough to find and enumerate the interiors of the lines.
I'm not certain if such an algorithm could actually achieve a compression ratio comparable to "normal" video codecs, or how it would deal with things like blur, real camera footage (especially if it's embedded in a cartoon frame), non-solid colours, etc...
I don't know if you're still interested in the idea after 2 years, but drop a reply if you are :)