Convert MTS to MKV — Free Online Tool
Convert MTS files from Sony or Panasonic AVCHD camcorders into MKV (Matroska) containers, re-encoding the H.264 video and AC-3/AAC audio into a flexible, open-standard format that preserves subtitles, chapters, and multiple audio tracks. MKV's broad codec support makes it ideal for archiving camcorder footage with full metadata intact.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MTS 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
MTS files use the MPEG-2 Transport Stream container with H.264 video and either AC-3 or AAC audio — a format optimized for broadcast and camcorder recording but not ideal for long-term storage or editing. During this conversion, the H.264 video stream is re-encoded using libx264 at CRF 23 (a visually transparent quality level for most footage), and the audio is encoded to AAC at 128k. Unlike a simple remux, this re-encoding step ensures compatibility across all MKV players and strips the transport stream overhead. The Matroska container also gains the ability to hold chapters, subtitle tracks, and rich metadata that the AVCHD transport stream structure cannot express.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool, which handles demuxing the MPEG-2 Transport Stream from the MTS file, decoding its H.264 and AC-3/AAC streams, re-encoding them, and muxing the result into a Matroska container. |
-i input.mts
|
Specifies the input AVCHD file in MTS format, as recorded by a Sony or Panasonic camcorder. FFmpeg automatically detects the MPEG-2 Transport Stream container and identifies the H.264 video and AC-3 or AAC audio streams inside it. |
-c:v libx264
|
Re-encodes the video stream using the libx264 H.264 encoder. Although the source MTS file already contains H.264, a re-encode is used here to ensure clean compatibility with the MKV container and to apply the CRF quality setting. |
-c:a aac
|
Encodes the audio to AAC using FFmpeg's native AAC encoder. This handles both AC-3 (Dolby Digital) and AAC source audio from the camcorder, producing a universally compatible stereo AAC track in the output MKV. |
-crf 23
|
Sets the Constant Rate Factor for libx264 to 23, which is the default quality level balancing file size and visual fidelity. For camcorder footage, this typically produces output that looks sharp while being 60–75% smaller than the original AVCHD bitrate. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which is sufficient for clear speech, ambient sound, and moderate music content typical in camcorder recordings. Increase to 192k or 256k for recordings with high-quality music or critical audio. |
output.mkv
|
Defines the output file as a Matroska (.mkv) container. FFmpeg infers the container format from the file extension, muxing the re-encoded H.264 video and AAC audio into MKV's flexible structure, which also supports chapters and subtitle tracks not available in the original MTS format. |
Common Use Cases
- Archiving raw AVCHD camcorder footage from Sony Handycam or Panasonic HC-series cameras into a universally playable format for long-term storage
- Preparing family or event video recordings for editing in software like VLC, DaVinci Resolve, or Kdenlive, which handle MKV more reliably than raw MTS files
- Adding chapter markers or subtitle tracks to camcorder footage — features MTS cannot support but MKV handles natively
- Consolidating multi-segment AVCHD clips (which camcorders often split into separate MTS files) into a single MKV file for easier playback and sharing
- Converting vacation or documentary camcorder footage into a format compatible with media servers like Plex or Jellyfin, which may not index MTS files reliably
- Stripping the broadcast transport stream overhead from MTS files to reduce playback compatibility issues on smart TVs, Android devices, and desktop media players
Frequently Asked Questions
There is some quality loss because the H.264 video is re-encoded rather than stream-copied. The default CRF 23 setting produces visually high-quality output that is nearly indistinguishable from the source for typical camcorder footage, but it is not mathematically lossless. If your original MTS file was recorded at a high bitrate (e.g., 24 Mbps AVCHD), the output MKV at CRF 23 will likely be smaller in file size while retaining excellent visual fidelity. If quality is critical, lower the CRF value toward 18 or 15 in the FFmpeg command.
Renaming doesn't work because MTS uses the MPEG-2 Transport Stream container structure, which is fundamentally different from the Matroska container format. The container wraps the audio and video streams in an entirely different way — a renamed file would be unreadable. A proper conversion requires demuxing the streams from the transport stream and re-muxing them into the Matroska structure, which is exactly what this tool does.
The tool re-encodes audio to AAC at 128k stereo by default, which means AC-3 5.1 surround audio tracks from your camcorder will be downmixed and transcoded. If you need to preserve the original AC-3 surround track, you can modify the FFmpeg command to use '-c:a copy' instead of '-c:a aac -b:a 128k', which will stream-copy the original AC-3 audio directly into the MKV container without re-encoding — MKV supports AC-3 natively.
This browser tool processes one file at a time. However, the displayed FFmpeg command can be adapted for batch processing on your desktop. To concatenate multiple MTS segments into a single MKV, use FFmpeg's concat demuxer: create a text file listing your inputs (e.g., 'file 00001.MTS', 'file 00002.MTS') and run 'ffmpeg -f concat -safe 0 -i filelist.txt -c:v libx264 -c:a aac -crf 23 -b:a 128k output.mkv'. This is especially useful for AVCHD cameras that split clips at 2GB or 4GB boundaries.
Change the '-crf 23' value in the command — lower numbers mean higher quality and larger file sizes, while higher numbers reduce quality and file size. For archiving camcorder footage, CRF 18 is often considered visually lossless, while CRF 28 gives smaller files with noticeable compression for casual use. The scale runs from 0 (lossless) to 51 (worst quality). You can also raise the audio bitrate from '128k' to '192k' or '256k' if audio fidelity is important, such as for music-heavy event recordings.
Basic metadata such as creation timestamps is generally carried over during conversion, but camcorder-specific AVCHD metadata — including GPS coordinates embedded in some Sony and Panasonic models — may not survive the re-encoding process, as the MPEG-2 Transport Stream stores such data in proprietary program stream metadata that FFmpeg does not fully map to MKV metadata fields. If preserving this data is essential, consider extracting it with a dedicated AVCHD metadata tool before converting.
Technical Notes
MTS files from AVCHD camcorders use H.264 video profiles specifically tuned for real-time recording, often at High Profile 4.0 or 4.1, and audio in either AC-3 (Dolby Digital) or AAC LC. The MPEG-2 Transport Stream container adds packetization overhead and program-specific tables (PAT/PMT) that are meaningful for broadcast but unnecessary for file-based storage. Converting to MKV with libx264 and AAC eliminates this overhead and produces a file that plays on virtually every modern media player without requiring AVCHD codec packs. The CRF 23 default is appropriate for 1080i or 1080p camcorder footage and typically produces output bitrates of 4–8 Mbps, well below the 17–24 Mbps of native AVCHD recordings, resulting in significantly smaller files. One technical nuance: AVCHD footage is often recorded as 1080i (interlaced), and this conversion does not apply deinterlacing by default — if your source is interlaced, you may want to add '-vf yadif' to the FFmpeg command for progressive output suitable for modern screens. MKV's support for chapters and multiple audio tracks makes it a meaningful upgrade over MTS for archival or distribution use cases.