Lottie to MP4

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.

MP4 against GIF for the same animation

AspectMP4GIF
File sizeTypically a fractionMuch larger
ColoursFull colour256 per frame
Frame rateUp to 60 and beyond50 maximum, in practice
TransparencyNoneOne bit, with fringing
Autoplay in emailNoYes
Video editorsNativeNeeds conversion

When to use it

  1. Post an animation to a social platform that rejects GIF and Lottie.
  2. Drop an animation into a video edit or a presentation.
  3. Send a client a preview that plays anywhere without a player.
  4. Produce a smooth 60 fps version where GIF would be limited to 50.
  5. Get a much smaller file than the equivalent GIF.

How to Use

  1. Drop in a .json or .lottie animation.
  2. Set the output width and frame rate.
  3. Choose a quality level and a background colour.
  4. Render, play the preview, and download.

Features

  1. Uses the browser's own hardware H.264 encoder — no ffmpeg download
  2. No cross-origin isolation headers required
  3. Frame-stepped rendering, not screen capture
  4. H.264 profile probed rather than assumed
  5. Bitrate computed from size, frame rate and quality
  6. Dimensions rounded to even, as H.264 requires
  7. Keyframe every second, so the file stays seekable in editors
  8. Index written at the front for immediate playback
  9. 100% client-side — animations are never uploaded

FAQs

Is my animation uploaded?

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.

Why is there no long download before it starts?

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.

Which browsers does it work in?

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.

Why do I have to choose a background?

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.

Why did my dimensions change slightly?

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 or GIF?

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.

How do I make the file smaller?

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.

Technical Details

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.

Lottie & Animation Tools

Lottie & Animation Tools

  • Lottie to GIF
  • Animated SVG to Lottie
  • SVG to Lottie
  • Lottie to WebM
  • Lottie to MOV
  • Lottie to PNG Sequence
  • Lottie to APNG
  • Lottie Metadata Viewer