Convert MP4 to M2TS — Free Online Tool
Convert MP4 files to M2TS (BDAV MPEG-2 Transport Stream) format, the container standard used by Blu-ray discs and AVCHD camcorders. This tool re-encodes your MP4's H.264 video and AAC audio into a transport stream structure optimized for high-definition playback and broadcast-compatible workflows.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP4 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
MP4 and M2TS are structurally very different containers. MP4 uses a box-based (ISO BMFF) structure with a seekable index, while M2TS wraps content in an MPEG-2 Transport Stream — a packetized format designed for reliable transmission and Blu-ray authoring. Because the container architecture is fundamentally different, a simple remux is not sufficient; the streams must be re-wrapped into TS packets with 192-byte packet timing headers specific to BDAV. This tool encodes the video using H.264 (libx264) at CRF 23 and audio using AAC at 128k bitrate, then writes everything into the M2TS transport stream structure. One important difference: M2TS does not support chapter markers, so any chapter metadata present in your MP4 will be dropped during conversion.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), so no file data leaves your device. |
-i input.mp4
|
Specifies the input file — your source MP4 container, which may contain H.264 or H.265 video, AAC or MP3 audio, subtitles, chapters, and multiple audio tracks. |
-c:v libx264
|
Re-encodes the video stream using the H.264 encoder (libx264). This is required because the M2TS transport stream packetization cannot simply copy the video bitstream from the MP4 container — the stream must be re-wrapped with BDAV-compatible TS packet timing. |
-c:a aac
|
Encodes the audio stream using the AAC codec, which is supported in the BDAV M2TS specification. This re-encodes the audio to ensure it is correctly packetized within the transport stream structure. |
-crf 23
|
Sets the Constant Rate Factor for H.264 video quality at 23, the libx264 default. This is a perceptually good balance for HD content going into M2TS; lower values like 18 would be appropriate if you are targeting Blu-ray archive quality. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, sufficient for stereo audio. For multi-channel surround sound commonly expected in Blu-ray M2TS content, you would increase this to 192k or 320k. |
output.m2ts
|
Specifies the output filename with the .m2ts extension. FFmpeg uses this extension to automatically select the BDAV MPEG-2 Transport Stream muxer, which writes the H.264 and AAC streams into 192-byte TS packets as required by the M2TS format. |
Common Use Cases
- Preparing video content for Blu-ray disc authoring software such as Scenarist or Sony Vegas Blu-ray Disc Plug-in, which require BDAV-compliant M2TS files as input
- Converting MP4 footage from a smartphone or action camera into M2TS so it can be imported into AVCHD-based editing workflows or mixed with footage from AVCHD camcorders
- Archiving high-definition home video in M2TS format to match the native output of Blu-ray and AVCHD camcorder recordings for long-term storage consistency
- Delivering video to broadcast or digital signage systems that require MPEG-2 Transport Stream encapsulation for reliable stream-based playback
- Converting MP4 content to M2TS so it can be played back directly on Blu-ray players or PlayStation 3/4 consoles that support AVCHD folder structures on USB drives
- Repurposing MP4 video assets for use in professional video production pipelines that ingest M2TS as a standard interchange format
Frequently Asked Questions
It will be re-encoded, not simply remuxed. Even though both MP4 and M2TS can carry H.264 video, the MPEG-2 Transport Stream container used in M2TS requires streams to be packetized with specific BDAV timing headers (192-byte packets) that differ from the MP4 box structure. FFmpeg must decode and re-encode the video to properly wrap it in the transport stream. This means some generational quality loss occurs, though at CRF 23 the quality impact is minimal for most content.
No. M2TS (BDAV MPEG-2 Transport Stream) does not support chapter metadata as a container-level feature, unlike MP4 which stores chapters in dedicated 'chpl' or 'udta' atoms. Any chapter markers embedded in your MP4 will be silently dropped during conversion. If chapter navigation is important for your use case, you would need to handle this at the Blu-ray authoring layer using a tool like MakeMKV or Scenarist after the M2TS file is created.
Yes, in most cases. Blu-ray players and PlayStation 3/4 consoles support AVCHD playback from USB drives, which uses M2TS files organized in a specific BDMV folder structure (BDMV/STREAM/). A standalone M2TS file may play directly on some players, but for full AVCHD compatibility you typically need to place it inside the correct AVCHD directory tree. The H.264 video and AAC audio produced by this conversion are both valid BDAV codecs.
M2TS files are generally larger than equivalent MP4 files, even at the same CRF quality level. The MPEG-2 Transport Stream format has higher per-packet overhead due to its 192-byte packet structure (versus MP4's more compact box format), and the re-encoding process at CRF 23 may produce different bitrates than the original. Expect the M2TS output to be roughly 5–15% larger than the source MP4 for typical HD content, though this varies with source complexity.
M2TS does support multiple audio tracks, and this tool will include them in the output. However, the default FFmpeg command shown here maps the primary video and audio streams. If your MP4 contains multiple audio tracks (e.g., multiple language dubs) and you want all of them in the M2TS output, you would need to modify the command to add '-map 0:v -map 0:a' flags to explicitly map all streams, and repeat the '-c:a aac' and '-b:a 128k' options for each audio track.
To adjust video quality, change the '-crf 23' value — lower numbers produce higher quality and larger files (0 is near-lossless, 51 is very low quality). For Blu-ray-quality output, consider CRF values between 18 and 20. To change audio bitrate, modify '-b:a 128k' to a higher value like '-b:a 192k' or '-b:a 320k' for better audio fidelity. For example: 'ffmpeg -i input.mp4 -c:v libx264 -c:a aac -crf 18 -b:a 192k output.m2ts' produces a higher-quality result suitable for HD archiving.
Technical Notes
M2TS uses the BDAV variant of the MPEG-2 Transport Stream, where each TS packet is 192 bytes (standard MPEG-2 TS uses 188 bytes) with a 4-byte timecode prefix. This packetization makes M2TS slightly less space-efficient than MP4 but well-suited for disc-based and broadcast delivery where reliable stream synchronization matters. The H.264 (libx264) codec used here is fully compliant with Blu-ray's video codec requirements (MPEG-4 AVC, Blu-ray profile). AAC audio is supported in BDAV but note that Blu-ray's most native audio formats are Dolby Digital (AC-3) and DTS; some strict Blu-ray authoring tools may require AC-3 audio instead of AAC. M2TS does not support transparency (alpha channels) or chapter metadata at the container level, both of which MP4 supports. Subtitle tracks can technically be carried in M2TS using the PGS (Presentation Graphics Stream) format, but the conversion from MP4 subtitle formats (such as SRT or tx3g) to PGS requires additional authoring steps beyond what a direct FFmpeg transcode handles. The '-movflags +faststart' flag used in MP4 outputs is not applicable to M2TS, as transport streams are inherently sequential and streaming-compatible by design.