News for hackers. Stuff that matters.
Re:Show HN: I made an elegant SwiftUI timeline by ComputerGuru on Saturday July 18, 2020 @12:44PM (#23882649)
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.

Re:Show HN: I made an elegant SwiftUI timeline by patatino on Saturday July 18, 2020 @01:32PM (#23883024)
You know you can give feedback without phrasing a question implying that he already should know that, right?
Re:Show HN: I made an elegant SwiftUI timeline by ComputerGuru on Saturday July 18, 2020 @01:37PM (#23883085)
Not intended as snark, just colloquial. Thanks for the feedback and I've updated the phrasing.
Re:Show HN: I made an elegant SwiftUI timeline by thasian on Saturday July 18, 2020 @02:50PM (#23883777)
I've replaced most of the gifs with embedded videos. Page loading size is around ~100 mb now
Re:Show HN: I made an elegant SwiftUI timeline by chrismorgan on Saturday July 18, 2020 @04:44PM (#23884681)
That’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.
Re:Show HN: I made an elegant SwiftUI timeline by thasian on Saturday July 18, 2020 @03:03PM (#23883881)
Ok holy shit. Mp4 compression then converting to gif is the holy grail. 1/3 the original size wtf.