Convert M2TS to MKV — Free Online Tool
Convert M2TS (Blu-ray BDAV) files to MKV (Matroska) in your browser, remuxing the video into a flexible open-standard container that preserves subtitles, multiple audio tracks, and chapter markers — features M2TS also supports but that are far less universally playable. Video is re-encoded to H.264 with AAC audio, producing a widely compatible MKV file from your Blu-ray or AVCHD source.
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 wraps its content in an MPEG-2 Transport Stream, a broadcast-oriented container designed for reliable streaming over lossy channels. The video inside is typically H.264 or H.265, and audio is often AC-3, DTS, or TrueHD — codecs that many non-Blu-ray players cannot decode. This tool re-encodes the video stream to H.264 using libx264 with CRF 23 and transcodes the audio to AAC at 128k, then packages everything into an MKV container. MKV supports all the rich metadata that M2TS carries — subtitles, multiple audio tracks, and chapter points — but plays back natively in VLC, Plex, Kodi, and most modern media players without requiring a Blu-ray-aware decoder. The re-encoding step means some generation loss occurs, but CRF 23 with libx264 produces visually excellent results at a significantly smaller file size than the original M2TS.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg media processing engine — in this browser tool, it runs as a WebAssembly (WASM) binary entirely within your browser, with no server involvement. On your desktop, this refers to your locally installed FFmpeg binary. |
-i input.m2ts
|
Specifies the input M2TS file — a Blu-ray BDAV or AVCHD transport stream container. FFmpeg will demux all streams inside (video, audio, and any subtitles or secondary audio tracks) for processing. |
-c:v libx264
|
Re-encodes the video stream using the libx264 H.264 encoder. This is necessary because M2TS video — even if already H.264 — is wrapped in a transport stream bitstream that must be decoded and re-encoded to fit cleanly into MKV's Matroska framing. |
-c:a aac
|
Transcodes the audio to AAC, replacing whatever audio codec the M2TS contains — commonly AC-3, DTS, or TrueHD on Blu-ray sources. AAC is universally supported in MKV playback across VLC, browsers, smart TVs, and mobile devices, unlike the Blu-ray-specific audio formats. |
-crf 23
|
Sets the Constant Rate Factor for libx264 to 23, the default quality level. For HD Blu-ray source material, CRF 23 typically produces a visually clean result at 4–8 Mbps — a substantial reduction from the 20–40 Mbps common in M2TS files — without obvious perceptual degradation. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second. This is adequate for stereo dialogue and music, though it represents a significant step down from lossless Blu-ray audio formats like TrueHD or DTS-HD MA. Increase this to 192k or 256k in the command for better fidelity with multichannel downmixes. |
output.mkv
|
Defines the output filename and tells FFmpeg to use the Matroska container format. MKV is chosen here because it natively supports chapters, multiple audio tracks, and subtitle streams — matching and extending the multi-track capabilities present in the M2TS source. |
Common Use Cases
- Archiving Blu-ray rips from an AVCHD camcorder into MKV files that Plex or Jellyfin can transcode and stream without Blu-ray codec support
- Converting M2TS files captured from a BD-ROM disc to MKV so you can add custom subtitle tracks or edit chapter markers in tools like MKVToolNix
- Making AVCHD footage from a Sony or Panasonic camcorder compatible with video editors that handle MKV but not raw M2TS transport streams
- Reducing the file size of M2TS recordings from a Blu-ray recorder while keeping embedded subtitle tracks intact for foreign-language content
- Preparing Blu-ray video segments for upload or sharing on platforms that accept MKV but reject the BDAV M2TS container
- Converting M2TS files with multiple audio tracks (e.g., director's commentary alongside the main audio) into MKV where all tracks are preserved and easily switchable in media players
Frequently Asked Questions
Yes — MKV has excellent subtitle support and the conversion preserves text-based subtitle streams from the M2TS source. However, M2TS from Blu-ray discs often uses PGS (Presentation Graphic Stream) bitmap subtitles, and these are carried through into the MKV as-is. If your source uses Blu-ray PGS subtitles, they will be embedded in the output MKV and playable in VLC or Kodi, though some players require a renderer that supports the PGS format.
The DTS or AC-3 audio stream will be transcoded to AAC at 128k stereo. M2TS files from Blu-ray discs frequently carry multichannel audio (5.1 or 7.1) in DTS-HD MA or Dolby TrueHD — codecs that require licensed decoders most software players lack. The FFmpeg command here re-encodes that audio to AAC, which is universally compatible but results in a stereo downmix and some quality loss compared to lossless Blu-ray audio. If preserving lossless multichannel audio is critical, consider using the FFmpeg command locally with `-c:a copy` if your player supports the original codec, or switch to FLAC encoding.
Yes, because the video is re-encoded rather than copied — so there is a generation of quality loss. The default CRF 23 with libx264 is a widely accepted balance point that produces visually transparent results for most content at a meaningfully smaller file size than a raw Blu-ray M2TS. If you need closer-to-lossless video quality, lower the CRF value (e.g., CRF 18 or lower) using the quality slider, which will increase file size but preserve more detail from the original H.264 or H.265 video in the M2TS.
Blu-ray M2TS files often contain very high bitrate video (sometimes 40 Mbps or more) and lossless multichannel audio like TrueHD or DTS-HD MA, which together account for enormous file sizes. The conversion re-encodes the video with libx264 at CRF 23, which targets perceptual quality rather than a fixed bitrate and typically achieves excellent results at 4–10 Mbps for HD content. The audio is also compressed from lossless to AAC 128k. Both steps together can reduce a 30GB Blu-ray M2TS to a 3–8GB MKV with minimal perceptible quality difference in normal viewing conditions.
To change video quality, adjust the `-crf` value: lower numbers mean higher quality and larger files (CRF 18 is near-visually-lossless for H.264), while higher numbers compress more aggressively (CRF 28+ is noticeably lossy). To change audio bitrate, replace `128k` in `-b:a 128k` with a higher value like `192k` or `320k` for better audio fidelity. For example, a higher-quality version of the command would be: `ffmpeg -i input.m2ts -c:v libx264 -c:a aac -crf 18 -b:a 192k output.mkv`.
Yes — the displayed FFmpeg command is designed to be run locally on your desktop for files over 1GB or batch scenarios. On Linux or macOS, you can loop over all M2TS files in a folder with: `for f in *.m2ts; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.m2ts}.mkv"; done`. On Windows Command Prompt, use: `for %f in (*.m2ts) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.mkv"`. This is especially practical for converting an entire AVCHD card or a folder of Blu-ray rips in one pass.
Technical Notes
M2TS is a transport stream format engineered for error-resilient delivery — it carries redundant PCR timing packets and is structured for broadcast reliability rather than efficient random-access playback. When converting to MKV, this overhead is stripped away, and MKV's Matroska container instead provides precise seek points via its index structure, which is why MKV files often seek faster than their M2TS equivalents. The libx264 encoder at CRF 23 re-encodes the video regardless of whether the source is already H.264, because the transport stream packetization and potentially higher source bitrate need to be normalized. If the source M2TS contains H.265/HEVC video (common on newer AVCHD camcorders and 4K Blu-ray rips), it will be decoded and re-encoded to H.264, which improves compatibility at the cost of slightly larger file size versus H.265 at equivalent quality. MKV fully supports chapter metadata, which M2TS does not carry in a standardized way — so chapter information from a Blu-ray index (BDMV) is generally not present in standalone M2TS files and will not appear in the output. Multiple audio tracks from the M2TS are supported and will be preserved in the MKV output, though all tracks will be transcoded to AAC. The browser-based conversion using FFmpeg.wasm processes files entirely client-side, meaning your Blu-ray footage never leaves your machine.