8 ms·
APNG is also a very good way to achieve that! No limits in the number of colors, better compression. No patents? All major browsers now support APNG, Chrome be
by hbbio 9y ago
APNG is also a very good way to achieve that! No limits in the number of colors, better compression. No patents?
All major browsers now support APNG, Chrome being the last in the bunch :) For example, we use it in our README screencast for https://github.com/wallix/awless https://github.com/wallix/awless
- mmastrac 9y agoI didn't realize support for this had improved, but it's still missing Edge: https://caniuse.com/#feat=apng https://caniuse.com/#feat=apng You could probably polyfill something in WebAssembly for it, however!
- chrisseaton 9y ago> better compression Better compression than MP4?
- Houshalter 9y agoFor certain kinds of content, possibly.
- donatj 9y agoIs the compression actually better? I just tried re-encoding some of my larger gif files with it and they all came out 2x the size.
- cflat 9y agoThis usually happens when you have colour pallet increases. If you had a simple animated Gif with only 256 colours and convert it to any video you instantly have more data to compress. The better use case is where you start with video and convert down to gif (like when you use gif.ski)
- conradfr 9y agoFor some reason your Github page makes my FF 57 (Win7) process' memory jump from 114Mo to 4.5Go.
- NelsonMinar 9y agoIs there data on GIF vs APNG vs video compression?
- chronial 9y agoThat github page and the apng made my firefox eat multiple gigabytes of ram and almost killed my system.
- satysin 9y agoHoly crap you weren't kidding! Fresh start of latest release version of Firefox and it shoots up to 4GB memory the moment I open just that page! https://i.imgur.com/KJaWy2G.png https://i.imgur.com/KJaWy2G.png Note that Chrome also has the same page open (as well as several others) and is using less than 800MB memory.
- Houshalter 9y agoA weird thing about apng is it doesn't do any interframe compression. Even GIF has that. It's just a series of png images crammed into a single file.
- Dylan16807 9y agoThat's not true. It has basic controls to use/clear/revert the last frame and whether the new frame draws on top or replaces part of it. It's still useless when things are moving, but it's no worse than gif.
- Houshalter 9y agoOh, huh my mistake. I was thinking about how PNG compression is entirely based around using the previous pixels to predict the next one. But as far as I know, apng doesn't update the filters to use information from the previous frame. I guess you can use transparent pixels to compress pixels that don't change though.
- Dylan16807 9y agoOh, yeah, it definitely resets the compression context between frames. But so does a video format. No format that I'm aware of supports lossless compression that spans frames. Which leads to a funny situation where some images compress best by custom outputting a .gif or .png with no compression, and then zipping it.
- Houshalter 9y agoAs I understand it all video compression uses delta compression between frames. And you mention another issue I forgot, that it can't reuse Huffman codes or any common segments between frames. Since they are independently compressed.
- Dylan16807 9y ago> As I understand it all video compression uses delta compression between frames. And so does apng, more or less, via alpha. But that's less important than motion interpolation, which it utterly lacks.