WebM to APNG

Your video never leaves your browser, and nothing is downloaded to make this work. Your browser already decodes WebM because it has to play it; this asks it for the picture at each moment and writes APNG around what comes back.

…or drop one anywhere on this page.

An APNG: the same idea as a GIF, with all the colours.

Full colour and real transparency, where a GIF has 256 colours and a single on-or-off transparent index. The first frame of an APNG is an ordinary PNG, so anything that has never heard of the format still shows a sensible still rather than an error. Delays are stored as a fraction, so any frame rate is expressed exactly — which is not true of a GIF.

It will probably be bigger than the video

This surprises everybody, so it is worth saying before you press the button. A video codec stores the difference between one frame and the next: a person talking against a still background costs almost nothing per frame, because almost nothing changes. APNG does nothing of the kind. Every frame is stored whole, with nothing carried over from the frame before it.

So a ten-second clip that was 2 MB as an MP4 can easily be 8 MB coming out. The controls above are the cure: fewer frames a second, a smaller width, and a shorter span. The size is shown before you download anything.

The timing is kept exactly

This is where APNG is better than a GIF. A GIF stores frame delays in hundredths of a second and nothing finer, so thirty frames a second becomes 33.3 and there is no setting that fixes it. An APNG stores the delay as a fraction, numerator over denominator, so any rate at all is expressed exactly.

So the rate you choose above is the rate you get, and the length shown before you download is the length it will actually play for.

Where the frames come from

There are three ways to get pictures out of a video in a browser and only one of them works. This was measured rather than assumed:

Each frame is taken from the middle of its slot rather than the start. Asking for the picture at exactly 1.0 seconds on a clip that cuts at 1.0 seconds is asking the decoder which side of the line to round to, and different files answer differently. The midpoint has no such question in it.

What does not come across

The sound. None of these five formats has any, so it is not lost so much as impossible. If it was the sound you wanted, the same file will give you an MP3 and nothing is uploaded there either. Subtitles, chapters, rotation metadata and any second video track are not carried.

AVI, MOV, WMV, FLV and MTS are refused, and that is not a shortcoming of this page: no browser will decode them, and working around it would mean shipping a demuxer and a codec for each. If you hand one over it says so plainly rather than producing an empty file. An .ogv with Theora video does open, and has no picture in it this browser can decode — the page says that too.

Where to go next