Convert MPG to M2TS — Free Online Tool
Convert MPG files (MPEG-1/2 video used in VCD, DVD, and broadcast) to M2TS, the Blu-ray BDAV transport stream format, re-encoding the legacy MPEG-2 video stream to modern H.264 (libx264) with AAC audio. This is the right tool when you need to bring aging broadcast or disc footage into a high-definition Blu-ray-compatible workflow.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MPG 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
MPG files carry video encoded in either MPEG-1 or MPEG-2, typically with MP2 audio — codecs designed for broadcast and early optical disc formats from the 1990s and 2000s. M2TS uses the MPEG-2 Transport Stream (.ts) container wrapped in the Blu-ray BDAV structure, but its video is expected to be H.264 or H.265 rather than the older MPEG-2. Because these video codecs are incompatible at the stream level, this conversion cannot simply remux the existing video — it must fully re-encode the MPEG-2 video stream using libx264, producing an H.264 bitstream inside the M2TS container. The MP2 audio from the source MPG is simultaneously transcoded to AAC, which is the standard lossy audio codec for M2TS and Blu-ray playback. Both re-encoding steps introduce a generation of lossy compression, so starting from the highest-quality MPG source available is recommended.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this conversion both in the browser (via FFmpeg.wasm) and on the desktop command line. |
-i input.mpg
|
Specifies the input MPG file. FFmpeg will detect whether the stream uses MPEG-1 or MPEG-2 video and MP2, MP3, or AAC audio based on the file's internal headers, and will decode accordingly before re-encoding. |
-c:v libx264
|
Re-encodes the MPEG-2 (or MPEG-1) video stream from the MPG source into H.264 using the libx264 encoder — the codec expected by Blu-ray BDAV and AVCHD workflows that use the M2TS container. |
-c:a aac
|
Transcodes the MP2 audio from the MPG file into AAC-LC using FFmpeg's built-in AAC encoder, which is the standard audio format for M2TS and Blu-ray playback. |
-crf 23
|
Sets the H.264 Constant Rate Factor to 23, the libx264 default. This is a quality-based setting where lower values (e.g., 18) produce larger, higher-quality files and higher values (e.g., 28) produce smaller files with more compression — useful for tuning output size when converting large broadcast MPG archives. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second. For typical MPG speech or dialogue content this is sufficient, but if the source MPG carries stereo music at high-bitrate MP2, increasing this to 192k or 256k will better preserve audio fidelity. |
output.m2ts
|
Defines the output filename with the .m2ts extension, which signals FFmpeg to write a Blu-ray BDAV MPEG-2 Transport Stream container — the standard container for Blu-ray disc video and AVCHD camcorder recordings. |
Common Use Cases
- Archiving old VCD or DVD-ripped MPG footage into an M2TS format compatible with modern Blu-ray authoring software like TMPGEnc or Encore
- Preparing MPG broadcast recordings captured from a TV tuner card for playback on a Sony PlayStation or Blu-ray player that expects M2TS/BDAV structure
- Upgrading legacy MPEG-2 news or sports footage from a broadcast archive into an H.264 M2TS container for ingest into a modern NLE like DaVinci Resolve or Premiere Pro
- Converting AVCHD camcorder-adjacent workflows where the editing chain requires M2TS input but source material arrived as MPG from a hardware encoder or satellite receiver
- Repackaging MPEG-2 educational or training video distributed on VCD into an M2TS file suitable for a Blu-ray disc compilation project
- Migrating a personal home video library stored as MPG files into M2TS to take advantage of M2TS's support for multiple audio tracks or subtitle streams in future authoring steps
Frequently Asked Questions
No — this conversion re-encodes the original MPEG-2 video into H.264, which cannot recover detail that the MPEG-2 encoder already discarded. H.264 is a more efficient codec, meaning it can represent the same quality at a smaller file size, but the output will never exceed the visual quality of the source MPG. If your source MPG is low-resolution (e.g., VCD at 352×240), the M2TS output will be the same resolution unless you explicitly scale it. Think of this conversion as changing the container and codec format, not upscaling or restoring the footage.
MPEG-2 video in MPG files is generally a less efficient codec than H.264 — it needs a higher bitrate to achieve the same perceptual quality. When FFmpeg re-encodes the MPEG-2 stream to H.264 with the default CRF 23, it targets a quality level rather than a fixed bitrate, and H.264 typically needs fewer bits to represent that quality. Additionally, broadcast and DVD MPG files often carry high bitrates (4–8 Mbps or more) that far exceed what H.264 needs to look equivalent, so the resulting M2TS file is often significantly smaller. This is expected and not a sign of quality loss beyond what the CRF setting controls.
MPG (MPEG program stream) files have very limited metadata support and do not carry chapters or subtitle tracks in a standardized way that FFmpeg can reliably extract. M2TS does support subtitles and multiple audio tracks, but since the source MPG has none of those to offer, the output M2TS will be a straightforward single video and single audio track file. Any embedded metadata fields in the MPG header that FFmpeg can read will be passed through, but in practice MPG files are nearly always bare of meaningful metadata.
The CRF value (Constant Rate Factor) controls the H.264 quality in this command. Lower CRF means better quality and larger files; higher CRF means smaller files with more compression. The default is -crf 23, which is a balanced midpoint. For higher quality — useful if your source MPG is already high-bitrate broadcast footage — try -crf 18. For a smaller output at acceptable quality, -crf 28 is a reasonable ceiling. To change audio bitrate, replace -b:a 128k with -b:a 192k or -b:a 256k for better AAC fidelity when the source MP2 audio carries stereo music or dialogue.
Yes. On Linux or macOS, you can loop over all MPG files in a directory with a shell one-liner: for f in *.mpg; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mpg}.m2ts"; done. On Windows Command Prompt, use: for %f in (*.mpg) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.m2ts". This is especially useful for bulk archive migrations where you have dozens of MPG recordings to convert, and it applies the exact same encoding settings shown on this page.
M2TS files produced with H.264 video and AAC audio are broadly compatible with Blu-ray players and game consoles, but bare M2TS files without a BDAV directory structure (BDMV/CERTIFICATE folders) may not be recognized by strict hardware players that expect a full Blu-ray disc structure. For direct USB or disc playback on a hardware Blu-ray player, you may need to author the M2TS file into a proper BDMV structure using tools like MakeMKV, tsMuxeR, or BDAuthor. Software players like VLC and Kodi will play the raw M2TS file without any additional structure.
Technical Notes
The core challenge of this conversion is the generational codec gap between MPG and M2TS. MPEG-2 video in MPG uses a relatively simple DCT-based intra/inter coding scheme without the advanced tools H.264 brings (CABAC entropy coding, multiple reference frames, sub-pixel motion estimation). As a result, FFmpeg's libx264 encoder must perform a full decode-and-re-encode cycle — there is no stream copy shortcut available. The default CRF 23 setting with libx264 uses the 'medium' preset by default; adding -preset slow or -preset veryslow to the command will improve compression efficiency at the cost of longer encoding time, which can be worthwhile for archival output. The source MPG's MP2 audio is decoded and re-encoded to AAC-LC at 128k by FFmpeg's native AAC encoder. If the source has stereo MP2 at 192k or 256k (common for broadcast), you may want to raise -b:a to 192k to avoid audible fidelity loss, particularly for music content. M2TS technically supports FLAC (lossless) audio as an alternative; substituting -c:a flac and removing -b:a from the command would preserve audio transparently at the cost of larger files. The M2TS container itself does not impose a maximum resolution or framerate limit relevant to MPG source content, so standard-definition MPG (480i, 576i) will be wrapped as-is at its native resolution without automatic upscaling.