Convert MPEG to M2TS — Free Online Tool

Convert legacy MPEG-1/2 video files to M2TS (BDAV MPEG-2 Transport Stream), re-encoding the video with the modern H.264 (libx264) codec and audio with AAC — bringing aging broadcast or DVD-era footage into a high-definition Blu-ray compatible container format.

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

MPEG files use older MPEG-1 or MPEG-2 video compression alongside MP2 audio, both of which are incompatible with the M2TS container's expected codec profile. This conversion performs a full transcode: the MPEG-1/2 video stream is decoded and re-encoded using H.264 (libx264) with a CRF of 23 for efficient modern compression, while the MP2 audio is decoded and re-encoded as AAC at 128k bitrate. The resulting stream is then muxed into the BDAV MPEG-2 Transport Stream (.m2ts) container, which is the standard format used on Blu-ray discs and AVCHD camcorders. Because both the video and audio codecs must change, this is a computationally intensive operation — not a simple remux.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all decoding, transcoding, and muxing in this conversion pipeline. In the browser-based tool, this runs via FFmpeg.wasm (WebAssembly) entirely client-side with no server upload.
-i input.mpeg Specifies the input MPEG file, which may contain MPEG-1 or MPEG-2 video and MP2, MP3, or AAC audio. FFmpeg auto-detects the specific MPEG variant and its contained codecs at this stage.
-c:v libx264 Transcodes the MPEG-1/2 video stream using the H.264 encoder (libx264), replacing the legacy MPEG video compression with a modern, efficient codec that is expected and well-supported inside the M2TS/BDAV container format.
-c:a aac Transcodes the MPEG audio (typically MP2) into AAC using FFmpeg's native AAC encoder. AAC is the appropriate audio codec for M2TS containers used outside of disc-authoring contexts, offering better compression efficiency than the original MP2.
-crf 23 Sets the Constant Rate Factor for the H.264 encode to 23, which is the libx264 default and represents a balanced quality-to-file-size tradeoff. Lower values (e.g., 18) produce higher fidelity output from the MPEG source at the cost of larger file size.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second. This is a reasonable target for stereo audio transcoded from MP2 source material; for higher fidelity from better-quality MPEG audio, increasing this to 192k or 256k is recommended.
output.m2ts Specifies the output filename with the .m2ts extension, which instructs FFmpeg to mux the transcoded H.264 video and AAC audio into the BDAV MPEG-2 Transport Stream container format used by Blu-ray discs and AVCHD camcorders.

Common Use Cases

  • Archiving old broadcast recordings or VHS-captured MPEG-2 footage onto Blu-ray disc using authoring software that requires M2TS input.
  • Preparing legacy MPEG footage from DVD camcorders or TV capture cards for playback on Blu-ray players and Sony PlayStation consoles that support AVCHD/M2TS.
  • Modernizing MPEG-1 video files (such as old VideoCD content) into a more storage-efficient H.264-encoded M2TS for long-term digital archiving.
  • Converting MPEG-2 broadcast recordings for editing in professional NLEs like DaVinci Resolve or Adobe Premiere that handle M2TS/AVCHD timelines natively.
  • Bringing legacy sports or event footage captured in MPEG format into a Blu-ray-compatible structure for compilation disc projects.
  • Converting MPEG files recorded by older DVB tuners into M2TS for use with media server software that organizes content by Blu-ray-standard containers.

Frequently Asked Questions

No — transcoding from MPEG-1/2 to H.264 cannot recover detail that was lost during the original MPEG encoding. The output will be re-compressed using H.264 at CRF 23, which is generally efficient and visually transparent at typical resolutions, but the source quality ceiling is set by the original MPEG file. What you do gain is a more modern codec that can represent the existing quality at a smaller file size, and compatibility with Blu-ray and AVCHD-based playback systems.
The M2TS container, as used in BDAV (Blu-ray Disc Audio-Video) applications, does not standardly carry MP2 audio — it expects codecs like AAC, AC-3, DTS, or LPCM. Since MPEG files typically use MP2 (MPEG-1 Audio Layer II) as their default audio codec, the audio must be transcoded to AAC to be properly muxed into the M2TS container. AAC is a more efficient and widely supported modern codec that preserves audio quality well at the 128k default bitrate used here.
The M2TS output is typically smaller than an equivalent MPEG-2 source file at the same visual quality level, because H.264 is significantly more compression-efficient than MPEG-2 — often achieving the same quality at roughly half the bitrate. However, if your source MPEG-1 file was already heavily compressed or low-resolution, the size difference may be modest. The CRF 23 setting used here is a quality-based target rather than a fixed bitrate, so file size will vary depending on the complexity of the source footage.
MPEG files do not natively support embedded subtitle tracks or chapter markers in the way modern containers do, so there is nothing to carry forward in this respect. The M2TS format itself does support subtitles (such as PGS/Blu-ray bitmap subtitles), but since the source MPEG has no subtitle data, the output M2TS will not contain any subtitle tracks either. If you need to add subtitles, that would require a separate muxing step after conversion.
Yes — the -crf flag controls the H.264 quality level in the output M2TS. The default value of 23 is a good general-purpose setting. Lowering the CRF (e.g., -crf 18) produces higher quality at the cost of a larger file, while raising it (e.g., -crf 28) reduces file size at the cost of some visual quality. For archival of legacy MPEG footage where you want to maximize fidelity, a CRF of 15–18 is recommended. To also raise audio quality, change -b:a 128k to -b:a 192k or -b:a 256k.
Yes — on Linux or macOS you can loop over files with a shell command such as: for f in *.mpeg; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mpeg}.m2ts"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.m2ts". This processes each MPEG file sequentially and outputs a matching M2TS file with the same base filename. The browser-based tool processes one file at a time, so the FFmpeg command is especially useful for bulk conversions of large archives.

Technical Notes

MPEG files encoded with MPEG-2 video and MP2 audio are a well-understood legacy format, but neither codec is natively expected inside a BDAV M2TS container, requiring a full transcode of both streams. The libx264 encoder used here produces Baseline, Main, or High Profile H.264, which is broadly compatible with Blu-ray players, AVCHD-compatible devices, and software players. One important limitation: true Blu-ray authoring has strict bitrate and profile constraints (e.g., maximum 40 Mbps video, specific profile/level requirements), and this general-purpose FFmpeg command does not enforce those constraints — if you are authoring an actual Blu-ray disc, you may need to add flags like -profile:v high -level 4.1 and cap the bitrate with -maxrate and -bufsize. The M2TS container supports multiple audio tracks, but since MPEG files carry only a single audio stream, the output will have one AAC track. No metadata fields (title, date, etc.) from the MPEG source are guaranteed to transfer, as MPEG has minimal metadata support and M2TS metadata structures differ significantly. For archival purposes, retaining the original MPEG file alongside the M2TS is advisable, since the transcode is lossy.

Related Tools