4 ms·
There's probably too many places where embedding a full blown video isn't practical - at least not in existing products. Avatars, emoticons, simple GUI elements
by noselasd 13y ago
There's probably too many places where embedding a full blown video isn't practical - at least not in existing products.
Avatars, emoticons, simple GUI elements (I'm thinking e.g. of a "copy file" dialog) and similar.
- Pxtl 13y agoRefinement of video embedding would still be ideal in my opinion. Isn't APNG lossless? Something lossy but low-resource (an older compression format, in other words) embedded as the full file (instead of streaming) would be deal - like dumping a little MP2 in place of a GIF.
- simias 13y agoBut isn't gif sufficient for that? apng is obviously technically superior, but gif is already supported everywhere. It's one of those cases where "perfect is the enemy of good" IMHO. Don't forget that we now have javascript, CSS animations, canvas and webgl in addition to good old gifs to deal with animated features. Do we really need apng on top of that?
- chr1 13y agoWith GIF one have to create multiple versions of the same image for different backgrounds. APNG works nicely on any background.
- zanny 13y agoWith the <video> tag, you can hide the controls, autoplay, and loop. I don't see the issue.
- meemoo 13y agoThe alpha channel in PNG/APNG is nice.
- mistercow 13y agoCan you elaborate on why it's impractical? I understand that at a gut level you have the concept of "full blown video", but I'm not sure instinct is faithful to reality.
- randyrand 13y agoNot a proper answer - but h.264 has one clear goal, good compression ratios at good quality. Performance is secondary and as such h.264 is pretty expensive. This makes it a little silly for small assets where filesize is not a concern. Little emoticon stuff makes more sense with GIF which are very inefficient with filesize but with very very little performance overhead. This is just 'my gut' like you have said. A proper analysis of the performance of h.264/GIF vs resolution would be nice though.
- mistercow 13y agoI expect that the performance issues with small assets are probably minor (and smart phones have hardware acceleration for it). H.264 is expensive to encode, but the decoding cost is much lower, and is also adjustable at the cost of the compression ratio. If you want transparency, then the workaround you currently have to do with going through an off-screen canvas is another story for performance. I can think of one other hypothetical problem, although it would need testing to confirm: block sizes. h.264 works with block sizes that are a multiple of 4, and AFAIK codecs often perform sub-optimally with input that cuts off mid-block. For large videos that doesn't matter much, since you don't usually focus on the edge of a video, but for a small asset, it might be a problem. Someone with more knowledge of h.264 might be able to correct me on this.