Convert MKV to M2TS — Free Online Tool

Convert MKV files to M2TS format — the BDAV MPEG-2 Transport Stream container used by Blu-ray discs and AVCHD camcorders — directly in your browser. This tool re-encodes video using H.264 (libx264) and audio using AAC, producing an M2TS file compatible with Blu-ray authoring workflows and high-definition broadcast pipelines.

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 and M2TS are fundamentally different container architectures. MKV is a flexible, open-container format that can wrap nearly any codec combination including codecs like VP9 or FLAC that M2TS does not natively support in Blu-ray contexts. M2TS uses an MPEG-2 Transport Stream multiplexing layer specifically designed for Blu-ray and broadcast delivery. Because of this, the conversion is a full transcode rather than a simple remux: the video stream is re-encoded to H.264 using libx264 with a CRF of 23, and the audio is encoded to AAC at 128k bitrate. One important structural difference is that MKV supports chapter markers but M2TS does not — chapter data from your source file will be discarded during conversion. Multiple audio tracks and subtitles are preserved where supported. The resulting file uses the .m2ts extension and transport stream packet structure expected by Blu-ray players and AVCHD-aware software.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program. In the browser-based version of this tool, FFmpeg runs via WebAssembly (FFmpeg.wasm) entirely within your browser — no data is sent to a server. When running locally, this calls your system-installed FFmpeg binary.
-i input.mkv Specifies the input Matroska file. FFmpeg reads the MKV container and demuxes its video, audio, subtitle, and metadata streams for processing. The MKV format's flexibility means the input could contain a wide variety of codec combinations, all of which will be handled by the subsequent encoding flags.
-c:v libx264 Re-encodes the video stream using the libx264 H.264 encoder, which is the standard video codec for BDAV/M2TS content used on Blu-ray discs and AVCHD camcorders. Any source video codec in the MKV — including H.265, VP9, or MJPEG — will be transcoded to H.264 for M2TS compatibility.
-c:a aac Encodes all audio streams to AAC using FFmpeg's built-in AAC encoder. AAC is the default audio format for this M2TS output and is compatible with AVCHD players and most Blu-ray authoring software, replacing whatever audio codec was present in the source MKV (which could have been Opus, Vorbis, FLAC, or MP3).
-crf 23 Sets the Constant Rate Factor for the libx264 video encoder to 23, which is the default balanced quality setting. For M2TS output targeting Blu-ray-quality playback, you may want to lower this to 18 or 15 to increase fidelity, as Blu-ray content typically targets higher bitrates than web video.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second. This is a standard quality level suitable for stereo audio tracks. For multi-channel or high-fidelity audio in a Blu-ray authoring context, consider increasing this to 192k or 256k by modifying this flag when running the command locally.
output.m2ts Specifies the output filename with the .m2ts extension, which tells FFmpeg to wrap the encoded H.264 video and AAC audio into an MPEG-2 Transport Stream container using the BDAV 192-byte packet structure expected by Blu-ray players and AVCHD-compatible devices.

Common Use Cases

  • Preparing MKV video files for import into Blu-ray authoring software such as Sony DVD Architect or Tmpgenc Authoring Works, which require M2TS-wrapped H.264 streams
  • Converting MKV recordings from desktop capture tools into M2TS format for ingestion into broadcast or professional NLE workflows that mandate Transport Stream containers
  • Transferring MKV content to AVCHD-compatible camcorder folder structures for playback on Sony or Panasonic camcorders and Blu-ray players that read AVCHD from SD cards
  • Archiving H.264 video in M2TS format to match the native container structure of footage recorded directly from Blu-ray camcorders, ensuring consistent file organization
  • Converting MKV files with multiple audio tracks — such as a film with commentary and original audio — into M2TS while retaining the multi-track structure for Blu-ray disc projects
  • Getting a Blu-ray-compatible H.264/AAC transport stream from an MKV source file when downstream tools reject MKV input but accept standard M2TS delivery

Frequently Asked Questions

No — chapter markers will be lost. M2TS, as a BDAV Transport Stream container, does not support embedded chapter data the way MKV does. If chapters are important to your project, you will need to re-define them inside your Blu-ray authoring application after importing the converted M2TS file. This is a structural limitation of the M2TS format itself, not a limitation of this tool.
This conversion re-encodes the video, so it is not lossless — there will be a generation loss compared to the original. The default CRF value of 23 with libx264 produces visually high-quality output that is indistinguishable from the source for most content, but pixel-perfect lossless preservation is not possible through this path. If your source MKV already contains H.264 video, the re-encoding introduces a second compression pass. For archival-quality work you can lower the CRF value (toward 0) to improve quality at the cost of a larger file.
Both VP9 and Opus are unsupported in the M2TS/BDAV format context. The VP9 video stream will be fully re-encoded to H.264 using libx264, and any Opus audio will be transcoded to AAC. This means files originating from WebM-style MKV sources with VP9/Opus will undergo complete audio and video transcoding, which takes longer and changes the compression characteristics of both streams.
Yes — M2TS supports multiple audio tracks, and FFmpeg will map them by default if they are present in the source MKV. Each audio track will be transcoded to AAC at 128k. If you are running this conversion locally using the displayed FFmpeg command and need explicit control over which tracks are included, you can add `-map 0:v -map 0:a` flags to include all video and audio streams, or specify individual stream indices like `-map 0:a:0 -map 0:a:1`.
To change video quality, modify the `-crf` value: lower numbers (e.g., `10` or `15`) produce higher quality and larger files, while higher numbers (e.g., `28` or `35`) produce smaller files with more compression. The usable range for libx264 is 0 (lossless) to 51 (worst quality). To change audio bitrate, replace `128k` in `-b:a 128k` with a higher value like `192k` or `320k` for better fidelity, or `96k` to reduce file size.
Yes, with a small shell script. On Linux or macOS, run: `for f in *.mkv; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mkv}.m2ts"; done`. On Windows Command Prompt, use: `for %f in (*.mkv) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.m2ts"`. The browser-based tool processes one file at a time, so the FFmpeg command is the recommended approach for batch jobs.

Technical Notes

M2TS uses MPEG-2 Transport Stream (TS) packet multiplexing with 192-byte packets (standard TS uses 188-byte packets; the extra 4 bytes carry a Blu-ray timecode). This structure makes M2TS well-suited to streaming and random-access playback on Blu-ray hardware but imposes strict codec constraints compared to MKV's open-ended design. The libx264 encoder used here produces a High Profile H.264 stream which is the standard for BDAV content. AAC audio is widely accepted in AVCHD players, though some strict Blu-ray disc authoring tools may require AC-3 (Dolby Digital) or DTS audio — if your authoring workflow demands those codecs, you would need to modify the `-c:a` flag accordingly when running FFmpeg locally. Subtitle streams from the source MKV can be included in M2TS output, but only in formats compatible with Transport Stream delivery; complex ASS/SSA subtitle formatting from MKV sources may not render correctly and may require conversion to PGS or DVB subtitle format. File size will vary significantly depending on the complexity of the source content and the CRF setting used — a CRF of 23 on typical HD content generally produces files in the 3–8 Mbps video bitrate range.

Related Tools