Convert MPG to MXF — Free Online Tool
Convert MPG files to MXF for use in broadcast and professional post-production workflows. This tool re-encodes the MPEG-1/2 video stream into H.264 (libx264) and upgrades the audio from MP2 to uncompressed PCM, producing a broadcast-ready MXF container with timecode support.
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 MPEG-1 or MPEG-2 video alongside MP2 audio in a container designed for VCD, DVD, and broadcast distribution. MXF is a professional wrapper used in broadcast ingest, NLE timelines, and mastering workflows. Because MXF's default video codec (H.264/libx264) differs from MPEG-2, the video stream must be fully re-encoded — not simply remuxed — which means every frame is decoded from MPEG-2 and re-compressed as H.264. The audio undergoes a similar transformation: MP2 (a lossy compressed format common in MPEG streams) is decoded and re-encoded as PCM S16LE, which is uncompressed 16-bit linear audio. This audio upgrade is significant for broadcast and post-production use, where lossless audio is the professional standard. The result is an MXF file that is smaller than the original MPG for equivalent perceived quality (thanks to H.264's superior compression) while carrying broadcast-grade uncompressed audio.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. This is the command-line program that handles all decoding, encoding, and container operations. When run in the browser, FFmpeg.wasm provides the same functionality compiled to WebAssembly. |
-i input.mpg
|
Specifies the input file — in this case an MPG file containing an MPEG-1 or MPEG-2 video stream and typically an MP2 audio stream. FFmpeg reads the container, demuxes the streams, and passes them to the appropriate decoders. |
-c:v libx264
|
Sets the video encoder to libx264, which re-encodes the MPEG-2 video stream from the MPG into H.264. This is a full transcoding step — every frame is decoded from MPEG-2 and compressed again as H.264, which is the professional default for MXF in modern post-production workflows. |
-c:a pcm_s16le
|
Sets the audio encoder to PCM S16LE, converting the lossy MP2 audio from the MPG into uncompressed 16-bit linear PCM. This is the broadcast-standard audio format for MXF and is expected by most NLEs and playout servers that consume MXF files. |
-crf 23
|
Sets the Constant Rate Factor for libx264 to 23, which is the default quality level. CRF controls the quality-to-filesize tradeoff: lower values (e.g., 15) produce higher-quality, larger H.264 streams suitable for mastering, while higher values (e.g., 28) produce smaller files for review or proxy use. |
-b:a 192k
|
Sets the audio bitrate parameter to 192k. For PCM S16LE, this flag has no practical encoding effect because PCM is uncompressed and its bitrate is determined by sample rate and bit depth rather than a target bitrate — the actual PCM bitrate will be fixed by the source audio properties. This flag is included for consistency with the tool's parameter structure. |
output.mxf
|
Specifies the output filename with the .mxf extension. FFmpeg uses this extension to select the MXF container muxer, which wraps the H.264 video and PCM audio streams into a Material Exchange Format file suitable for broadcast ingest and professional post-production. |
Common Use Cases
- Ingesting legacy VCD or DVD-ripped MPG content into a broadcast NLE (such as Avid Media Composer or Adobe Premiere) that expects MXF-wrapped media for its project bins.
- Delivering digitized archive footage — originally recorded as MPEG-2 for broadcast — into an MXF-based media asset management (MAM) system that requires timecode-embedded files.
- Preparing MPG recordings from legacy broadcast capture cards for upload to a playout server or transmission system that mandates MXF as its ingest format.
- Upgrading the audio track of an MPG file from lossy MP2 compression to uncompressed PCM before passing the file to an audio post-production team working in a DAW.
- Converting MPEG-2 field recordings or news footage into an MXF container so they can be catalogued and edited alongside other MXF assets in a unified post-production pipeline.
- Re-wrapping and re-encoding MPG content for long-term digital preservation workflows where MXF is the mandated archival format due to its rich metadata support.
Frequently Asked Questions
Yes, some generation loss is inherent because the MPEG-2 video in the MPG file must be fully decoded and re-encoded as H.264. However, at the default CRF value of 23, H.264 typically produces equal or better perceived quality than most MPEG-2 sources at a smaller file size. If you need to minimize quality loss — for example, when the MXF file will be edited and re-exported later — consider lowering the CRF value to 15 or below in the FFmpeg command to produce a higher-bitrate H.264 stream.
MXF for broadcast and professional production conventionally uses uncompressed audio (PCM) rather than lossy compressed formats like MP2. The default audio codec for this conversion is PCM S16LE, which is uncompressed 16-bit linear audio at whatever sample rate the source MPG carries. This means the audio portion of your MXF file will be lossless relative to the decoded MP2 signal, even though the original MP2 encoding introduced some loss. Uncompressed audio is expected by most broadcast playout systems and NLEs when working with MXF.
It depends on the source. The video will typically be smaller or comparable in size because H.264 is significantly more efficient than MPEG-2 at the same visual quality. However, the audio will be substantially larger, because MP2 compressed audio is replaced with uncompressed PCM — a 192 kbps MP2 track might expand to several megabytes per minute of uncompressed PCM. For long-form content with mostly video data, the overall file size often decreases; for short clips with proportionally large audio tracks, the size may increase.
MXF as a container natively supports timecode, which is one of its key advantages over MPG. However, whether timecode from the source MPG is preserved depends on whether the original file contained embedded timecode in its MPEG-2 stream. FFmpeg will attempt to carry over any GOP-level timecode it can detect, but MPG files — especially those ripped from VCD or DVD — often do not contain meaningful timecode. You may need to assign or re-stripe timecode in your NLE or broadcast tool after ingest.
Video quality is controlled by the -crf flag, which accepts values from 0 (visually lossless) to 51 (very low quality). The default is 23, which is a balanced general-purpose setting. To produce a higher-quality MXF suitable for master delivery or further editing, try -crf 15 or -crf 10. To produce a smaller file for review or proxy use, try -crf 28. For example: ffmpeg -i input.mpg -c:v libx264 -c:a pcm_s16le -crf 15 -b:a 192k output.mxf
Yes. On Linux or macOS, you can use a shell loop: for f in *.mpg; do ffmpeg -i "$f" -c:v libx264 -c:a pcm_s16le -crf 23 -b:a 192k "${f%.mpg}.mxf"; done. On Windows Command Prompt: for %f in (*.mpg) do ffmpeg -i "%f" -c:v libx264 -c:a pcm_s16le -crf 23 -b:a 192k "%~nf.mxf". Note that the browser-based tool processes one file at a time; the FFmpeg command is the recommended approach for batch jobs or files over 1GB.
Technical Notes
MPG files built on the MPEG-2 standard use intra- and inter-frame compression with relatively large keyframe intervals and limited metadata capabilities. MXF, by contrast, is a professional wrapper designed to carry rich operational and descriptive metadata, timecode, and multiple audio tracks alongside the essence data. This conversion uses libx264 as the video codec, which produces a High Profile H.264 stream — broadly compatible with professional NLEs and broadcast equipment, though some older MXF-aware devices may only accept MPEG-2 video wrapped in MXF (in which case you would substitute -c:v mpeg2video and replace -crf with -q:v). The audio codec PCM S16LE is uncompressed 16-bit little-endian audio, the standard for broadcast MXF. One important limitation: MPG does not support multiple audio tracks or subtitle streams, so this conversion produces a single stereo or mono audio track with no subtitle data. MXF's support for multiple audio tracks is not leveraged here unless you combine this command with additional -map flags to merge separate source audio files. Metadata fields such as title or creation date embedded in the MPG may not transfer to MXF's internal metadata schema automatically and should be verified with a tool like MediaInfo after conversion.