Turn a Lottie animation into an MP4 for social platforms, video editors and presentations — the places that take video and nothing else. This does it with the encoder already built into your browser, so there is no thirty-megabyte ffmpeg download before anything happens, no waiting for a WebAssembly build to initialise, and no upload. Encoding is hardware-accelerated and produces ordinary H.264, the same thing your phone records. Frames are stepped one at a time rather than screen-recorded, so the timing is exact and nothing is dropped if your machine is busy. Set the width, frame rate and quality, pick a background — MP4 has no transparency, so one is required rather than optional — and the file is assembled in memory with its index at the front, which is what lets a video start playing before it has fully downloaded. The animation never leaves your device, which matters when it is client work or came from a paid marketplace.
| Aspect | MP4 | GIF |
|---|---|---|
| File size | Typically a fraction | Much larger |
| Colours | Full colour | 256 per frame |
| Frame rate | Up to 60 and beyond | 50 maximum, in practice |
| Transparency | None | One bit, with fringing |
| Autoplay in email | No | Yes |
| Video editors | Native | Needs conversion |
No. Frames are rendered and encoded in your browser and the MP4 is assembled in memory. Lottie files are frequently client work or paid marketplace purchases, so keeping them off a server is the point.
Because it does not ship a copy of ffmpeg. Browsers have had a built-in video encoder for a few years now, exposed through the WebCodecs API, and this uses that. It is hardware-accelerated, starts instantly, and produces the same H.264 as any other tool.
Chrome, Edge and Safari 16.4 or later, plus recent Firefox. If your browser has no video encoder the tool says so up front rather than failing partway through, and the GIF converter works everywhere.
MP4 has no alpha channel — there is no such thing as a transparent H.264 video in any player you are likely to target. Transparent areas have to become some colour, and choosing it is better than silently getting black. If you need transparency, use GIF or WebM.
H.264 stores colour at half resolution horizontally and vertically, so both dimensions must be even numbers. An odd size is rounded up by one pixel; anything else would be rejected by the encoder outright.
MP4 unless the destination genuinely cannot take video. It is dramatically smaller, supports full colour rather than 256, and handles frame rates above 50 that GIF cannot express. GIF only wins where autoplay without a player is required, such as email.
Lower the quality slider, which lowers the bitrate. Reducing the width or frame rate helps too. Flat vector animation compresses extremely well, so you can usually go well below the default before anything is visible.
Almost every browser-based MP4 tool ships ffmpeg compiled to WebAssembly: tens of megabytes downloaded before the first frame, a requirement for cross-origin isolation headers to get SharedArrayBuffer, and an H.264 encoder whose licence is GPL because x264 is GPL. None of that is necessary any more. This uses the encoder already present in the browser through the WebCodecs API, which is hardware-accelerated, needs no download, needs no isolation headers, and produces the same H.264 a phone camera records. The browser is asked which profile it will accept rather than being told: a list of codec strings from Main level 4.2 down to Baseline level 3.1 is probed with VideoEncoder.isConfigSupported, and the first supported one is used, because browsers genuinely disagree about which they will take at a given resolution. Frames come from lottie-web's canvas renderer stepped with goToAndStop, so nothing is dropped the way a screen recording would drop it, and each is wrapped as a VideoFrame with an explicit timestamp and duration rather than relying on wall-clock timing. Dimensions are rounded to even numbers because H.264 in yuv420p subsamples chroma by two and rejects odd sizes outright. Bitrate is computed from pixels times frame rate times a quality-derived bits-per-pixel figure, since a fixed rule like 5 Mbps for 1080p smears badly at 60fps and wastes bandwidth at 12. A keyframe is forced every second so the result stays seekable in an editor. The encoder queue is throttled — it is asynchronous, and letting it run ahead consumes far more memory than the frames themselves. The chunks are muxed into an MP4 container in memory with the index written at the front, so the file plays immediately rather than after a full download. Nothing is uploaded.