Convert MKV to AVI — Free Online Tool

Convert MKV files to AVI format using H.264 video and MP3 audio — the classic codec pairing that maximizes compatibility with legacy media players, older smart TVs, and hardware devices that predate modern container support. Because AVI cannot carry the subtitle tracks, chapters, or multiple audio streams that MKV is known for, this tool re-encodes only the primary video and audio streams into a clean, self-contained AVI file.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

MKV is a flexible container that can hold virtually any codec alongside subtitles, chapters, and multiple audio tracks. AVI is a much older, rigid container that supports only a narrow codec set and no subtitle or chapter data. This conversion re-encodes the MKV's video stream using the libx264 H.264 encoder and transcodes the audio — whether it was AAC, Opus, Vorbis, FLAC, or MP3 in the source — into MP3 using the LAME encoder. Both re-encoding steps involve some quality loss, controlled by the CRF value for video and the bitrate setting for audio. Crucially, any subtitle tracks, chapter markers, and secondary audio tracks embedded in the MKV are discarded, because the AVI container has no mechanism to store them.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all the decoding, re-encoding, and container remuxing in this conversion. In the browser version, this runs as a WebAssembly build (FFmpeg.wasm) with no server involvement.
-i input.mkv Specifies the input file as a Matroska (.mkv) container. FFmpeg will probe this file to detect all contained streams — video, audio, subtitles, chapters, and attachments — before applying the output options.
-c:v libx264 Re-encodes the video stream using the libx264 H.264 encoder, which is the most widely supported video codec for AVI playback on legacy devices and software. Any video codec present in the source MKV (H.265, VP9, etc.) will be transcoded to H.264.
-c:a libmp3lame Transcodes the audio stream to MP3 using the LAME encoder, regardless of what audio codec was in the source MKV (AAC, Opus, FLAC, Vorbis, etc.). MP3 is chosen because it offers the broadest compatibility among AVI-capable legacy players and hardware devices.
-crf 23 Sets the Constant Rate Factor for H.264 video quality at 23, the libx264 default. This is a perceptually-based quality target where lower values (e.g., 18) preserve more detail at the cost of a larger AVI file, and higher values (e.g., 28) compress more aggressively with visible quality reduction.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second, which provides acceptable stereo audio quality for most content. Increase to 192k or 320k in the command for higher-fidelity audio, particularly for music-heavy content where compression artifacts are more noticeable.
output.avi Defines the output file as an AVI container. FFmpeg infers the AVI format from the .avi extension and will interleave the H.264 video and MP3 audio streams into the RIFF-based AVI structure, discarding all MKV-specific data such as subtitles, chapters, and metadata attachments.

Common Use Cases

  • Playing a downloaded MKV movie on an older DVD player or Blu-ray player that has a USB port but only recognizes AVI files with MP3 audio
  • Importing footage into legacy video editing software from the early 2000s (such as older versions of Windows Movie Maker or early Premiere versions) that cannot open MKV containers
  • Sharing a video clip with someone whose media player or set-top box shows a blank screen or audio-only playback when given an MKV file
  • Archiving a video in AVI format for a client or institution whose digital asset management system has a strict AVI-only ingest requirement
  • Stripping away complex MKV metadata, multiple audio tracks, and embedded subtitles to produce a simple, single-stream video file for a kiosk or point-of-sale display system
  • Getting the FFmpeg command to batch-convert a large library of MKV recordings to AVI on a desktop machine where files exceed the 1GB browser limit

Frequently Asked Questions

Yes, all subtitle tracks will be permanently lost in the conversion. The AVI container format simply has no specification for storing subtitle data — unlike MKV, which was designed from the ground up to support SSA, SRT, PGS, and other subtitle formats. If you need to preserve subtitles, consider converting to MP4 or keeping the MKV. As a workaround, you can burn subtitles directly into the video image before converting, though that requires a separate FFmpeg step using the 'subtitles' or 'ass' video filter.
Only the first (default) audio track from the MKV will be transcoded into the AVI output. While AVI technically supports multiple audio streams, the standard FFmpeg command targets the primary audio stream by default, and most AVI-compatible players expect only one. If you need a specific non-default audio track, you can modify the command with '-map 0:v:0 -map 0:a:1' to select the second audio track before running it locally.
If the MKV's video stream is already H.264 (libx264), it is technically possible to stream-copy it into AVI with '-c:v copy' to avoid quality loss and speed up conversion. However, this tool re-encodes by default to ensure compatibility, because MKV files frequently contain H.265 (HEVC), VP9, or AV1 video — codecs that AVI players cannot handle. Re-encoding everything to H.264 guarantees a playable output regardless of what was inside the source MKV.
MP3 is intentionally chosen as the audio codec for AVI output because it is the most universally recognized audio format among the devices and players that actually use AVI files. While AAC is technically supported in AVI and produces better quality at the same bitrate, many legacy DVD players, older smart TVs, and classic media players either refuse to play or produce distorted audio from AVI files with AAC audio. MP3 at 128k is the safest, most compatible choice for this container.
It depends heavily on what codecs were used in the source MKV. If the MKV contained H.265 or VP9 video (which are more efficient than H.264), the AVI output will likely be noticeably larger — sometimes 30–50% bigger — for the same perceived quality, because H.264 at CRF 23 requires more data to represent the same image. If the source MKV already used H.264, the size difference will be smaller but still present due to re-encoding overhead. AVI also lacks the compression efficiency benefits that MKV gains from its modern container structure.
To change video quality, adjust the '-crf' value: lower numbers like 18 produce higher quality and larger files, while higher numbers like 28 produce smaller files with more visible compression. The CRF scale for H.264 runs from 0 (lossless) to 51 (worst quality), with 23 as the default. To change audio quality, replace '128k' in '-b:a 128k' with your preferred bitrate — for example, '-b:a 192k' for better audio fidelity or '-b:a 96k' for a smaller file. For batch-converting a folder of MKV files on your desktop, you can use: 'for f in *.mkv; do ffmpeg -i "$f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "${f%.mkv}.avi"; done' in a Unix shell.

Technical Notes

AVI (Audio Video Interleave), introduced by Microsoft in 1992, is one of the oldest container formats still in common use, and its limitations are significant compared to MKV. AVI stores data in RIFF chunks with strict interleaving requirements, which means it lacks support for variable frame rate video, embedded subtitles, chapter markers, and advanced metadata fields — all of which MKV supports natively. When converting from MKV to AVI, any OpenType fonts, chapter XML, forced subtitle flags, attachment files, and secondary audio streams are silently dropped. The H.264 video encoded by libx264 inside AVI is functionally identical in quality to H.264 inside MKV at the same CRF, but be aware that some very old AVI-reading devices have codec negotiation quirks and may require specific H.264 profiles — if playback fails on a legacy device, try adding '-profile:v baseline -level 3.0' to the command to force a maximally compatible H.264 profile. FLAC or lossless audio in the source MKV will be lossy-transcoded to MP3, which is an irreversible quality reduction; if the source audio is already MP3 in the MKV, it will still be decoded and re-encoded, adding a generation of lossy compression, so consider using '-c:a copy' locally only if you are certain the source audio is already MP3.

Related Tools