Why Convert AVI to MP4?
AVI (Audio Video Interleave) was introduced by Microsoft in 1992. For its time, it was a solid container format, but more than three decades later, it shows its age in ways that matter. AVI lacks native support for modern codecs like H.265 and AV1, does not handle subtitles well, has limited metadata support, and produces larger files than necessary because it cannot leverage the efficiency of modern containers.
MP4 (MPEG-4 Part 14), on the other hand, is the universal standard. It works on every device, every operating system, every browser, and every streaming platform. It supports modern codecs, chapter markers, subtitles, multiple audio tracks, and efficient metadata handling.
If you have AVI files taking up space on your hard drive, converting them to MP4 will save storage, improve compatibility, and future-proof your video library.
AVI vs. MP4: A Direct Comparison
| Feature | AVI | MP4 |
|---|---|---|
| Year Introduced | 1992 | 2001 |
| Modern Codec Support | Limited (DivX, Xvid, MJPEG) | Full (H.264, H.265, AV1, VP9) |
| Subtitle Support | External files only | Embedded (SRT, ASS, MOV text) |
| Streaming Support | Poor (no progressive download) | Excellent (faststart atom) |
| Browser Playback | Not supported | Universal |
| File Size Efficiency | Larger | Smaller at same quality |
| Metadata | Basic | Rich (tags, chapters, artwork) |
| Mobile Compatibility | Poor | Excellent |
| Maximum Resolution | Unlimited (no container limit) | Unlimited |
| DRM Support | No | Yes (for commercial content) |
Pro Tip: Before converting, check what codec your AVI file actually uses. Many AVI files from the 2000s use DivX or Xvid (MPEG-4 ASP), which is different from H.264 (MPEG-4 AVC). Knowing the source codec helps you choose the right conversion settings.
Check with: ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of csv=p=0 input.avi

Method 1: Convert AVI to MP4 Online (Fastest)
The easiest way to convert AVI to MP4 is using ConvertIntoMP4's MP4 Converter. No software installation required, and it works on any device with a browser.
Steps
- Go to the MP4 Converter page
- Upload your AVI file by dragging and dropping or clicking to browse
- Select your preferred quality settings (or use the defaults for good results)
- Click Convert
- Download your MP4 file
The online converter handles all the codec detection and conversion settings automatically. It picks appropriate bitrates based on the source file quality and uses H.264 encoding for maximum compatibility.
For more control over the output, including resolution changes and advanced codec settings, use the full Video Converter.
Method 2: Convert AVI to MP4 with FFmpeg
FFmpeg provides the most control over the conversion process. Here are the most common scenarios:
Basic Conversion (High Quality)
ffmpeg -i input.avi -c:v libx264 -crf 20 -preset slow \
-c:a aac -b:a 192k -movflags +faststart output.mp4
This command:
- Encodes video with H.264 at high quality (CRF 20)
- Uses the slow preset for better compression efficiency
- Encodes audio as AAC at 192 kbps
- Adds the
faststartflag for web compatibility
Quick Conversion (Fast, Good Quality)
ffmpeg -i input.avi -c:v libx264 -crf 23 -preset fast \
-c:a aac -b:a 128k output.mp4
Maximum Quality Preservation
When quality is more important than file size:
ffmpeg -i input.avi -c:v libx264 -crf 16 -preset veryslow \
-c:a aac -b:a 320k -movflags +faststart output.mp4
Small File Size (Lower Quality)
When you need the smallest possible file:
ffmpeg -i input.avi -c:v libx264 -crf 28 -preset medium \
-vf scale=1280:720 -c:a aac -b:a 96k output.mp4
Using H.265 for Better Compression
H.265 produces smaller files at the same quality. This is especially beneficial for long videos:
ffmpeg -i input.avi -c:v libx265 -crf 24 -preset medium \
-c:a aac -b:a 192k -movflags +faststart output.mp4
For a detailed comparison of H.264 vs H.265, read our guide on H.265 vs H.264 vs AV1.
Method 3: Stream Remux (When Possible)
If your AVI file already contains H.264 video (uncommon but possible), you can remux without re-encoding. This is instant and completely lossless:
# Check the codec first
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name \
-of csv=p=0 input.avi
# If it shows h264, you can remux:
ffmpeg -i input.avi -c copy -movflags +faststart output.mp4
If the codec is something other than H.264 (which it usually is with AVI files), you will need to re-encode using one of the methods above.

Quality Settings Explained
The CRF (Constant Rate Factor) value is the primary quality control when converting AVI to MP4. Understanding what each value means helps you make informed decisions.
CRF Quick Reference
| CRF Value | Quality Level | Use Case | File Size Impact |
|---|---|---|---|
| 0 | Lossless (huge files) | Archival, editing source | 10-50x larger |
| 15-17 | Visually lossless | Master copies, high-end delivery | 2-3x larger |
| 18-20 | Excellent | YouTube uploads, portfolios | Baseline |
| 21-23 | Very good (default) | General purpose | 30-40% smaller |
| 24-27 | Good | Streaming, web video | 50-60% smaller |
| 28-32 | Acceptable | Mobile, email attachments | 70-80% smaller |
| 33+ | Low | Previews, thumbnails | Very small |
For most AVI to MP4 conversions, CRF 20-23 provides an excellent balance. The original AVI files were likely encoded with older codecs at moderate bitrates, so modern H.264 at CRF 20 will often produce a smaller file with equal or better visual quality.
Pro Tip: Many old AVI files from the DivX/Xvid era were encoded at relatively low bitrates (700 MB for a full movie was standard). Converting these to H.264 at CRF 18-20 will actually produce better quality than the original in many cases, because H.264 is dramatically more efficient than the old MPEG-4 ASP codec.
Handling Audio in AVI Files
AVI files often contain audio in formats that are not standard in MP4 containers. Here is how to handle common scenarios:
MP3 Audio in AVI
MP3 audio can be carried in MP4, but AAC is the standard. Re-encoding to AAC ensures compatibility:
ffmpeg -i input.avi -c:v libx264 -crf 20 \
-c:a aac -b:a 192k output.mp4
AC3/DTS Audio in AVI
Some AVI files (especially rips from DVDs) contain AC3 or DTS audio:
# Convert to AAC for maximum compatibility
ffmpeg -i input.avi -c:v libx264 -crf 20 \
-c:a aac -b:a 256k output.mp4
# Or keep AC3 if your player supports it
ffmpeg -i input.avi -c:v libx264 -crf 20 \
-c:a copy output.mp4
PCM (Uncompressed) Audio in AVI
Screen recordings and camcorder footage often have PCM audio, which is uncompressed and very large:
ffmpeg -i input.avi -c:v libx264 -crf 20 \
-c:a aac -b:a 192k output.mp4
Converting PCM to AAC dramatically reduces the audio track size (from ~10 MB/minute to ~1.5 MB/minute at 192 kbps) with negligible quality loss for spoken word and most music content. For more on audio formats, check our guide on FLAC vs MP3.
Batch Converting AVI Files to MP4
If you have a collection of AVI files, batch conversion saves time and effort.
FFmpeg Batch Script (Linux/macOS)
#!/bin/bash
# Convert all AVI files in current directory to MP4
mkdir -p converted
for file in *.avi; do
[ -f "$file" ] || continue
output="converted/${file%.avi}.mp4"
echo "Converting: $file"
ffmpeg -i "$file" -c:v libx264 -crf 20 -preset medium \
-c:a aac -b:a 192k -movflags +faststart "$output" -y
echo "Done: $output"
done
echo "All files converted!"
FFmpeg Batch Script (Windows PowerShell)
# Convert all AVI files to MP4
New-Item -ItemType Directory -Force -Path "converted"
Get-ChildItem -Filter "*.avi" | ForEach-Object {
$output = "converted\$($_.BaseName).mp4"
ffmpeg -i $_.FullName -c:v libx264 -crf 20 -preset medium `
-c:a aac -b:a 192k -movflags +faststart $output -y
}
For online batch conversion without installing FFmpeg, our platform supports processing multiple files simultaneously. See our batch processing guide for detailed instructions.

Converting AVI to MP4 on Different Platforms
macOS
macOS does not natively play most AVI files. Your options:
- Online converter: Use the MP4 Converter from Safari or Chrome
- FFmpeg via Homebrew:
brew install ffmpegthen use the commands above - QuickTime Player: Supports some AVI codecs; File > Export As > 1080p
Windows
Windows Media Player can play most AVI files but cannot convert them. Options:
- Online converter: Use the Video Converter from any browser
- FFmpeg: Download from ffmpeg.org and use from Command Prompt or PowerShell
- VLC: Media > Convert/Save, but with limited quality options
Linux
Linux handles AVI well through FFmpeg and VLC, both available in most package managers:
# Install FFmpeg on Ubuntu/Debian
sudo apt install ffmpeg
# Install FFmpeg on Fedora
sudo dnf install ffmpeg
Mobile Devices
Phones and tablets typically cannot play AVI files at all. Use the online MP4 Converter from your mobile browser to convert AVI files stored in cloud services or transferred from your computer.
Converting Old DivX/Xvid AVI Files
A massive number of AVI files in the wild are encoded with DivX or Xvid codecs from the early 2000s. These files have specific characteristics that affect conversion:
- Typically 480p or 576p resolution (DVD-era standard)
- Interlaced content from DVD sources
- Low bitrates (700-1400 kbps was standard)
- Variable frame rate in some cases
Handling Interlaced AVI Content
If the source is interlaced (common with DVD rips), deinterlace during conversion:
ffmpeg -i interlaced.avi -vf "yadif=1" \
-c:v libx264 -crf 20 -preset slow \
-c:a aac -b:a 192k output.mp4
The yadif filter (Yet Another De-Interlacing Filter) produces clean progressive output from interlaced sources.
Upscaling Old AVI Files
While you cannot add detail that was not there, scaling old 480p AVI files to 720p can improve the viewing experience on modern displays:
ffmpeg -i old_video.avi -vf "scale=1280:720:flags=lanczos" \
-c:v libx264 -crf 20 -preset slow \
-c:a aac -b:a 192k upscaled.mp4
Preserving Subtitles During Conversion
AVI files often have subtitles in separate SRT files. You can embed them during conversion:
# Embed SRT subtitles as a soft subtitle track
ffmpeg -i input.avi -i subtitles.srt \
-c:v libx264 -crf 20 -c:a aac -b:a 192k \
-c:s mov_text output.mp4
# Or burn subtitles into the video (hardcoded)
ffmpeg -i input.avi -vf "subtitles=subtitles.srt" \
-c:v libx264 -crf 20 -c:a aac -b:a 192k output.mp4
Conversion Time Estimates
| File Duration | Resolution | CRF 20 / Slow | CRF 23 / Medium | CRF 23 / Fast |
|---|---|---|---|---|
| 5 minutes | 480p | ~1 minute | ~30 seconds | ~15 seconds |
| 5 minutes | 720p | ~3 minutes | ~1.5 minutes | ~45 seconds |
| 5 minutes | 1080p | ~8 minutes | ~4 minutes | ~2 minutes |
| 1 hour | 480p | ~12 minutes | ~6 minutes | ~3 minutes |
| 1 hour | 720p | ~30 minutes | ~15 minutes | ~8 minutes |
| 1 hour | 1080p | ~90 minutes | ~45 minutes | ~20 minutes |
These times assume a modern mid-range CPU (4-8 cores). Hardware encoding reduces these times by 3-5x.
Frequently Asked Questions
Will I lose quality converting AVI to MP4?
Some quality loss is inherent in any re-encoding, but with proper settings (CRF 18-20), the difference is imperceptible to the human eye. In many cases, the superior efficiency of H.264 means the MP4 will look as good or better than the AVI original at a smaller file size.
Can I convert AVI to MP4 without re-encoding?
Only if the AVI contains H.264 video and AAC audio (which is rare). In most cases, re-encoding is required because the video codec inside the AVI is not compatible with the MP4 container.
How much smaller will the MP4 be?
It depends on the source codec and your settings, but typical results show 30-60% file size reduction. An AVI file with DivX video at 1.5 Mbps often converts to a smaller H.264 MP4 at the same visual quality because H.264 is roughly twice as efficient.
Is there a size limit for online conversion?
The MP4 Converter supports files up to 500 MB on free accounts, with higher limits for premium users. For very large files, FFmpeg on your local machine has no size limits.
Should I use H.264 or H.265 for the conversion?
For maximum compatibility, use H.264. For smaller files and you know the target devices support it, use H.265. See our format comparison guide for detailed recommendations.
Conclusion
Converting AVI to MP4 is one of the most common video format migrations, and for good reason: MP4 is the universal format that works everywhere while AVI is a legacy format with limited modern support. Whether you choose the quick online approach with the MP4 Converter, the powerful command-line method with FFmpeg, or batch processing for large collections, the process is straightforward.
The key is choosing the right quality settings for your use case. Start with CRF 20 for high quality, adjust up for smaller files or down for master copies, and use the -movflags +faststart flag for web compatibility.
For related conversions, check our guides on how to convert MOV to MP4, how to convert MKV to MP4, and our comprehensive video codecs guide. Use the Video Converter for an all-in-one online solution or the Video Compressor to further reduce your MP4 file sizes.



