Convert MTS to WebM — Free Online Tool

Convert AVCHD camcorder footage (.mts) to WebM using VP9 video and Opus audio — producing an open, royalty-free format optimized for HTML5 web playback. This conversion re-encodes the H.264 video stream and AC-3/AAC audio from the MPEG-2 Transport Stream container into a Matroska-based WebM file ready for direct embedding in modern browsers.

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 — a broadcast-oriented format designed for reliability during transmission, not web delivery. The video is encoded in H.264 and the audio in AC-3 or AAC. During this conversion, FFmpeg fully re-encodes the H.264 video using the VP9 codec (libvpx-vp9), which is the only video codec WebM supports, and transcodes the audio to Opus (libopus), WebM's preferred audio codec offering better compression than AAC at the same bitrate. The MPEG-2 Transport Stream wrapper is discarded entirely and replaced with the Matroska-derived WebM container. Because VP9 encoding is computationally intensive, this is a slower conversion than a simple remux — expect longer processing times for high-resolution camcorder footage.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg command-line tool, which handles all decoding, re-encoding, and container remuxing. In the browser-based version of this tool, FFmpeg runs via WebAssembly (FFmpeg.wasm) without any server involvement.
-i input.mts Specifies the input AVCHD file in MPEG-2 Transport Stream format, as produced by Sony and Panasonic camcorders. FFmpeg automatically detects the H.264 video and AC-3 or AAC audio streams inside the MTS container.
-c:v libvpx-vp9 Re-encodes the H.264 video stream from the MTS file using the VP9 codec — the only video codec permitted in the WebM container. This is a full transcode, not a stream copy, because H.264 is not compatible with WebM.
-c:a libopus Transcodes the AC-3 or AAC audio from the camcorder footage to Opus, WebM's preferred audio codec. Opus delivers better compression than AC-3 at equivalent perceptual quality, particularly at bitrates around 128k.
-crf 33 Sets the Constant Rate Factor for VP9 quality control, where lower values mean higher quality and larger files. A CRF of 33 is a web-optimized default for VP9 — roughly equivalent to a visually clean encode suitable for streaming, balancing file size against the original AVCHD source quality.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second, which is sufficient for high-quality stereo audio from camcorder recordings. Opus at 128k typically matches or exceeds the perceptual quality of the original AC-3 track at higher bitrates.
-b:v 0 Required companion flag for VP9 CRF encoding — setting the target video bitrate to zero tells libvpx-vp9 to operate in pure quality-based (constrained quality) mode and honor the CRF value. Without this flag, VP9 ignores the CRF and uses an internal default bitrate instead.
output.webm Defines the output filename and triggers FFmpeg to use the WebM container format, which wraps the VP9 video and Opus audio streams in an open, royalty-free format natively supported by Chrome, Firefox, and Edge for direct HTML5 playback.

Common Use Cases

  • Embed camcorder footage directly into a website or web app using an HTML5 <video> tag without requiring proprietary plugins or codec licenses
  • Publish AVCHD vacation or event recordings to a self-hosted video platform or CMS that expects royalty-free WebM rather than H.264 MP4
  • Prepare footage from Sony or Panasonic camcorders for upload to platforms or tools that require open-format video (e.g., certain open-source video editors or Wikimedia Commons)
  • Reduce the licensing overhead of distributing H.264 video by converting camcorder clips to VP9/WebM for open-source or educational projects
  • Convert AVCHD footage to WebM for use in a WebRTC or browser-based video application where VP9 is the negotiated codec
  • Archive camcorder recordings in an open, non-proprietary container format that does not depend on MPEG LA patent licensing

Frequently Asked Questions

Yes — this is a lossy-to-lossy transcoding. The H.264 video from your camcorder is decoded and re-encoded using VP9, and AC-3 or AAC audio is re-encoded to Opus. Each generation of lossy encoding introduces some quality loss. However, VP9 at the default CRF 33 produces visually good results for web use, and Opus at 128k typically sounds equivalent to AAC at 192k. If preserving maximum quality is critical, lower the CRF value (e.g., to 24 or lower) at the cost of larger file size.
VP9 (libvpx-vp9) is significantly more computationally demanding than H.264, and AVCHD footage from camcorders is often 1080p or even 4K, compounding the processing time. Unlike converting between containers that share a codec (which allows stream copying), this conversion requires full decoding of the H.264 stream and re-encoding to VP9. You can add '-deadline realtime' or '-cpu-used 4' to the FFmpeg command to speed up encoding at the cost of compression efficiency.
No — WebM only supports Opus and Vorbis audio codecs, so AC-3 (Dolby Digital) audio commonly found in MTS files cannot be copied directly into a WebM container. FFmpeg automatically transcodes it to Opus during this conversion. Opus is a modern, high-efficiency codec that generally outperforms AC-3 at the same bitrate for stereo content, though surround sound from multi-channel AC-3 tracks will be downmixed to stereo by default unless you specify additional channel mapping flags.
Adjust the '-crf' value in the command. For VP9 in WebM, CRF ranges from 0 (best quality) to 63 (lowest quality), with 33 as a reasonable default for web video. Lowering the CRF — for example, using '-crf 24' — will produce higher-quality output but a larger file. The '-b:v 0' flag must remain in the command alongside '-crf' to keep VP9 in constrained quality mode rather than target-bitrate mode; removing it will cause VP9 to ignore the CRF setting.
Subtitles embedded in the MTS file can be extracted and included in WebM, which supports subtitle tracks via WebVTT. However, MTS files from consumer camcorders rarely contain subtitle streams. Chapters are not supported in MTS at all, but WebM (via its Matroska foundation) does support chapters — so if you are adding chapters manually, WebM is a capable target format. The default FFmpeg command shown here does not explicitly map subtitle tracks; add '-c:s webvtt' and '-map 0:s' if you need to carry subtitles.
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 libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "${f%.mts}.webm"; done'. On Windows Command Prompt, use: 'for %f in (*.mts) do ffmpeg -i "%f" -c:v libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "%~nf.webm"'. Note that VP9 encoding is CPU-intensive, so batch processing large AVCHD clips will take considerable time.

Technical Notes

AVCHD MTS files use a broadcast-grade MPEG-2 Transport Stream wrapper that includes error-correction overhead and non-sequential packet ordering not needed for file-based storage — making them bulky and incompatible with direct web playback. Converting to WebM replaces this with a clean Matroska-derived container and swaps H.264 for VP9, which typically achieves the same visual quality at 30–50% lower bitrate, resulting in smaller files well-suited for web delivery. The '-b:v 0' flag is mandatory for VP9 quality-based encoding; without it, libvpx-vp9 defaults to a very low target bitrate that ignores the CRF. Opus audio in WebM has excellent low-latency streaming characteristics and outperforms AAC and AC-3 at bitrates below 160k, making the 128k default a solid choice for most camcorder audio. One known limitation: MTS files sometimes contain multiple program streams or interlaced video (common in 1080i camcorder output). FFmpeg will select the first detected video stream by default, and interlaced content should be deinterlaced before VP9 encoding using a filter like '-vf yadif' for best quality. Additionally, GPS or camera metadata embedded in proprietary AVCHD extensions will not be preserved in the WebM output.

Related Tools