Convert MTS to AVI — Free Online Tool

Convert MTS files from Sony or Panasonic AVCHD camcorders to AVI, re-encoding the H.264 video with libx264 and transcoding the AC-3 or AAC audio to MP3 using LAME. The result is a widely compatible AVI file suited for legacy editing software and media players that don't support AVCHD.

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

MTS files use the MPEG-2 Transport Stream container with H.264 video and either AC-3 or AAC audio — a format designed for broadcast and camcorder recording that many older applications cannot open directly. During this conversion, FFmpeg demuxes the transport stream, decodes the H.264 video, and re-encodes it into a new H.264 stream wrapped in an AVI container using the libx264 encoder. The audio track (whether AC-3 or AAC from the camcorder) is decoded and re-encoded as MP3 using the LAME encoder, since AVI's audio codec support is limited compared to modern containers. The output is an interleaved AVI file where audio and video frames are multiplexed in sequence, which is the defining characteristic of the AVI format. Because both the video and audio are re-encoded, this is a full transcode — not a remux — so some generation loss occurs and processing takes longer than a simple container swap would.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary, which is the core multimedia processing engine. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), meaning your MTS file never leaves your device.
-i input.mts Specifies the input file — your AVCHD camcorder recording in MTS format. FFmpeg will demux the MPEG-2 Transport Stream and identify the H.264 video and AC-3 or AAC audio elementary streams inside it.
-c:v libx264 Sets the video encoder to libx264, re-encoding the H.264 video from the transport stream into a new H.264 stream suitable for the AVI container. This is a full re-encode, not a copy, so the CRF quality setting applies.
-c:a libmp3lame Uses the LAME MP3 encoder to transcode the camcorder's original AC-3 or AAC audio into MP3, which is the most broadly compatible audio format for AVI playback across legacy software and hardware devices.
-crf 23 Sets the Constant Rate Factor for the libx264 video encode to 23, the standard default balancing quality and file size. Lower values like 18 yield better quality and larger files; higher values like 28 yield smaller files with more visible compression in camcorder footage.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second, which provides acceptable stereo audio quality for typical camcorder recordings. Increase to 192k or 320k if the original AC-3 track was high-quality surround sound that you want to preserve more faithfully.
output.avi Defines the output filename and tells FFmpeg to use the AVI container format based on the .avi extension. The resulting file will interleave the re-encoded H.264 video and MP3 audio in the legacy Audio Video Interleave structure.

Common Use Cases

  • Importing AVCHD camcorder footage into older video editing software like Adobe Premiere Pro CS3 or Windows Movie Maker that cannot natively handle MTS or transport stream files.
  • Archiving camcorder footage in AVI format for playback on legacy Windows media centers, dedicated DVD players, or older smart TVs with USB media playback that only support AVI with MP3 audio.
  • Preparing raw camcorder recordings for hand-off to clients or colleagues who use older post-production pipelines built around AVI-based workflows.
  • Converting Sony or Panasonic camcorder clips for use in software that expects standard AVI input, such as certain scientific image analysis tools or industrial machine vision applications.
  • Stripping the AVCHD transport stream wrapper from footage before importing into slideshow or presentation software that recognizes AVI but not MTS.
  • Batch-converting a card full of AVCHD clips from a family event into AVI files for long-term storage on a NAS device configured to serve media to AVI-compatible players.

Frequently Asked Questions

Yes, some quality loss is unavoidable. The H.264 video from your camcorder is decoded and then re-encoded by libx264, which introduces generation loss even at the default CRF 23 setting. If you need to preserve maximum quality, lower the CRF value — for example, use -crf 18 for near-visually-lossless output, at the cost of a significantly larger file. The audio is also transcoded from AC-3 or AAC to MP3, which adds a second lossy step.
MTS files from AVCHD camcorders typically use a variable bitrate tuned for efficient recording to flash memory, whereas the output AVI file's size depends on the CRF value used during re-encoding. At CRF 23, the output is often similar in size to the source, but complex high-motion footage may result in a larger file while simpler scenes may produce a smaller one. Additionally, the AVI container uses interleaving that can add minor overhead compared to the MPEG-2 Transport Stream structure.
While AVI technically has limited AC-3 support in some implementations, it is not reliably or widely supported in AVI players and editors. This is why the conversion transcodes the audio to MP3 using LAME instead — MP3 in AVI is the most universally compatible audio combination for this container format, ensuring the file plays correctly across legacy software and hardware devices.
Most camcorder-specific metadata embedded in the AVCHD transport stream — such as shooting date and time, GPS coordinates, or scene information stored in MTS companion files — will not be transferred to the AVI output. AVI has very limited metadata support compared to modern containers, and FFmpeg does not map AVCHD-specific metadata fields to AVI tags during this transcode. If metadata preservation is important, consider converting to MKV or MP4 instead.
To adjust video quality, change the -crf value: lower numbers like 18 produce higher quality and larger files, while higher numbers like 28 produce smaller files with more compression artifacts. CRF 0 is mathematically lossless for x264. To adjust audio quality, change the -b:a value — for example, use -b:a 192k or -b:a 320k for higher-quality MP3 audio from your camcorder's original AC-3 or AAC track. The command would then look like: ffmpeg -i input.mts -c:v libx264 -c:a libmp3lame -crf 18 -b:a 192k output.avi
Yes. On Linux or macOS, you can loop over all MTS files in a directory with: for f in *.mts; do ffmpeg -i "$f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "${f%.mts}.avi"; done. On Windows Command Prompt, use: for %f in (*.mts) do ffmpeg -i "%f" -c:v libx264 -c:a libmp3lame -crf 23 -b:a 128k "%~nf.avi". This is especially useful when offloading an entire AVCHD memory card for conversion.

Technical Notes

AVCHD MTS files store H.264 video in a packetized MPEG-2 Transport Stream, which includes program-specific tables, PTS/DTS timestamps, and often multiple program streams — all of which are discarded during demuxing before the video is re-encoded into AVI. The AVI container uses the OpenDML extension (AVI 2.0) for files over 2GB, which FFmpeg handles automatically, though compatibility with very old AVI parsers may be reduced for large files. AVI does not support B-frame reordering metadata in the same way modern containers do, but libx264's output is generally compatible with standard AVI players. The format does not support subtitles, chapters, or embedded thumbnail tracks that some AVCHD camcorders write. Multiple audio tracks from the MTS file — for example, a secondary microphone channel — will not all be preserved by default; only the first audio stream is mapped. If you need to retain a second audio track, add -map 0:a:1 explicitly to the FFmpeg command. AVI also lacks the container-level streaming optimizations of the MPEG-2 Transport Stream, so the output is better suited for local playback than live streaming scenarios.

Related Tools