Convert APNG to MKV Online

Turn animated APNG images into an MKV video. Choose how files are merged, set image duration, pick a background color, and adjust video quality.

Initializing... drag & drop files here

Supports: APNG, PNG

OptionsAdvanced Options - Our defaults are optimized for the best results. We recommend you keeping the defaults unless you have a specific need.
Show All Options
Background Color
Background Color
File Compression
Preset
Video resolution

Convert APNG to MKV

An animated PNG is an image file that happens to move: every frame is stored losslessly, with no prediction between frames and a full 8-bit alpha channel, which is why even a short loop gets heavy. Matroska is the opposite kind of thing — not a codec at all, but an envelope that can hold a video track, several audio tracks and subtitles side by side, defined by an open specification anyone can implement. Converting APNG to MKV re-encodes the animation with a real video codec and wraps it in that envelope, which is the combination you want for local playback, archiving, and anything you plan to add tracks to later.

Matroska (MKV) at a Glance

Property Value
What it is A container, not a codec — "an envelope in which there can be many audio, video, and subtitles streams"
Specification RFC 9559, Matroska Media Container Format, IETF Standards Track, October 2024
Built on EBML, the Extensible Binary Meta Language — a binary analogue of XML
Origin Started in 2002, derived from the earlier MCF project
Licensing Open and royalty-free; the container itself carries no patent pool
Tracks Multiple video, audio, subtitle, chapter and attachment tracks in one file
Related extensions .mkv for video, .mka for audio-only, .mks for subtitles
Video codec written here H.264 by default, with 20 other codecs selectable
Audio codec written here AAC by default, when the source has audio
Playback VLC, mpv, Kodi, Plex, Jellyfin and most desktop players; not a browser format
Best for Local and home-server playback, archiving, multi-track files

APNG at a Glance

Property Value
What it is An animated raster image — a normal PNG plus animation chunks
Specification Part of the PNG specification, Third Edition, a W3C Recommendation since 24 June 2025
First proposed 2004, as a Mozilla extension to PNG
Compression Lossless DEFLATE, applied per frame
Colour and alpha Truecolour plus an 8-bit alpha channel
Animation chunks acTL for animation control, fcTL per frame, fdAT for frame data
Audio None — the format has no way to store it
Browser support Chrome 59+, Edge 12+, Firefox 3+, Opera 46+, Safari 8+
Best for Short lossless loops that need clean transparent edges

How to Convert APNG to MKV

  1. Upload Your APNG File: Drag the .apng onto the drop zone or use the file picker. A .png carrying animation chunks is accepted too — several exporters write APNG under that extension.
  2. Set the Background Color: Transparent and semi-transparent pixels are composited onto this colour before encoding, and the same colour fills letterbox bars if the output shape differs from the source. White is the default.
  3. Choose a Video Codec and File Compression: H.264 is the sensible default. Under File Compression, Quality Preset is the simplest control — its dropdown starts at Very High — while Constant Quality and Constraint Quality let you set the CRF yourself instead. Bitrate and file-size targeting modes don't appear for image sources, so a lower preset, a higher CRF, or a smaller Video resolution is how you trim the file.
  4. Convert and Download: Press Convert and save the .mkv. No sign-up and no watermark. Files upload over an encrypted connection, are processed on our servers, and are deleted automatically after a few hours.

What the Encoder Actually Writes

Two details are worth stating plainly, because most converters leave them implicit.

First, the output is silent, and that is a property of the source rather than of MKV. Matroska is happy to carry audio — it will carry several tracks at once — but an APNG contains no sound to pass through. The Audio Codec list on this page is there for sources that do have a soundtrack.

Second, the video track is encoded at 8-bit 4:2:0 on this path, whichever codec you pick. That is the standard delivery format for H.264 and its peers and is what makes the file decode in hardware, but it means chroma is stored at half resolution horizontally and vertically. Flat, saturated colour and thin coloured lines — common in the kind of graphics people author as APNG — are where you will notice it first. It also means there is no lossless route here: even the mathematically lossless codecs in the list are encoding a colour-converted image, so do not expect the MKV to be bit-identical to your frames.

Frequently Asked Questions

Why does my MKV have no transparent background?

Because no mainstream video codec has an alpha channel, so the transparency has to go somewhere before encoding. Transparent and semi-transparent pixels are composited onto the Background Color — white unless you change it — and semi-transparent edges blend smoothly into that colour rather than fringing. This is not an MKV limitation specifically; you would hit it converting to MP4, MOV or WebM as well. To keep alpha, stay with an image format such as animated WebP.

Should I convert APNG to MKV or MP4?

MKV if the file is for your own library — a home media server, a desktop player, an archive you may add subtitle or commentary tracks to later. MP4 if the file has to leave your machine: browsers, phones, smart TVs, social platforms and <video> tags all expect it, and none of them expect MKV. The video data can be identical either way, so this is purely a container decision. Convert APNG to MP4 if in doubt.

Which video codec should I choose for an MKV?

H.264 unless you have a reason. It decodes in hardware nearly everywhere and is the default here. H.265 and AV1 produce smaller files at the same quality but cost far more encoding time and are pickier about playback support. VP9 and Theora are worth choosing only for open-codec reasons. The MPEG-1, MPEG-2, H.261, H.263, WMV and Xvid entries exist for compatibility with older hardware and will be larger at equal quality.

Is the MKV lossless the way my APNG was?

No. The container is lossless in the sense that it stores whatever you put in it without altering it, but the encode that happens first is not: the frames are colour-converted to 8-bit 4:2:0 and then compressed by a lossy codec. APNG's losslessness ends the moment it becomes video. If you need frames that survive intact, keep them as images.

Will the MKV play on my TV or phone?

Often, but not dependably. Many smart TVs, Android devices and set-top boxes handle MKV; iOS does not play it natively, and no browser does. Plex and Jellyfin will happily serve MKV but may transcode it on the fly for a client that cannot decode it, which wastes CPU. For anything you are sending to someone else, MP4 avoids the whole question.

Does the animation run at the right speed?

Yes. APNG stores a delay per frame in its fcTL chunks, and the decoder honours those delays when feeding the encoder, so the MKV plays at the pace the animation was authored at. There is no seconds-per-image control on this page because it only applies to still-image sources, which have no timing of their own.

Can I add subtitles or a soundtrack to the result?

Not during this conversion, but the container is built for it. Matroska supports multiple audio, subtitle and attachment tracks in one file, so you can mux extras in afterwards with a tool such as MKVToolNix without re-encoding the video you just created. That flexibility is the main reason to choose MKV over MP4 for a working file.

How much smaller will the MKV be than the APNG?

Usually a large reduction, for two independent reasons: APNG has no interframe compression at all, so a static background is re-encoded in full on every frame, while H.264 codes only what changes; and the encode is lossy, discarding detail the eye is poor at noticing. Animations with a still background and a small moving element shrink the most. High-motion or noisy content shrinks the least, and you may need to raise Quality Preset to keep it clean.

Rate Convert APNG to MKV Online Tool

Rating: 0.0 / 5 - 1 reviews