APNG to AVI Converter

Decodes an uploaded APNG's frames and delays, plays them on schedule to a hidden canvas captured with canvas.captureStream(), and records the stream with MediaRecorder. No browser anywhere implements an AVI encoder, so this always produces a real WebM video and is explicit about that in the UI rather than mislabeling the download. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool plays back an APNG's frames on a canvas and records that playback into a downloadable video, using your browser's own MediaRecorder.

It's upfront about a real limitation: no browser can encode true AVI, so what actually downloads is a real, valid WebM video, clearly labeled as such rather than disguised with an .avi extension.

What Is APNG to AVI Converter?

A client-side APNG-to-video tool that decodes an uploaded APNG's frames and delays, then uses canvas.captureStream() plus MediaRecorder to record a scheduled canvas animation.

Because AVI recording doesn't exist in any browser's media stack, the mimeType candidate list for this tool is WebM-only — there's no MP4/AVI fallback chain to fall through, just an honest WebM result.

How APNG to AVI Converter Works

The APNG's frames are decoded up front into RGBA pixel buffers with their delay times, and a canvas sized to the animation's dimensions has its captured MediaStream fed into a MediaRecorder using a WebM mimeType.

A requestAnimationFrame loop drives the canvas through the frame schedule, redrawing only when the current frame changes, until the full animation duration has been recorded once.

The recorder's collected chunks are assembled into a Blob typed as the actual negotiated WebM mimeType, and the download is named converted.webm — never .avi — so the extension always matches the real bytes.

When To Use APNG to AVI Converter

Use it when you want a video version of an APNG animation and are fine receiving a WebM file (which plays natively in every modern browser and most video players) rather than a true AVI.

It's most useful for quickly turning an animated PNG into something you can drop into a <video> tag or a platform that accepts WebM uploads.

Features

Advantages

  • Runs entirely client-side; the uploaded APNG is never sent to a server.
  • Always tells you honestly what container you actually got, instead of mislabeling a WebM file as AVI.
  • Produces a genuinely valid, playable video using the browser's real encoder.

Limitations

  • True AVI output is never produced by this tool — no browser implements an AVI encoder, so the result is always a real WebM video, explicitly labeled and downloaded as .webm.
  • Recording happens in real time, so a longer APNG animation takes proportionally longer to record.
  • Very short per-frame delays can be missed if the canvas can't repaint fast enough for the recorder to capture every distinct frame.

Examples

Convert a short APNG loop

Input

A 200x200 APNG, 8 frames at 150ms each

Output

A converted.webm video of the same 1.2-second animation

The AVI mimeType candidates are WebM-only, so this is always the realistic output — clearly labeled, not disguised as AVI.

MediaRecorder unavailable

Input

An APNG uploaded in a browser lacking MediaRecorder support

Output

A clear error explaining recording isn't available in this browser

The component checks for MediaRecorder and canvas.captureStream() before attempting to record.

Best Practices & Notes

Best Practices

  • If you specifically need a .avi file for another application, treat this tool's WebM output as an intermediate step to re-encode with a desktop tool.
  • Keep source APNGs short, since recording happens in real time.

Developer Notes

apng-to-avi-converter.ts re-exports pickSupportedMimeType/computeFrameScheduleMs/loadApngFramesForVideoExport from apng-to-mp4-converter.ts and adds its own AVI_MIME_CANDIDATES, which lists only WebM mimeTypes since no browser exposes an AVI encoder to MediaRecorder — the component is deliberately explicit in its UI copy that the download is WebM, not AVI.

APNG to AVI Converter Use Cases

  • Getting a playable video version of an APNG animation when a true AVI isn't strictly required
  • Converting an animated PNG logo for a platform that accepts WebM uploads
  • Producing an honest video fallback when AVI specifically isn't achievable client-side

Common Mistakes

  • Assuming the downloaded file is a real .avi — it never is; always check the actual .webm extension and file type.
  • Renaming the downloaded WebM file to .avi, which produces a file that most players will fail to open correctly.

Tips

  • If your destination truly requires AVI, re-encode this tool's WebM output with a desktop tool like ffmpeg.
  • WebM plays natively in virtually every modern browser, so it's often a perfectly good substitute for AVI.

References

Frequently Asked Questions