superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.77k stars 323 forks source link

[bug] GtS cannot process animated `.webp` media #1453

Open tsmethurst opened 1 year ago

tsmethurst commented 1 year ago

When uploading an animated webp via the API, an error will be returned and the server logs will say something like riff: short chunk header.

This is due to Go not yet supporting decoding of animated webp files in the stdlib: https://github.com/golang/go/issues/53364

I opened this issue just to keep track of it, and for anyone else having the same issue. It's unlikely that we'll fix it unless someone at Go is able to find time to implement it.

jakerobb commented 1 year ago

https://pkg.go.dev/golang.org/x/image/webp

tsmethurst commented 4 months ago

Looks like a solution here: https://github.com/gen2brain/webp

tsmethurst commented 3 months ago

I'm taking this off the milestone for now. We've moved to using an embedded ffmpeg for decoding images and video, but unfortunately ffmpeg also doesn't yet support decoding animated webp (only encoding it). This is likely to change as work is being at ffmpeg to support this, but it won't be something for right now.