Convert MPG to RM — Free Online Tool
Convert MPG files (MPEG-1/2 video with MP2 audio) to RealMedia RM format using MJPEG video encoding and AAC audio — entirely in your browser with no uploads required. This tool is especially useful for archivists and legacy media workflows that require RealNetworks-compatible streaming files.
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 as MPEG-1 or MPEG-2 streams alongside MP2 audio — both designed for broadcast and disc-based distribution. Converting to RM requires a full re-encode of both streams: the MPEG-2 video is decoded and re-encoded as MJPEG (Motion JPEG), where each video frame is compressed individually as a JPEG image rather than using inter-frame prediction. The MP2 audio is simultaneously decoded and re-encoded as AAC, which offers better compression efficiency at the same bitrate. Because neither codec can be stream-copied between these containers, this is a full transcoding operation, meaning some generation loss is inherent.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg transcoding engine. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm), so no files leave your device. The same binary command can be run identically on a desktop FFmpeg installation. |
-i input.mpg
|
Specifies the input MPG file, which contains MPEG-1 or MPEG-2 video and typically MP2 audio. FFmpeg automatically detects the container and demuxes both the video and audio elementary streams for decoding. |
-c:v mjpeg
|
Instructs FFmpeg to encode the video stream as MJPEG (Motion JPEG), the only video codec reliably supported for writing into an RM container. This replaces the temporal MPEG-2 compression from the source with per-frame JPEG compression. |
-c:a aac
|
Re-encodes the audio stream as AAC, replacing the MP2 audio native to the source MPG file. AAC is the default audio codec for the RM output and offers better perceptual quality than MP2 at equivalent bitrates. |
-q:v 5
|
Sets the MJPEG video quality scale to 5 on a range of 1 (best quality) to 10 (lowest quality). This is the midpoint default for the RM output format; lower values like 2 or 3 will produce sharper frames at the cost of a significantly larger file. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, the default for this RM output. This is a standard stereo AAC quality level; increase to 192k or 256k for higher fidelity audio, or reduce to 64k or 96k to shrink the output file. |
output.rm
|
Specifies the output filename and, through the .rm extension, signals FFmpeg to use the RealMedia muxer. The resulting file is a proprietary RealNetworks RM container holding the MJPEG video and AAC audio streams. |
Common Use Cases
- Preparing archived broadcast MPG footage for playback in legacy RealPlayer-based kiosk or museum installations that only support RM files
- Converting VCD or DVD MPEG-2 rips to RM format for distribution on early 2000s-era intranets or content management systems that were built around RealMedia streaming
- Archiving MPEG-2 broadcast recordings into MJPEG-based RM files where frame-level random access (a trait of MJPEG) is needed for editing or scrubbing
- Migrating a library of MPG training videos to RM format for a legacy RealNetworks Helix streaming server deployment
- Testing codec compatibility and quality tradeoffs between MPEG-2 and MJPEG compression for research or educational purposes
- Generating an RM file with its corresponding FFmpeg command so the same conversion can be reproduced at scale on a desktop machine for files exceeding 1GB
Frequently Asked Questions
Yes — this conversion involves two stages of lossy compression and is unavoidable. The original MPG file's MPEG-2 video is decoded to raw frames, then re-encoded as MJPEG, which discards inter-frame prediction and compresses each frame independently as a JPEG. The MP2 audio is similarly decoded and re-encoded as AAC. Each re-encode introduces some generation loss, so the output RM file will not be bit-for-bit identical to the source in terms of visual or audio fidelity.
The RealMedia RM container has very limited codec support in standard FFmpeg builds. MJPEG is the primary video codec FFmpeg can reliably write into an RM container, making it the practical default. MJPEG is an older intra-frame codec that stores each frame as a standalone JPEG image, which is very different from the temporal compression used in the source MPEG-2 video. If you need a modern codec, consider converting to a different container such as MP4 instead.
Expect the RM file to be noticeably larger than the source MPG for most content. MJPEG is significantly less space-efficient than MPEG-2 because it cannot use inter-frame compression — every frame is encoded independently, consuming more data per second of video. The AAC audio is generally slightly smaller than MP2 at the same perceptual quality, but this saving is typically overwhelmed by the larger MJPEG video stream.
No. The RM format does not support subtitles, chapters, or multiple audio tracks in this conversion pipeline. The MPG format itself also lacks chapter and subtitle support in its standard form, but if your MPG source has multiple audio streams (as some MPEG-2 program streams do), only the first audio track will be encoded into the output RM file. Any subtitle data embedded as a separate stream will be dropped.
To change video quality, modify the -q:v value. For MJPEG in the RM container, -q:v accepts values from 1 (highest quality, largest file) to 10 (lowest quality, smallest file), with 5 as the default. To change audio quality, replace the -b:a 128k value with an alternative bitrate such as 64k, 96k, 192k, or 256k. For example, ffmpeg -i input.mpg -c:v mjpeg -c:a aac -q:v 2 -b:a 192k output.rm would produce higher-quality video and audio at the cost of a larger output file.
Yes — on a desktop machine you can use a shell loop to apply the same command to many files. On Linux or macOS, you can run: for f in *.mpg; do ffmpeg -i "$f" -c:v mjpeg -c:a aac -q:v 5 -b:a 128k "${f%.mpg}.rm"; done. On Windows Command Prompt: for %f in (*.mpg) do ffmpeg -i "%f" -c:v mjpeg -c:a aac -q:v 5 -b:a 128k "%~nf.rm". The browser-based tool processes one file at a time, so the FFmpeg command displayed on this page is especially useful for batch workflows involving large collections.
Technical Notes
The MPG-to-RM conversion path is one of the more technically constrained format pairs in common use. On the video side, MPEG-2 uses a GOP (Group of Pictures) structure with I-frames, P-frames, and B-frames to achieve high compression; MJPEG abandons this entirely, encoding every frame as an independent JPEG, which makes seeking trivial but storage cost high. The -q:v parameter for MJPEG in FFmpeg controls the JPEG quantization scale, not a bitrate — lower values mean finer quantization and better quality. On the audio side, MP2 (MPEG-1 Audio Layer II) is the native audio codec for MPG files used in broadcast and VCD contexts; AAC replaces it with a more modern psychoacoustic model that generally sounds better at 128k than MP2 at the same rate. The RM container itself is a proprietary RealNetworks format and has limited metadata support — fields like title, author, and copyright that may exist in a structured MPEG-2 program stream will not be reliably transferred. FFmpeg's RM muxer support is mature enough for basic output but is not actively developed, and some RealPlayer versions may exhibit compatibility quirks with FFmpeg-generated RM files depending on the MJPEG profile used.