-
Notifications
You must be signed in to change notification settings - Fork 137
[Lag Free Screenshots] Add WebP Support #231
Comments
I've implemented this but @knah rejected the idea we would depend on other library like libwebp. I asked already 6 months ago and recently but same answer. So either I'll publish my own fork or he will accept a PR, who knows ;) Also that claim about encoding being faster is not true, it's slower than both png and jpeg in my benchmark even as I'm using the method = 0 which is the fastest. That said I still think that cons is shadowed by the pros of webp. |
That's odd that it's slower for you, maybe i should test it properly and not just use cwebp as a mini test. Although i would be very interested in it regardless if its slower than png for those benefits of significantly lower sizes. I had a png straight from in game at 16k come in at 192mb when converted to 66mb. |
We'll see if @knah is wiling to react. If not I could make a fork but beware that maintaining fork is effort. Tho it's true LFS itself didn't change much over time. I could consider making a fork if more people are interesting 🤔 I do have an open PR which improves speed by a lot #226 (still not merged), so yeah. I could ask to maintain the package at this point maybe :P I would be more active.
I'm not sure how you bench or where you saw that webp compression speed would be faster. In my experience and sources like: https://groups.google.com/a/webmproject.org/g/webp-discuss/c/mu1RYRAe72A?pli=1 or https://siipo.la/blog/whats-the-best-lossless-image-format-comparing-png-webp-avif-and-jpeg-xl they all agree encoding is slower. I didn't see anything to the contrary. But:
what's faster is the decompression: because of smaller size AFAIK https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study
That said, it's possible the IO is the bottleneck (esp with hard drives) to write the files down with huge size like ~200MB. Tho that isn't the subject of the bench above. Not sure if that's what you saw? In my testing I have m2 ssd so no bottleneck there. |
As you know with EAC thing, this won't happen. But if you're interested: I ported lfs to cvr and I added webp support too. |
WebP has way faster compression algorithm along with much smaller file size compared to png. With encoding being faster this could help reduce the lag during the screenshot process.
The text was updated successfully, but these errors were encountered: