"Please turn into a less terrible file format..."
Uses FFmpeg to convert animated GIFs to WebM video files on demand.
Configured for AWS Lambda using the Serverless Framework.
- 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.
- 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