Convert WebM to M2TS — Free Online Tool

Convert WebM files (VP9 video, Opus audio) to M2TS format using H.264 and AAC — the standard codec pairing for Blu-ray BDAV and AVCHD workflows. Both the VP9 video and Opus audio streams are fully re-encoded during this conversion, making it ideal for archiving web video content into a broadcast-compatible transport stream.

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

WebM uses VP9 for video and Opus for audio, neither of which are natively supported by Blu-ray or AVCHD players. During this conversion, the VP9 video stream is fully decoded and re-encoded to H.264 (libx264) using a CRF of 23, which targets visually transparent quality suitable for high-definition playback. Simultaneously, the Opus audio track is decoded and re-encoded to AAC at 128k bitrate, the standard lossy audio codec for MPEG-2 Transport Stream containers. The output is wrapped in the M2TS container — an MPEG-2 Transport Stream with BDAV formatting — making it compatible with Blu-ray authoring tools, AVCHD camcorder archives, and professional broadcast workflows. Because both streams require full transcoding (not just remuxing), processing time will be longer than a simple container swap.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles the full VP9-to-H.264 and Opus-to-AAC transcoding pipeline used in this WebM-to-M2TS conversion.
-i input.webm Specifies the input WebM file containing a VP9 video stream and an Opus (or Vorbis) audio stream. FFmpeg reads the WebM container and demuxes both streams for transcoding.
-c:v libx264 Re-encodes the VP9 video stream to H.264 using the libx264 encoder — the required video codec for Blu-ray BDAV and AVCHD compatibility. VP9 cannot be copied directly into M2TS for standard device support.
-c:a aac Re-encodes the Opus audio stream to AAC using FFmpeg's native AAC encoder. AAC is the standard audio codec for M2TS in BDAV workflows and replaces Opus, which is not supported by Blu-ray or AVCHD players.
-crf 23 Sets the Constant Rate Factor for the H.264 encode to 23, which is libx264's default and produces visually near-transparent quality for most video content. Lower values (e.g., 18) increase quality and file size; higher values reduce both.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second, a standard bitrate for stereo AAC audio that balances file size and audio fidelity appropriate for Blu-ray and AVCHD delivery.
output.m2ts Defines the output filename with the .m2ts extension, which instructs FFmpeg to wrap the H.264 video and AAC audio into an MPEG-2 Transport Stream container formatted for Blu-ray BDAV (BDAV MPEG-2 TS) compatibility.

Common Use Cases

  • Importing web-sourced WebM video footage into Blu-ray authoring software like Sony Vegas or Adobe Encore, which require H.264/AAC in an M2TS container
  • Archiving HTML5 video content to a Blu-ray disc for long-term physical media storage in a universally readable BDAV format
  • Ingesting WebM recordings from screen capture or web conferencing tools into AVCHD-compatible editing workflows on professional NLE software
  • Converting VP9-encoded WebM downloads to M2TS for playback on Blu-ray players or Sony PlayStation consoles that support AVCHD file structures
  • Preparing web video assets in M2TS format for broadcast ingest pipelines that require MPEG-2 Transport Stream delivery with H.264 video
  • Transcoding WebM video from a web archive or digital preservation project into the standardized M2TS format required by a physical disc authoring specification

Frequently Asked Questions

Yes — this conversion involves lossy transcoding of both streams. The VP9 video is decoded and re-encoded to H.264, and the Opus audio is decoded and re-encoded to AAC. Each re-encode introduces a small amount of generational quality loss. The default CRF 23 for H.264 is considered visually near-transparent for most content, so the degradation is typically not perceptible on typical web video, but it is technically present. If your source WebM was already heavily compressed, the cumulative quality loss may be more noticeable.
While M2TS technically supports VP9 as a video codec in some implementations, Blu-ray BDAV and AVCHD specifications mandate H.264 (or H.265) for hardware compatibility. Blu-ray players, AVCHD devices, and most broadcast ingest tools that consume M2TS will not recognize a VP9 stream inside the container. Re-encoding to H.264 ensures maximum device compatibility, which is the primary reason for converting to M2TS in the first place.
No. M2TS (BDAV MPEG-2 Transport Stream) does not support embedded chapters in the same way that WebM or MKV containers do. If your source WebM file contains chapter markers, they will be lost during this conversion. Blu-ray chapter information is managed externally through BDMV disc structure files (index.bdmv, MovieObject.bdmv), not embedded in the M2TS stream itself.
Transparency is lost. WebM supports VP9 with an alpha channel for transparent video overlays, but M2TS has no support for video transparency. The H.264 codec used in M2TS does not carry alpha channel data, so the transparent areas in your WebM video will be rendered as a solid color (typically black) in the output M2TS file. If transparency is critical, M2TS is not an appropriate target format.
Change the CRF value in the command to control H.264 output quality. Lower CRF values produce higher quality at larger file sizes — for example, replacing '-crf 23' with '-crf 18' will produce noticeably sharper video closer to the visual quality ceiling of H.264. The valid range for libx264 is 0 (lossless) to 51 (worst quality). For Blu-ray-targeted M2TS content, values between 15 and 23 are typical. You can also increase audio quality by changing '-b:a 128k' to '-b:a 192k' or '-b:a 256k' for higher-fidelity AAC output.
Yes. On Linux or macOS, you can use a shell loop: 'for f in *.webm; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.webm}.m2ts"; done'. On Windows Command Prompt, use: 'for %f in (*.webm) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.m2ts"'. This is particularly useful for files over 1GB that exceed the browser tool's processing capacity, since the FFmpeg command runs natively on your desktop without size restrictions.

Technical Notes

The WebM-to-M2TS conversion is a full transcode of both video and audio streams — there is no stream copying possible here because the codec sets are incompatible with Blu-ray/AVCHD requirements. The libx264 encoder with CRF 23 produces H.264 High Profile output, which is broadly compatible with Blu-ray players and AVCHD editing tools. For strict Blu-ray Disc specification compliance, H.264 must be encoded at specific levels (typically Level 4.1 for 1080p) — you can enforce this by adding '-level 4.1' and '-profile:v high' to the command if authoring for physical disc. The AAC audio codec in M2TS is compatible with the BDAV specification. Note that M2TS does not support chapters (lost from WebM source), but it does retain multiple audio tracks and subtitle streams if present. WebM's HDR metadata (if encoded in the VP9 stream using VP9 Profile 2) will not automatically transfer to the H.264 output without explicit tone-mapping flags, so HDR source WebM files may appear washed out or incorrectly graded without additional processing. File sizes will vary significantly from the source — VP9 is generally more efficient than H.264 at equivalent visual quality, so M2TS output files are often 20–40% larger than the WebM source at CRF 23.

Related Tools