mautrix / discord

A Matrix-Discord puppeting bridge
https://go.mau.fi/mautrix-discord
GNU Affero General Public License v3.0
240 stars 22 forks source link

Allow for `apng` as an `animated_sticker` target #118

Open dongcarl opened 10 months ago

dongcarl commented 10 months ago

If I'm reading the convertLottie function correctly, for webm and webp, the file gets converted to a series of PNGs by lottieconvert, then ffmpeg is invoked to convert that series of PNGs to the desired target.

Having an apng target still requires ffmpeg to assemble the pngs into an apng, but might be less resource-intensive.

Since the process is so simple, there's even a dependency-less golang library to do this, which would eliminate the ffmpeg dependency: https://github.com/kettek/apng

Support for apng is quite good: https://caniuse.com/apng