Mastodon: Convert gifs to webm during upload

Created on 8 Jan 2017  ·  5Comments  ·  Source: tootsuite/mastodon

WebM's are of smaller size and higher quality, so the cool thing would be to convert uploaded animated GIFs to WebMs before storing them.

I personally haven't figured out how to make Paperclip do that, yet.

Most helpful comment

Well, it seems to me that this broken static gifs (https://github.com/tootsuite/mastodon/issues/2108).

And actually we ended up with proprietary mp4 instead of webm

I think animated gif is much better supported :)

All 5 comments

(hey if you do this can you also make ‘em available as mp4s because otherwise I just won’t see gifs and that’ll be bad)

Yeah, webm is not supported on all platforms (i.e. Safari on mobile and Desktop). Is there any issue with just providing mp4 instead of webm?

An update:

I'm currently blocked with this approach because the paperclip av-transcoder extension doesn't work well when you transform the original file, erroring out on the security checks.

The paperclip Attachment processor seems to handle this okay, but I can't work out how it does that.

@Gargron submitted a question on stackoverflow.

Note that if we make this change, the videos won't autoplay because pictures are presented as a CSS background, and videos don't work with that, and get tumbnailed. Either videos would have to be handled differently, or we put an overlay on them to indicate they are a video, and you click-through to see it.

Also, I developed for webm because that was what was in the title, but I'd vote for mp4 as well.

good work! 🎉

Well, it seems to me that this broken static gifs (https://github.com/tootsuite/mastodon/issues/2108).

And actually we ended up with proprietary mp4 instead of webm

I think animated gif is much better supported :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KellerFuchs picture KellerFuchs  ·  3Comments

marrus-sh picture marrus-sh  ·  3Comments

golbette picture golbette  ·  3Comments

flukejones picture flukejones  ·  3Comments

ghost picture ghost  ·  3Comments