5 ms·
FYI you can use ffmpeg to encode gif as h264/h265 mp4 videos of varying quality or convert to webm which can be played from an img tag, all of which will be ord
by ComputerGuru 6y ago
FYI you can use ffmpeg to encode gif as h264/h265 mp4 videos of varying quality or convert to webm which can be played from an img tag, all of which will be orders of magnitude smaller.
Simplest form: ffmpeg -i foo.gif -c:v libx264 -crf 22 foo.mp4
You can vary crf to change the size to quality trade-off.
- patatino 6y agoYou know you can give feedback without phrasing a question implying that he already should know that, right?
- ComputerGuru 6y agoNot intended as snark, just colloquial. Thanks for the feedback and I've updated the phrasing.
- thasian 6y agoI've replaced most of the gifs with embedded videos. Page loading size is around ~100 mb now
- thasian 6y agoOk holy shit. Mp4 compression then converting to gif is the holy grail. 1/3 the original size wtf.
- chrismorgan 6y agoThat’s still very unreasonably large and is going to cause real problems for some users, though not as many (and is still going to be uselessly slow to load for many—much of the world, including where large numbers of developers, even SwiftUI developers, are, doesn’t have multi-megabit-per-second speeds). Look, even 20MB is too large. Please, I beg you, just don’t put any GIFs on that page: just make it clear that it’s a video, e.g. by overlaying a circled play icon on the image and making it a link to the relevant video on YouTube.