Convert MPG to MTS — Free Online Tool
Convert MPG files (MPEG-1/2 video with MP2 audio) to MTS format, re-encoding the video to H.264 using libx264 and the audio to AAC — producing AVCHD-compatible transport stream files that work with modern camcorder workflows and NLE software. This is a full transcoding operation, not a simple remux, since MPG and MTS use entirely different video codecs.
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 store video encoded with the older MPEG-1 or MPEG-2 codec alongside MP2 audio, packaged in a program stream container. MTS (AVCHD) uses the MPEG-2 Transport Stream container and expects H.264 video with AAC or AC-3 audio. Because none of the codecs overlap, this conversion requires full transcoding of both the video and audio streams: FFmpeg decodes the MPEG-2 video frames and re-encodes them using the libx264 encoder at CRF 23 (a perceptually good default quality), and simultaneously decodes the MP2 audio and re-encodes it as AAC at 128k bitrate. The resulting file is wrapped in the .mts transport stream container, which is the native format for Sony and Panasonic AVCHD camcorders and is widely supported by professional video editing applications like Premiere Pro, Final Cut Pro, and DaVinci Resolve.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary, the open-source multimedia processing engine that handles all decoding, encoding, and container muxing in this conversion. The browser-based tool runs this via FFmpeg.wasm compiled to WebAssembly. |
-i input.mpg
|
Specifies the input file — an MPG file containing MPEG-1 or MPEG-2 video and typically MP2 audio inside an MPEG program stream container. FFmpeg auto-detects the container and codec from the file header. |
-c:v libx264
|
Sets the video encoder to libx264, which transcodes the MPEG-2 video stream from the MPG into H.264, the codec required for AVCHD-compliant MTS files used by Sony and Panasonic camcorder workflows. |
-c:a aac
|
Sets the audio encoder to AAC, re-encoding the MP2 audio from the MPG source into AAC — the standard audio codec for AVCHD MTS files and a significant improvement in compression efficiency over MP2 at the same bitrate. |
-crf 23
|
Sets the Constant Rate Factor for the libx264 encoder to 23, FFmpeg's default quality level. This is a perceptually balanced setting for MPEG-2 to H.264 transcoding — producing good visual quality while keeping the MTS file size well below that of the original MPG. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which is sufficient for clear stereo audio and appropriate for most MPG source material that was originally encoded at MP2 bitrates of 128–192k. |
output.mts
|
Specifies the output filename with the .mts extension, signaling FFmpeg to wrap the H.264 video and AAC audio into an MPEG-2 Transport Stream container formatted as AVCHD, compatible with camcorder software and professional NLE applications. |
Common Use Cases
- Importing legacy broadcast or VCD footage stored as MPG into an AVCHD-based camcorder workflow or NLE project that expects MTS files
- Converting old MPEG-2 home video archives to MTS so they can be organized and edited alongside footage from a Sony or Panasonic AVCHD camcorder without format mixing
- Modernizing MPEG-1 or MPEG-2 encoded video from DVD rips or VCD discs into H.264-based MTS files to significantly reduce file size while improving compatibility
- Preparing MPG footage from broadcast archives for ingestion into professional editing timelines that use AVCHD bin structures and rely on MTS file recognition
- Transcoding MPG training videos or institutional recordings into MTS format required by specific corporate video management or archival systems
- Testing how MPEG-2 source material holds up when re-encoded to H.264 inside a transport stream, useful for quality evaluation in broadcast post-production pipelines
Frequently Asked Questions
Because MPG uses MPEG-2 video and MTS requires H.264, this conversion involves full re-encoding, which introduces a generation of compression loss. However, H.264 at CRF 23 is significantly more efficient than MPEG-2, so the output file is often smaller while visually appearing comparable or even cleaner. The perceptible quality loss depends heavily on the bitrate and quality of the original MPG source — high-bitrate MPEG-2 DVD content will transcode well, while low-bitrate VCD-quality MPG may show more artifacts.
Remuxing (copying streams without re-encoding) only works when the source and destination containers share compatible codecs. MTS is an AVCHD format specifically designed for H.264 video and AAC or AC-3 audio, and it does not support raw MPEG-1 or MPEG-2 video streams inside its transport stream container. Since MPG carries MPEG-2 video and MP2 audio, both streams must be fully transcoded — the video to H.264 and the audio to AAC — before they can be placed into an MTS container.
The video quality is controlled by the -crf flag. CRF stands for Constant Rate Factor and works on a scale where lower values produce higher quality and larger files: CRF 18 is near-visually lossless, CRF 23 is the default and a good balance, and values above 28 produce noticeably lower quality. For example, to get higher quality output from your MPG source, change the command to use -crf 18: ffmpeg -i input.mpg -c:v libx264 -c:a aac -crf 18 -b:a 128k output.mts. To reduce file size at the cost of some quality, try -crf 28.
MPG files do not carry subtitle tracks or chapter markers in a form that FFmpeg can easily extract and forward, so neither will be present in the output. Additionally, while MTS does support subtitles technically, this conversion command does not include a subtitle mapping flag. Chapters are not supported by MTS at all. If your MPG contains DVD-style subtitle streams, you would need a separate subtitle extraction step before they could be incorporated into any output format.
H.264 (used in MTS) is substantially more efficient than MPEG-2 (used in MPG), so at equivalent visual quality the MTS file will typically be 40–60% smaller than the source MPG. However, if the original MPG was a low-bitrate VCD file, the output size may be similar or even slightly larger if the CRF setting targets a quality level higher than what the source contains. For high-bitrate MPEG-2 broadcast or DVD sources, the size reduction from switching to H.264 is most dramatic.
Yes. On Linux or macOS, you can loop through all MPG files in a directory with a shell command: for f in *.mpg; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mpg}.mts"; 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.mts". Each file is processed sequentially, and the output MTS file takes the same base name as the input MPG.
Technical Notes
MPG encodes video using MPEG-1 or MPEG-2, both of which use DCT-based inter-frame compression with I, P, and B frames — the same fundamental structure as H.264, but far less efficient due to the older entropy coding and motion compensation methods. When FFmpeg transcodes to libx264 inside an MTS transport stream, it takes full advantage of CABAC entropy coding, improved motion estimation, and better rate-distortion optimization. The audio side of this conversion replaces MP2 — a legacy psychoacoustic codec common in broadcast MPG files — with AAC, which offers better quality at equivalent or lower bitrates. One important limitation: MTS transport streams do not carry multiple audio tracks in the way MKV or MP4 can, and the MPG format's support for multiple audio tracks is also limited, so this conversion is safely treated as a single video and single audio stream operation. Metadata such as creation timestamps embedded in the MPG program stream header will not be transferred to the MTS output, as the two container formats use entirely different metadata structures. If your source MPG contains interlaced MPEG-2 video (common in broadcast and DVD content), FFmpeg will pass the interlaced frames through to libx264, which can encode them as interlaced H.264 — but if you intend to play back on progressive displays, consider adding the -vf yadif deinterlacing filter to the command.