Convert M2TS to MP4 — Free Online Tool
Convert M2TS Blu-ray and AVCHD footage to MP4 using H.264 and AAC, making high-definition video compatible with virtually any device, platform, or video editor. This tool re-encodes your M2TS stream with the widely supported libx264 codec and adds the faststart flag for immediate web playback.
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 use an MPEG-2 Transport Stream wrapper, commonly carrying H.264 or VC-1 video alongside AC-3, DTS, or LPCM audio tracks — codecs that MP4 players often cannot handle natively. This conversion re-encodes the video stream using libx264 (H.264) at CRF 23, which produces a visually transparent result for most HD content while significantly reducing file size compared to the original Blu-ray bitrate. The audio is transcoded from whatever the source carries (often AC-3 or DTS) to AAC at 128k, the standard choice for MP4 compatibility. The -movflags +faststart flag relocates the MP4 index (moov atom) to the beginning of the file so it can begin playing in a browser or streaming player before the full file has downloaded. Subtitle tracks can be carried through if present, but chapter markers from the Blu-ray structure are not preserved in this conversion.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that handles reading the M2TS container, decoding its video and audio streams, re-encoding them, and writing the output MP4 file. |
-i input.m2ts
|
Specifies the input file — in this case an M2TS file, which is a Blu-ray or AVCHD transport stream container that may carry H.264, VC-1, AC-3, DTS, LPCM, or TrueHD streams inside its 192-byte transport packets. |
-c:v libx264
|
Re-encodes the video stream using the libx264 H.264 encoder, converting whatever video codec the M2TS source uses (commonly H.264 at high Blu-ray bitrates, or VC-1) into a universally compatible H.264 stream suited for MP4 playback on any device. |
-c:a aac
|
Transcodes the audio stream to AAC using FFmpeg's native AAC encoder, replacing the source's Blu-ray audio format — typically AC-3, DTS, or LPCM — with the AAC format that is natively supported by the MP4 container and required for compatibility with iPhones, Android, browsers, and most media players. |
-crf 23
|
Sets the video quality using H.264's Constant Rate Factor at 23, which is the libx264 default and produces a good balance of quality and file size for high-definition M2TS content. Lower values (e.g., 18) increase quality and file size; higher values (e.g., 28) reduce both — the scale runs from 0 (lossless) to 51 (worst). |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second, which is appropriate for stereo audio. Since many M2TS files carry high-bitrate 5.1 surround audio (AC-3 at 640k or DTS at 1.5Mbps), users with surround source audio who want higher fidelity should increase this to 256k or 320k. |
-movflags +faststart
|
Moves the MP4 moov atom (the file's index and metadata block) from the end of the file to the beginning after encoding completes, enabling the output MP4 to begin streaming or playing in a browser before the full file has loaded — essential when sharing or hosting the converted Blu-ray footage online. |
output.mp4
|
Specifies the output file name and tells FFmpeg to write the result in the MP4 (MPEG-4 Part 14) container format, which is determined by the .mp4 extension and is the target format for maximum device and platform compatibility. |
Common Use Cases
- Sharing Blu-ray rips or AVCHD camcorder recordings with friends or family on devices like iPhones, Android phones, and smart TVs that cannot natively play M2TS files
- Uploading HD footage recorded from an AVCHD camcorder to YouTube, Vimeo, or Instagram, which require MP4 or MKV containers rather than M2TS
- Importing Blu-ray or camcorder M2TS clips into video editors like Adobe Premiere, DaVinci Resolve, or iMovie that have inconsistent or no native M2TS support
- Archiving a collection of M2TS recordings to a more universally readable format before long-term storage on a NAS or cloud service
- Preparing HD video content captured from a set-top recorder or satellite receiver in M2TS format for playback on a media server like Plex or Jellyfin
- Converting AVCHD footage from a Sony or Panasonic camcorder into MP4 for embedding on a website or sending via messaging apps with file size limits
Frequently Asked Questions
Yes, some quality loss occurs because the video is re-encoded from the original Blu-ray or AVCHD stream into H.264 using CRF 23, and the audio is transcoded to AAC at 128k. However, M2TS files from Blu-ray often carry video at 25–40 Mbps, and H.264 at CRF 23 is generally considered visually lossless for most content at a fraction of that bitrate. If you want higher fidelity, lower the CRF value (e.g., to 18) in the FFmpeg command — smaller numbers mean better quality and larger file sizes.
The MP4 container and most consumer devices do not natively support AC-3 or DTS audio without licensing, so this tool transcodes the source audio track to AAC, which is universally supported in MP4. AAC at 128k is suitable for stereo content, but if your source has 5.1 surround audio and you need to preserve it, you can increase the bitrate to 256k or 320k in the command with -b:a 256k. Full lossless DTS-HD or Dolby TrueHD tracks cannot be preserved in an MP4 container.
M2TS files can carry subtitle tracks in PGS (Blu-ray bitmap subtitle) format, which is not supported by the MP4 container. This conversion does not map subtitle tracks by default. If your source has text-based subtitles (SRT, SSA), those can potentially be included by adding -c:s mov_text to the FFmpeg command, but PGS subtitles from Blu-ray would need to be converted or omitted. For full subtitle preservation, MKV is typically a better target container.
AVCHD camcorders embed metadata in the M2TS stream and the surrounding folder structure (AVCHD/BDMV), but most of this metadata is not carried through to the output MP4 file during re-encoding. Basic tags that FFmpeg can read from the stream may be copied, but proprietary camcorder metadata such as GPS coordinates, scene detection markers, or shooting mode information is typically lost. If preserving this metadata matters, check the source with ffprobe before conversion and add -map_metadata 0 to the command to copy available global metadata.
The -crf 23 flag controls video quality. CRF (Constant Rate Factor) works on a scale where lower numbers produce better quality and larger files, and higher numbers produce smaller files with more compression artifacts. For Blu-ray source content, CRF 18 is often described as visually lossless. For a smaller file where slight quality loss is acceptable — such as for web sharing — try CRF 28. You can also adjust audio bitrate by changing -b:a 128k to -b:a 192k or -b:a 256k if your source has 5.1 audio you want to encode more faithfully.
Yes. On Linux or macOS, you can run the following in a terminal to convert all M2TS files in a directory: for f in *.m2ts; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.m2ts}.mp4"; done. On Windows with Command Prompt, use: for %f in (*.m2ts) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.mp4". This is especially useful for converting a full AVCHD card dump or a set of recorded Blu-ray segments.
Technical Notes
M2TS is a strict broadcast-grade transport stream format designed for Blu-ray and AVCHD, where the priority is reliable delivery over variable-bandwidth storage — not playback flexibility. The container multiplexes video, multiple audio tracks (often AC-3, DTS, LPCM, or TrueHD), PGS subtitles, and timing information into fixed 192-byte packets. Because of this structure, many software players and editing tools struggle with M2TS files or reject them entirely. Converting to MP4 with H.264 and AAC resolves nearly all compatibility issues at the cost of re-encoding both streams. One important technical consideration is that M2TS files sometimes begin with a timestamp offset (particularly from AVCHD camcorders), which can cause audio sync issues in the output. If you notice sync problems, adding -avoid_negative_ts make_zero to the FFmpeg command can help. The -movflags +faststart flag is critical for web use: without it, the MP4 index sits at the end of the file and the video cannot begin playing until the entire file is downloaded. Multiple audio tracks from the source can be included by adding -map 0:a to the command, but only AAC-compatible audio will play back reliably in standard MP4 players. Files over 1GB — common for long Blu-ray recordings — may be better handled using the displayed FFmpeg command locally rather than through the browser-based tool.