Skip to content

Uses FFmpeg to convert animated GIFs to WebM video files on demand. Configured for AWS Lambda using the Serverless Framework.

Notifications You must be signed in to change notification settings

onetrickwolf/gif-to-webm-please

Repository files navigation


"Please turn into a less terrible file format..."

GIF to WebM...please...

Uses FFmpeg to convert animated GIFs to WebM video files on demand.

Configured for AWS Lambda using the Serverless Framework.

Motivation

  • Most renderers like Three.js or PixiJS do not support GIFs as textures but support video files.
  • WebMs can massively reduce file size.
  • Generally more performant than existing methods of parsing and loading GIFs as textures.

I specifically made this API in order to dynamically load Twitch and BTTV animated emotes into PixiJS for streamer overlays. There were some existing methods but the performance generally suffered when trying to load thousands of emotes.

Roadmap

  • Would like to eventually implemented this with FFmpeg WASM as well so conversion can be done completely in browser. FFmpeh WASM only works with Chromium 79 and above though and OBS is currently still on Chromium 75.
  • Add caching to cache previously requested URLs most likely with CloudFront.
  • I plan to restrict public API to only convert URLs from Twitch and BTTV to prevent general usage making my AWS bill go crazy

Credits

About

Uses FFmpeg to convert animated GIFs to WebM video files on demand. Configured for AWS Lambda using the Serverless Framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published