by floatboth · 8y ago · 0 comments
Quite an understatement. "Some" here means WebP is literally a single VP8 frame shoved into a RIFF container :D
Back in the day (holy shit 8 years ago already!) there was a script that added WebP support to WebM-supporting browsers by literally changing the container. Here it is: https://github.com/antimatter15/weppy/blob/master/weppy.js
Though it's less used than the lossy format, lossless WebP is a thing too; if I said WebP was exactly VP8 intra someone might nitpick that. There's no winning, haha!
https://webmproject.github.io/libwebp-demo/webp_wasm/index.h...
I think it's an ideal use case for WebAssembly. It'd be a good way to roll out any future AV1-based image format until native support arrived in all browsers.
So, like, h.264-based "images" can be shown in most browsers now, and VP9-based in many (but not Safari or IE). And you can fake AV1 images as soon as you get AV1 video.
Using video decoding in an odd way like that probably isn't especially practical or wise, but fun that the capability's there/reachable.