Skip to content
Server-sideDeleted in 30 minutes

Convert AVI to WebM

Re-encode an old AVI as a WebM a browser will play. Two problems are being solved at once here: no browser plays the AVI container, and the DivX or Xvid video inside it is a codec modern hardware dropped support for years ago. VP9 fixes both, and old standard-definition footage encodes small and quickly because there is not much of it to encode.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free
AVIWEBM

Drop your AVI file here, or click to browse

Up to 50 MB. Deleted automatically after 30 minutes.

What it does

  • VP9 video and Opus audio
  • Reads DivX, Xvid and MJPEG payloads
  • Old SD footage encodes small and fast
  • No watermark and no sign-up

How to use AVI to WebM

  1. 1

    Add the AVI

    Drop the file in or choose it from your computer. Old AVI files are usually small enough to upload whole.

  2. 2

    Convert

    Whatever codec is inside is decoded and re-encoded as VP9 with Opus audio in a WebM container.

  3. 3

    Serve it with a fallback

    Offer the WebM first in your video element and an MP4 second, so older browsers still get something.

Two obstacles, not one

An AVI in a browser fails twice over, and it is worth separating the reasons because it explains why nothing simpler than a re-encode works.

The container is the first. AVI was defined by Microsoft in 1992 and no browser has ever implemented it. The web went with MP4 and WebM, and AVI is neither.

The codec is the second and the more stubborn. AVI files that survive from the 2000s usually hold DivX or Xvid, and browsers have no decoder for those any more than they do for the container. Even if the video were repackaged into a WebM wrapper untouched, nothing would play it.

So both layers have to change, which means decoding the video and encoding it again.

How it works

Whatever codec is inside is decoded, and the result is encoded as VP9 with Opus audio inside a WebM container. That is a full re-encode with the usual small cost in quality.

VP9 is expensive to encode compared to H.264, but old footage is cheap to encode compared to anything modern, and the two roughly cancel out. These conversions are usually quick.

Why old footage suits this so well

The numbers are the whole story. A camcorder AVI is typically 640 by 480 at 25 or 30 frames a second. Modern video is 1920 by 1080 at 30 or 60, which is six times the pixels arriving twice as often.

VP9 was designed with the second case in mind, so applied to the first it has enormous room to spare. The encoder is not straining to represent the picture, and the output is small — a clip that was tens of megabytes as an AVI often lands at a few as a WebM, which is exactly what you want on a page a visitor has to wait for.

DivX and Xvid also compressed hard for the storage of their time, flattening much of the fine color and texture detail that would otherwise cost bytes now. The footage is simpler than it looks.

Serve both, always

Put the WebM first in your video element and an MP4 second. Browsers play the first source they can, so modern ones take the smaller file and older ones, and devices with hardware H.264 decoding but no VP9, fall back without you doing anything.

For an archive being published online, that fallback matters more than usual — the audience for old footage skews toward people on older equipment.

Examples

Archive footage for a web page

clip-2003.avi
clip-2003.webm

Standard-definition video encodes to a very small WebM, which is the whole argument for using one on a page somebody has to load.

A camcorder clip for an online exhibit

interview.avi
interview.webm

Old recordings put on the web for others to see. The browser will not touch the AVI, and the WebM plays inline with no player.

Frequently asked questions

Why will a browser not play an AVI?

For two reasons at once. No browser implements the AVI container, and the video inside it is usually DivX or Xvid, which browsers have no decoder for either. Both would have to be solved, which is why renaming or repackaging does not help and a genuine re- encode is needed.

Will old footage look worse afterwards?

Barely, and less than you might expect. Standard-definition footage from a camcorder or a capture card carries far less detail than VP9 can represent, so the encoder has room to spare. What you notice is that it plays at all, which the AVI does not in a browser.

Should I convert to WebM or MP4?

Serve both if it is going on a page — the video element takes several sources and each browser picks the first it can play. If the file is going to a person rather than a page, choose MP4: hardware support for H.264 is universal, and the size advantage of VP9 only matters when somebody is downloading it over a network you are paying for.

Why is the file so small?

Because there is little to encode. Old AVI footage is typically 640 by 480 at 25 or 30 frames a second, which is a small fraction of the pixels in modern video, and DivX or Xvid had already flattened much of the fine detail. VP9 then compresses what remains efficiently. A clip that was tens of megabytes as an AVI can become a few as a WebM.