Convert MP4 to AVI — Free Online Tool
Convert MP4 files to AVI format using H.264 video and MP3 audio encoding, directly in your browser with no uploads required. AVI's legacy container structure makes it a go-to format for older editing software, Windows-based media players, and hardware devices that predate modern container support.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP4 file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
MP4 and AVI are fundamentally different containers with different internal structures. Because AVI uses Microsoft's legacy RIFF-based interleaved format, the MP4's video stream — even if already encoded in H.264 — cannot simply be remuxed; the container framing must be rebuilt for AVI. This tool re-encodes the video using libx264 (H.264) and transcodes the audio from AAC (MP4's default) to MP3 via the LAME encoder, since AAC support inside AVI containers is inconsistent across older players. The result is a fully interleaved AVI file where audio and video frames are stored in alternating chunks, as the format requires. Notably, any subtitle tracks and chapter markers from the original MP4 are dropped, as the AVI container has no standardized support for these features.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles the MP4-to-AVI container conversion and codec transcoding. This tool runs FFmpeg compiled to WebAssembly (FFmpeg.wasm) entirely inside your browser. |
-i input.mp4
|
Specifies the input file as an MP4 container. FFmpeg will detect the internal streams — typically an H.264 video track and an AAC audio track — and use them as the source for the conversion. |
-c:v libx264
|
Re-encodes the video stream using the libx264 encoder, producing H.264 video inside the AVI container. This is necessary because even if the source MP4 already contains H.264, the container framing must be rebuilt from scratch for AVI's RIFF structure. |
-c:a libmp3lame
|
Transcodes the audio from the MP4's AAC track to MP3 using the LAME encoder. MP3 is chosen over AAC because it has far broader compatibility with the legacy players, editing tools, and hardware devices that AVI is typically used with. |
-crf 23
|
Sets the video quality using H.264's Constant Rate Factor at 23, which is libx264's default and a well-balanced starting point. Lower values (e.g., 18) produce higher quality AVI output with larger file sizes; higher values (e.g., 28) reduce file size at the cost of more visible compression in the video. |
-b:a 128k
|
Sets the MP3 audio bitrate to 128 kilobits per second, a standard quality level that balances file size and audio fidelity for voice and general-purpose video content. Increase to 192k or 320k for music-heavy content where audio quality is a priority. |
output.avi
|
Specifies the output filename with the .avi extension, which tells FFmpeg to use the AVI (RIFF) container format. FFmpeg infers the container type from the file extension and writes the interleaved H.264 video and MP3 audio streams into the AVI structure. |
Common Use Cases
- Importing footage into legacy video editing software like older versions of Sony Vegas or Windows Movie Maker that do not recognize MP4 container framing
- Preparing video files for playback on older DVD players, set-top boxes, or portable media devices that only accept AVI with MP3 audio
- Delivering video to industrial or kiosk systems running Windows XP-era software that expects AVI as its media input format
- Archiving MP4 recordings in AVI format for compatibility with long-term storage workflows tied to Windows-native media tools
- Converting MP4 screen recordings or presentations for submission to clients or institutions whose review tools only accept AVI files
- Preparing video content for older surveillance or broadcast systems that require AVI-formatted clips for ingest
Frequently Asked Questions
Yes, some quality loss is unavoidable because the H.264 video stream from the MP4 is re-encoded rather than copied. Both the input and output use lossy H.264 compression, so each encode introduces a small generational quality drop. Using a lower CRF value (closer to 0) in the FFmpeg command will minimize this loss, at the cost of a larger file size. If your source MP4 is already at high quality (CRF 18 or lower), the difference at the default CRF 23 output will typically be imperceptible.
While AAC can technically be placed inside an AVI container, many legacy players, editing tools, and hardware devices do not support AAC-in-AVI and will either play silent audio or refuse to open the file entirely. MP3 via the LAME encoder is the de facto standard for AVI audio and offers near-universal compatibility with the legacy systems AVI is typically used with. The trade-off is that LAME MP3 at 128k is slightly less efficient than AAC at the same bitrate, but the compatibility gain is well worth it for most AVI use cases.
No. The AVI container has no standardized support for subtitle tracks or chapter markers, so both are permanently dropped during conversion. If your MP4 contains embedded subtitles (SRT, ASS, or other formats) or chapter metadata, you should extract them as separate files before converting. For workflows where subtitles are essential, consider whether AVI is actually the right target format for your use case.
AVI's RIFF-based interleaved structure carries more per-frame overhead than MP4's modern container framing, which can add several percent to file size even at identical codec settings. Additionally, MP3 audio at 128k is slightly less space-efficient than AAC at the same bitrate, so the transcoded audio stream may also be marginally larger. If file size is a concern, lowering the audio bitrate to 96k or raising the CRF value slightly in the FFmpeg command can help reduce the output size.
To adjust video quality, change the CRF value: lower numbers (e.g., -crf 18) produce higher quality and larger files, while higher numbers (e.g., -crf 28) produce smaller files with more compression artifacts. For audio, replace -b:a 128k with a higher value like -b:a 192k or -b:a 320k for better MP3 quality, or 96k to reduce file size. A full example for higher quality output would be: ffmpeg -i input.mp4 -c:v libx264 -c:a libmp3lame -crf 18 -b:a 192k output.avi
Yes. On Linux or macOS you can use a shell loop: for f in *.mp4; do ffmpeg -i "$f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "${f%.mp4}.avi"; done. On Windows Command Prompt, use: for %f in (*.mp4) do ffmpeg -i "%f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "%~nf.avi". The browser-based tool processes one file at a time, so the FFmpeg command is the recommended approach for batch jobs or files over 1GB.
Technical Notes
AVI's RIFF container imposes several hard limitations worth understanding before committing to this conversion. The format uses 32-bit file size fields, creating a theoretical 4GB file size ceiling (though OpenDML extensions can push this further in practice). Unlike MP4, AVI has no native support for variable frame rate video — if your source MP4 contains VFR content (common in screen recordings or smartphone footage), the AVI output may exhibit audio sync drift. The H.264 stream produced by libx264 is fully standard and compatible with AVI, but some very old software may expect older codecs like DivX or Xvid (MPEG-4 ASP) rather than H.264; in those cases, substituting -c:v mpeg4 in the command may improve compatibility. The libmp3lame encoder targets CBR at the specified bitrate by default in this command, which is preferable for AVI's fixed interleave structure compared to VBR MP3. Multiple audio tracks are technically supported by the AVI container spec, but support varies widely across players, and this tool outputs a single stereo audio stream. No metadata from the MP4 (title, artist, creation date) is carried over, as AVI's INFO chunk metadata system is not populated by default in FFmpeg.