Convert M2TS to WebM — Free Online Tool
Convert M2TS Blu-ray and AVCHD footage to WebM using VP9 video and Opus audio — ideal for publishing high-definition video content natively in browsers without plugins or proprietary codecs. This tool runs entirely in your browser via WebAssembly, so your footage never leaves your device.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your M2TS 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
M2TS files typically contain H.264 or H.265 video alongside AC-3, DTS, or TrueHD audio — none of which are natively supported in WebM. This conversion fully re-encodes the video stream using the VP9 codec and transcodes the audio to Opus, both of which are royalty-free and natively supported in all modern browsers. Because the container format, video codec, and audio codec all change, this is a full transcode rather than a remux. The VP9 encoder runs in constant-quality mode (CRF 33 with -b:v 0) to maximize efficiency, and the Opus audio encoder at 128k delivers excellent clarity at a smaller bitrate than the AC-3 or DTS streams commonly found in M2TS source files. Subtitle tracks embedded in the M2TS can be carried over to the WebM container, which supports WebVTT-based subtitles.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In the browser-based version, this runs via FFmpeg.wasm compiled to WebAssembly, executing entirely client-side with no server upload. |
-i input.m2ts
|
Specifies the input M2TS file — the Blu-ray or AVCHD container that holds the H.264/H.265 video, high-quality audio (AC-3, DTS, TrueHD, etc.), and any subtitle or chapter data. |
-c:v libvpx-vp9
|
Re-encodes the video stream using the VP9 codec, the only video codec supported by the WebM container. Since M2TS video is typically H.264 or H.265, this is a full transcode — no stream copying is possible. |
-c:a libopus
|
Transcodes the audio to Opus, the modern royalty-free codec required by WebM. This replaces any AC-3, DTS, TrueHD, or other audio codec from the M2TS source, as none of those are compatible with the WebM container. |
-crf 33
|
Sets the VP9 constant rate factor to 33, controlling video quality on a scale where lower values produce higher quality at larger file sizes. CRF 33 is the WebM/VP9 default and delivers good quality for most HD M2TS content; lower it toward 20 for higher fidelity Blu-ray output. |
-b:a 128k
|
Sets the Opus audio output bitrate to 128 kilobits per second. At this bitrate, Opus delivers audio quality that is transparent to most listeners — notably more efficient than the AC-3 or DTS audio commonly found in M2TS source files. |
-b:v 0
|
Disables the video bitrate cap for the VP9 encoder, which is required when using CRF mode. Without this flag, VP9 can inadvertently override the CRF quality target with an internal default bitrate limit, resulting in inconsistent quality across complex M2TS scenes. |
output.webm
|
Defines the output filename and instructs FFmpeg to write the result in the WebM container format — an open, royalty-free format based on Matroska and natively supported in all major browsers for HTML5 video playback. |
Common Use Cases
- Publishing Blu-ray rips or AVCHD camcorder footage directly to a website as HTML5 video without requiring proprietary codec support
- Archiving high-definition home video from a Blu-ray camcorder in an open, royalty-free format that any browser can play without plugins
- Preparing Blu-ray documentary or film content for streaming on a self-hosted platform that relies on browser-native VP9 playback
- Reducing the file size of large M2TS recordings from AVCHD cameras for efficient web delivery while preserving HD quality
- Converting M2TS broadcast captures to WebM for use in WebGL or Canvas-based browser applications that require an open video format
- Creating web-compatible versions of Blu-ray disc video content for embedding in HTML5 presentations or e-learning platforms
Frequently Asked Questions
Yes — this is a lossy transcode in both video and audio. The M2TS source often contains H.264 or H.265 video at high bitrates and lossless or high-quality audio (like TrueHD or DTS-HD), and converting to VP9 and Opus at default settings introduces some generation loss. However, VP9 at CRF 33 is a generous quality setting that preserves excellent visual fidelity for most HD content, and Opus at 128k is transparent for most listeners. If you need the highest possible quality, lower the CRF value toward 20 or below.
The WebM container format only supports VP8, VP9, and AV1 for video — it was specifically designed around royalty-free codecs and does not support H.264 or H.265, which carry patent licensing requirements. This means the video stream from your M2TS must be fully re-encoded into VP9 rather than simply copied, which is why the conversion takes noticeably longer than a remux would.
AC-3, DTS, and TrueHD audio codecs are not supported in the WebM container, so your original audio track will be fully transcoded to Opus at 128k by default. Opus is a highly efficient modern codec and 128k Opus typically sounds better than 192k MP3 or AC-3 at the same bitrate. If your source has multiple audio tracks, FFmpeg will by default select the first or best-ranked track; you can add '-map 0:a:0' or similar flags to the command to select a specific one.
Yes. To improve video quality, lower the CRF value — for example, change '-crf 33' to '-crf 20' for noticeably sharper output at the cost of a larger file. To increase audio bitrate, change '-b:a 128k' to '-b:a 192k' or '-b:a 256k'. Keep the '-b:v 0' flag in place when using CRF mode with VP9, as it tells the encoder to ignore a target bitrate and rely solely on the CRF quality target — removing it can cause unpredictable quality behavior.
Subtitle support depends on the subtitle format embedded in the M2TS. PGS (Blu-ray bitmap subtitles) cannot be carried directly into WebM and would require OCR conversion to a text-based format first. If the M2TS contains text-based subtitle streams, FFmpeg may be able to remap them into the WebM container, which supports WebVTT subtitles. For most Blu-ray M2TS sources, subtitle handling will require additional manual steps beyond the default command.
On Linux or macOS, you can run a shell loop: 'for f in *.m2ts; do ffmpeg -i "$f" -c:v libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "${f%.m2ts}.webm"; done'. On Windows Command Prompt, use: 'for %f in (*.m2ts) do ffmpeg -i "%f" -c:v libvpx-vp9 -c:a libopus -crf 33 -b:a 128k -b:v 0 "%~nf.webm"'. This is particularly useful for processing large Blu-ray or AVCHD collections where individual files exceed the 1GB browser limit.
Technical Notes
M2TS wraps an MPEG-2 Transport Stream and is the native container for Blu-ray discs (BDAV) and AVCHD camcorders. It commonly holds H.264 (AVC) or H.265 (HEVC) video alongside high-quality or lossless audio formats such as Dolby TrueHD, DTS-HD Master Audio, or AC-3, plus PGS bitmap subtitle tracks. None of these audio codecs or the PGS subtitle format are compatible with WebM, making this a mandatory full transcode — no stream can be simply copied. VP9 in CRF mode with '-b:v 0' is the standard approach recommended by Google for variable-bitrate constant-quality encoding; omitting '-b:v 0' can cause VP9 to clamp quality unexpectedly. Opus is the only audio codec in WebM that matches the quality-to-bitrate efficiency needed for HD video workflows — Vorbis is the legacy alternative but Opus is preferred for all new content. One notable limitation: VP9 encoding is significantly slower than H.264 encoding, so long M2TS files from Blu-ray discs will take considerable time to process in-browser. For files over 1GB — common with raw Blu-ray M2TS content — the displayed FFmpeg command can be run locally on a desktop machine where hardware acceleration and multi-threading are available. Metadata such as chapter markers and multiple audio tracks embedded in the M2TS may not automatically transfer without additional FFmpeg mapping flags, and Blu-ray-specific metadata like Blu-ray menus will be discarded entirely.