AVI to WebM Converter
Build FFmpeg commands to convert AVI video files to WebM format, with codec options for VP8, VP9, and AV1.
FFmpeg Command Builder
Configure your conversion options and get a ready-to-run FFmpeg command.
0 — lossless
63 — smallest
Generated FFmpeg Command
Click "Generate Command" to build your FFmpeg command.
AVI vs. WebM — Format Comparison
Know what you are converting and why
| Feature | AVI | WebM |
|---|---|---|
| Developed by | Microsoft (1992) | Google / open community (2010) |
| Video codecs | Xvid, DivX, MPEG-2 | VP8, VP9, AV1 |
| Audio codecs | MP3, AC3, PCM | Opus, Vorbis |
| Browser support | None (plugin required) | All modern browsers |
| Royalty-free | Codecs may require licenses | Yes — fully open |
| Streaming | Not designed for streaming | Optimized for web delivery |
Install FFmpeg
Free, cross-platform, one-time setup
# macOS (Homebrew)
brew install ffmpeg
# Windows (winget)
winget install ffmpeg
# Ubuntu / Debian
sudo apt install ffmpeg
# Verify installation
ffmpeg -version
VP9 Two-Pass Encoding (Best Quality)
Use when file size must not exceed a specific limit
Two-pass encoding analyzes the video on the first pass and allocates bitrate optimally on the second pass. Use this when you need to hit a target file size or bitrate ceiling.
# Pass 1 (analysis — output goes to /dev/null)
ffmpeg -i input.avi -c:v libvpx-vp9 -b:v 1M -pass 1 -an -f null /dev/null
# Pass 2 (encode with Opus audio)
ffmpeg -i input.avi -c:v libvpx-vp9 -b:v 1M -pass 2 -c:a libopus -b:a 128k output.webm
# On Windows, replace /dev/null with NUL
ffmpeg -i input.avi -c:v libvpx-vp9 -b:v 1M -pass 1 -an -f null NUL
Replace 1M with your desired target bitrate. Typical web 1080p is 1.5M–2.5M; 720p is 0.8M–1.5M.
Summary
Build FFmpeg commands to convert AVI video files to WebM format, with codec options for VP8, VP9, and AV1.
How it works
- Select your target video codec: VP9 for best quality-to-size ratio, VP8 for widest compatibility, or AV1 for cutting-edge compression.
- Choose audio encoding — Opus is the recommended codec for WebM and produces excellent quality at low bitrates.
- Set the quality level using the CRF slider — lower values mean higher quality and larger file size.
- Adjust optional settings such as output resolution, audio bitrate, and number of CPU threads.
- Click "Generate Command" to produce the FFmpeg command tailored to your selections.
- Copy the command and run it in your terminal with FFmpeg installed to convert the file.
Use cases
- Embed video on a website using the HTML5 video element without requiring a plugin.
- Serve open-source, royalty-free video content without licensing fees from H.264 patents.
- Convert AVI recordings to WebM for upload to web platforms that prefer open formats.
- Reduce file size for web delivery using VP9 or AV1 compression.
- Prepare screencasts and tutorial videos in a browser-native format.
- Batch-convert legacy AVI archives to a modern web-optimized container.
- Create WebM video for use in CSS animations or background video elements.
- Generate WebM alongside MP4 as a fallback pair for maximum browser compatibility.
Frequently Asked Questions
Last updated: 2026-06-11 ·
Reviewed by Nham Vu