Linux imagemagick convert mp4 to gif10/31/2023 I ticked the cachebuster number on my CSS but browser caches have been an incomprehensible disaster since 1994, so who the hell knows what they are doing. If things are escaping their boxes or otherwise the wrong size, try emptying your cache and shift-reloading. That does make it harder to copy images, though, and that's annoying and dumb. If your browser doesn't support VIDEO I guess it sucks to be you. but from watching the network, I could see that Safari was loading the video, and then loading the GIF as well! So that kind of defeats the entire purpose, so I'm omitting the IMG. Did you know that people used to use GIFs for things that were not animations? I know! So weird!)Īnd that should degrade kind of like does, using the SOURCE in browsers that understand VIDEO and falling back to the IMG in older browsers. (I had to go through and indicate the old GIFs that are not animations to make that work. Then after that, part of my WordPress theme sees IMG tags with GIFs in them and converts those to VIDEO tags. I'm converting them using the all-singing all-dancing image-and-video resizer that I wrote,, which uses ImageMagick to extract each frame as a PNG then constructs an incredibly hairy ffmpeg command to put it all back together with the proper frame timing. You'd think that ImageMagick or ffmpeg would just do the right thing on this common task that lots of people want these days, but no, that's crazy talk. It's actually pretty tricky to convert a GIF to an MP4 in the general case, since GIFs have variable frame rate (really, an arbitrary delay after each frame, which can be different for each one), plus they can be transparent, which MP4s cannot be. Twitter and Giphy and whatnot have been doing this for a while now (though Twitter, since they are dicks, make it impossible to download the original unconverted GIF data, even via the API). That saves a vast amount of bandwidth since GIF is literally the worst of all possible video formats. Trying something new here on Ye Olde Blogge: animated GIFs are now served as MP4s in a VIDEO tag.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |