User Rating 0.0 ★★★★★
Total Usage 0 times

Drop AVI file here or click to browse

Supports uncompressed (BI_RGB) and MJPEG AVI

Is this tool helpful?

Your feedback helps us improve.

★ ★ ★ ★ ★

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.

avi to apng video to apng animated png converter avi converter apng encoder video to animated image

Formulas

The AVI file stores frame timing as microseconds per frame in the avih main header chunk:

FPS = 1,000,000dwMicroSecPerFrame

APNG encodes frame delay as a rational fraction in each fcTL chunk. Given a target frames-per-second value FPS:

delay_num = 1 , delay_den = 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.

raw scanline size = (W × 4 + 1) × H bytes

CRC32 is computed over the chunk type + chunk data for every PNG chunk. The ZLIB stream uses Adler-32 as its check value:

adler32 = B × 65536 + A

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

PropertyAVIAPNG
Container FormatRIFF (Resource Interchange File Format)PNG Extension (backward-compatible)
CompressionUncompressed, MJPEG, DivX, Xvid, H.264ZLIB/Deflate per frame (lossless)
Color Depth24-bit BGR or 32-bit BGRA32-bit RGBA (8-bit per channel)
Alpha ChannelRare (32-bit BGRA only)Full support
AnimationNative video playbackFrame-by-frame with fcTL delay
LoopingPlayer-dependentnum_plays in acTL (0 = infinite)
Browser SupportRequires <video> + codecAll modern browsers natively
Max Resolution (practical)Unlimited (codec-dependent)~4096×4096 (memory-limited)
Frame Delay UnitdwMicroSecPerFrame in Ξsdelay_numdelay_den in seconds
File Extension.avi.apng / .png
MIME Typevideo/x-msvideoimage/apng / image/png
Typical Use CaseVideo editing, archival footageAnimated stickers, UI animations, sprites
Audio SupportYes (PCM, MP3, AC3)No
SpecificationMicrosoft RIFF AVI (1992)APNG Spec 1.0 (Mozilla, 2008)
Fallback BehaviorN/AFirst frame shown as static PNG
Chunk StructureRIFF → LIST hdrl → LIST movi → idx1Signature → IHDR → acTL → fcTL+IDAT → fcTL+fdAT → IEND
ChecksumNone (container-level)CRC32 per chunk
Disposal OperationN/A (continuous video)0=none, 1=background, 2=previous
Blend OperationN/A0=source, 1=over

Frequently Asked Questions

This tool supports uncompressed AVI (BI_RGB, biCompression = 0) and Motion JPEG (MJPG, biCompression = MJPG/0x47504A4D). These are the codecs decodable natively in a browser. AVI files encoded with H.264, DivX, Xvid, or other inter-frame codecs require platform-specific decoders and cannot be parsed client-side. Use FFmpeg to transcode first: ffmpeg -i input.avi -vcodec mjpeg -q:v 2 output_mjpeg.avi
AVI with MJPEG uses lossy JPEG compression per frame, typically achieving 10:1-20:1 ratios. APNG uses lossless ZLIB/Deflate compression on raw RGBA pixel data, which preserves every pixel but compresses far less efficiently for photographic content. A 640×480 frame contains 1,228,800 bytes of raw RGBA data. With ZLIB store blocks (no compression optimization for speed), overhead is near 1:1. Reduce output size by lowering the scale factor or limiting frame count.
Per the APNG specification, a num_plays value of 0 in the acTL chunk means the animation loops infinitely. A value of 1 plays once and stops on the last frame. A value of 3 plays the entire sequence three times. Browsers respect this field. Note: some image viewers may ignore it and always loop.
APNG is an image format and does not support audio. This converter extracts only the video stream (the "vids" stream handler in the AVI strh chunk). Audio chunks ('01wb') are skipped during parsing. If you need audio, consider converting to WebM or MP4 instead.
AVI stores timing as dwMicroSecPerFrame in the avih header - a single integer in microseconds, giving uniform frame duration. APNG allows per-frame delay via delay_num/delay_den in each fcTL chunk, supporting variable frame rates. This converter applies uniform timing derived from your FPS setting. The minimum APNG delay recognized by most browsers is approximately 10ms (100 FPS). Values below this are typically clamped to 100ms by browsers like Chrome, similar to GIF behavior.
The practical limit depends on available browser memory. Each frame at 640×480 RGBA requires ~1.2 MB of raw pixel data. At 100 frames, that is ~120 MB of pixel buffers alone, plus the source file buffer. Most browsers allocate 1-4 GB to a tab. Expect reliable operation up to approximately 200 frames at 640×480, or fewer frames at higher resolutions. The scale slider directly reduces memory requirements quadratically - halving dimensions reduces memory by 75%.