AVI to APNG Converter
Convert AVI video files to Animated PNG (APNG) format directly in your browser. Client-side processing, no upload required. Adjust FPS, scale, and loop count.
Drop AVI file here or click to browse
Supports uncompressed (BI_RGB) and MJPEG AVI
Preparing...
About
AVI (Audio Video Interleave) is a Microsoft RIFF-based container that stores uncompressed or MJPEG-compressed video frames. Converting to APNG (Animated Portable Network Graphics) produces a lossless animated image supported natively in all modern browsers since Firefox 3 and Chrome 59. Incorrect conversion - wrong frame delay, missing fcTL sequence numbers, or botched CRC32 checksums - yields files that render as static images or fail silently. This tool parses the RIFF container in your browser, extracts each 00dc/00db frame chunk, decodes raw BMP or MJPEG pixel data, and re-encodes every frame into spec-compliant APNG with proper acTL, fcTL, and fdAT chunks. All processing occurs client-side in a Web Worker. No data leaves your machine.
Limitations: this converter handles uncompressed (BI_RGB) and Motion JPEG (MJPG) AVI streams. Codecs like H.264, DivX, or Xvid inside AVI require full video decoders not available natively in browsers. For those, transcode to uncompressed or MJPEG AVI first. Output file size scales with W Ã H Ã frame count - a 640Ã480 video at 100 frames can produce APNG files exceeding 50MB. Use the scale slider to reduce dimensions.
Formulas
The AVI file stores frame timing as microseconds per frame in the avih main header chunk:
APNG encodes frame delay as a rational fraction in each fcTL chunk. Given a target frames-per-second value FPS:
The output APNG contains an animation control chunk (acTL) specifying total frame count num_frames and loop count num_plays (where 0 means infinite looping). Each frame uses a filter byte (this tool uses filter 0 = None) followed by raw RGBA scanline data, then ZLIB-compressed. The compressed payload is wrapped in IDAT (first frame) or fdAT (subsequent frames) chunks.
CRC32 is computed over the chunk type + chunk data for every PNG chunk. The ZLIB stream uses Adler-32 as its check value:
where A = 1 + nâi=1 bytei mod 65521, and B = nâi=1 Ai mod 65521. When a scale factor s is applied, output dimensions become Wout = round(W Ã s) and Hout = round(H Ã s).
Reference Data
| Property | AVI | APNG |
|---|---|---|
| Container Format | RIFF (Resource Interchange File Format) | PNG Extension (backward-compatible) |
| Compression | Uncompressed, MJPEG, DivX, Xvid, H.264 | ZLIB/Deflate per frame (lossless) |
| Color Depth | 24-bit BGR or 32-bit BGRA | 32-bit RGBA (8-bit per channel) |
| Alpha Channel | Rare (32-bit BGRA only) | Full support |
| Animation | Native video playback | Frame-by-frame with fcTL delay |
| Looping | Player-dependent | num_plays in acTL (0 = infinite) |
| Browser Support | Requires <video> + codec | All modern browsers natively |
| Max Resolution (practical) | Unlimited (codec-dependent) | ~4096Ã4096 (memory-limited) |
| Frame Delay Unit | dwMicroSecPerFrame in Ξs | delay_numdelay_den in seconds |
| File Extension | .avi | .apng / .png |
| MIME Type | video/x-msvideo | image/apng / image/png |
| Typical Use Case | Video editing, archival footage | Animated stickers, UI animations, sprites |
| Audio Support | Yes (PCM, MP3, AC3) | No |
| Specification | Microsoft RIFF AVI (1992) | APNG Spec 1.0 (Mozilla, 2008) |
| Fallback Behavior | N/A | First frame shown as static PNG |
| Chunk Structure | RIFF â LIST hdrl â LIST movi â idx1 | Signature â IHDR â acTL â fcTL+IDAT â fcTL+fdAT â IEND |
| Checksum | None (container-level) | CRC32 per chunk |
| Disposal Operation | N/A (continuous video) | 0=none, 1=background, 2=previous |
| Blend Operation | N/A | 0=source, 1=over |