APNG to MP4 Converter
Convert animated PNG (APNG) files to MP4 video format directly in your browser. Free, private, no upload required.
Drop your APNG file here or click to browse
Supports .apng and .png files up to 50 MB
About
Animated PNG (APNG) enjoys broad browser support but near-zero compatibility with video players, editors, and social platforms. Attempting to share an APNG on most messaging apps yields a static first frame. This converter parses the raw APNG binary structure - reading acTL (animation control), fcTL (frame control), and fdAT (frame data) chunks - then reconstructs each frame onto a canvas, respecting per-frame dispose_op and blend_op flags defined in the APNG specification. The canvas stream is captured via the MediaRecorder API and encoded into a playable video container. All processing runs locally in your browser. No file ever leaves your machine. Note: output uses WebM/VP9 encoding internally (the most broadly supported codec for MediaRecorder). Actual MP4 (H.264) container output depends on browser codec availability. Chrome on desktop typically produces VP9 WebM; Safari may produce MP4 natively. The tool approximates original frame timing but cannot reproduce sub-millisecond precision due to browser event loop constraints.
Formulas
Each APNG frame specifies its display duration via two fields in the fcTL chunk:
When delay_den = 0, the spec mandates treating it as 100, yielding units of 1/100 second. The effective frame rate across the animation is:
where N = total number of frames. For the MediaRecorder bitrate, the tool computes:
where Q is a quality multiplier: 2 for low, 5 for medium, 10 for high, and 20 for maximum quality. The dispose_op controls canvas state between frames: 0 leaves pixels unchanged, 1 clears the sub-frame region to rgba(0,0,0,0), and 2 restores the canvas to its state before the current frame was drawn. The blend_op controls compositing: 0 replaces the region entirely, 1 uses standard alpha blending (Cout = αsrc ⋅ Csrc + (1 − αsrc) ⋅ Cdst).
Reference Data
| APNG Chunk | Length (bytes) | Purpose | Key Fields |
|---|---|---|---|
| PNG Signature | 8 | File identity | 89 50 4E 47 0D 0A 1A 0A |
| IHDR | 13 | Image header | Width, Height, Bit depth, Color type |
| acTL | 8 | Animation control | num_frames, num_plays |
| fcTL | 26 | Frame control | width, height, x_offset, y_offset, delay_num, delay_den, dispose_op, blend_op |
| IDAT | Variable | Default image data | Compressed pixel data (may be first frame) |
| fdAT | Variable | Frame data | sequence_number + compressed pixel data |
| IEND | 0 | Image end marker | Terminator chunk |
| dispose_op Values | |||
| 0 | APNG_DISPOSE_OP_NONE - no disposal, frame persists | ||
| 1 | APNG_DISPOSE_OP_BACKGROUND - region cleared to transparent black | ||
| 2 | APNG_DISPOSE_OP_PREVIOUS - region reverted to previous content | ||
| blend_op Values | |||
| 0 | APNG_BLEND_OP_SOURCE - overwrite region (all channels including alpha) | ||
| 1 | APNG_BLEND_OP_OVER - alpha-composite over existing content | ||
| Common Frame Rates | |||
| 10 fps | Typical low-quality GIF/APNG animations | ||
| 24 fps | Film standard, smooth motion | ||
| 30 fps | Web video standard (NTSC) | ||
| 60 fps | High frame rate, gaming captures | ||
| MediaRecorder Codec Support | |||
| Chrome | video/webm;codecs=vp9, video/webm;codecs=vp8 | ||
| Firefox | video/webm;codecs=vp8 | ||
| Safari 14.6+ | video/mp4 (H.264 via MediaRecorder) | ||
| Edge | video/webm;codecs=vp9, video/webm;codecs=vp8 | ||