Getting a small GIF
GIF is an old format and gets big fast. For chats and docs, 3–6 seconds at 480 px and 12 fps is a good start; lower the width or fps if the file is too large.
How it works
FFmpeg (compiled to WebAssembly) samples the frames, creates a palette tuned to your clip and dithers the result. Everything runs locally.