High quality GIF with FFmpeg
71–80 of 131 posts
Re: High quality GIF with FFmpeg
#72So it's using a simple Median Cut quantization... which is okay, but you can get great results using an octree quantizer, and without dithering. Dithering kills your compression savings in GIF so you'd want to avoid it if possible. In any case, you can see the difference a better quantizer makes here: http://www.leptonica.com/color-quantization.html
And you can still dither the image without completely destroying compression. You just have to use an ordered dither [2].
[1] Xiaolin Wu, "Color Quantization by Dynamic Programming and Principal Analysis", ACM Transactions on Graphics 11(4): 348-372, 1992. https://dl.acm.org/citation.cfm?id=146475
Re: High quality GIF with FFmpeg
#73There is no reason to create new content in .gif and not webm as of now. FFmpeg is really nice though.
There simply is not a video-based standard that implies "short, silent, autoplayed, looped video" in the way that animated GIFs do. There are ways to approximate the behavior in HTML, but none of them are perfect in the way GIFs are.
Re: High quality GIF with FFmpeg
#74Earlier quoted context omitted.
If only iOS (and Android?) allowed you to play inline videos the way you can on the desktop, and the way they play animated GIF's inline. Besides allowing us to adopt video throughout and save on bandwidth and have better video quality, this will be a huge productivity boost to developers: we can finally stop having the GIF vis JIF pronunciation debate.
Unless somebody's producing ads, why would he insist on having the video "inline like on the desktop" on the small screen of the mobile phone?
Re: High quality GIF with FFmpeg
#75ffmpeg is downright magical - just don't get caught using the one in the Ubuntu/Debian repositories. Compile your own ffmpeg if you have any need to do serious work; the Libav fork just isn't as capable. The reasons are obvious if you look into the development philosophies of the two projects. https://github.com/mpv-player/mpv/wiki/FFmpeg-versus-Libav
Use the version at http://deb-multimedia.org echo "deb http://www.deb-multimedia.org stable main non-free" > /etc/apt/sources.list.d/deb-multimedia.org.list apt-get -q update; apt-get -qy dist-upgrade apt-get -qqy install ffmpeg
Re: High quality GIF with FFmpeg
#76Earlier quoted context omitted.
Unless somebody's producing ads, why would he insist on having the video "inline like on the desktop" on the small screen of the mobile phone?
Because gifs already work that way on phones, and that's how users want it.
Re: High quality GIF with FFmpeg
#77Earlier quoted context omitted.
Global support for h.264 video in the browser: over 90%. And on the desktop it's close to 100%. That's IMO just good enough.
That's not what I was referring to. Yes, technically videos are superior, no doubt. The nice thing about GIFs is though that they are treated like images by the browser and the OS. That makes them easier to handle by non-technical users (think imgur, Tumblr, etc.).
I'm inclined to say that the enormous compression wins are worth getting the remaining stragglers to upgrade (both of the sites you mentioned already do this, for example, as do other common targets like Twitter, Facebook, etc.).
Re: High quality GIF with FFmpeg
#78Earlier quoted context omitted.
Don't compile it just use the official binaries!
That's a good option if the official binaries support all the codecs you need and have all the correct hardware acceleration flags set for your particular CPU/GPU. That's ... theoretically possible, I suppose.
The second is the way almost all sensible x86 software should behave.
Re: High quality GIF with FFmpeg
#79Earlier quoted context omitted.
Global support for h.264 video in the browser: over 90%. And on the desktop it's close to 100%. That's IMO just good enough.
That's not what I was referring to. Yes, technically videos are superior, no doubt. The nice thing about GIFs is though that they are treated like images by the browser and the OS. That makes them easier to handle by non-technical users (think imgur, Tumblr, etc.).
Re: High quality GIF with FFmpeg
#80Earlier quoted context omitted.
None that works with current browsers implantations, because they erroneous ignore no delay between frames and wait anyway. But that's a bug in the gif decoder, not a limitation of gif. OK, this is hairsplitting, but it illustrates how borken the state of gif is.
Maybe someone who cares about this should submit patches? All of the major browser engines are open-source.
In a world where Internet Explorer is not a major browser.