Convert MPG to DVR — Free Online Tool
Convert MPG files — the MPEG-1/2 video format used for VCD, DVD, and broadcast — into DVR format using H.264 video and AAC audio encoding. This conversion modernizes legacy broadcast-era MPEG-2 content into a compact, DVR-compatible recording format suitable for digital video recorders and surveillance systems.
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 typically carry MPEG-2 video and MP2 audio streams, codecs designed for broadcast television and optical disc playback in the 1990s and 2000s. During this conversion, the MPEG-2 video stream is fully re-encoded into H.264 (libx264) using a Constant Rate Factor of 23, which intelligently allocates more bits to complex scenes and fewer to simple ones — typically achieving significantly smaller file sizes than the original MPEG-2 stream at comparable visual quality. The MP2 audio track is simultaneously transcoded to AAC at 128k bitrate, replacing the older MPEG Audio Layer II codec with a more efficient modern audio format. Because MPEG-2 and H.264 are fundamentally different compression standards, there is no possibility of stream copying — every frame must be decoded and re-encoded.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all decoding, re-encoding, and container muxing for this MPG-to-DVR conversion. |
-i input.mpg
|
Specifies the input MPG file. FFmpeg will detect and demux the MPEG-2 Program Stream, identifying the MPEG-2 video stream and MP2 audio stream contained within it. |
-c:v libx264
|
Sets the video encoder to libx264, which re-encodes the MPEG-2 video frames into H.264 — the compression standard expected by DVR format and significantly more efficient than the source MPEG-2 codec. |
-c:a aac
|
Sets the audio encoder to AAC, transcoding the MP2 audio stream from the MPG source into the AAC format used by DVR — replacing the older broadcast audio codec with a more efficient modern equivalent. |
-crf 23
|
Applies Constant Rate Factor quality control to the H.264 encoding, where 23 is the default balanced setting. This tells libx264 to target consistent perceptual quality across all frames of the re-encoded MPEG-2 content rather than using a fixed bitrate. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second, which is the DVR format default and appropriate for the mono or stereo MP2 audio typically found in broadcast MPG recordings. |
output.dvr
|
Specifies the output filename with the .dvr extension, instructing FFmpeg to write the re-encoded H.264 video and AAC audio into a DVR container file. |
Common Use Cases
- Importing digitized VHS or broadcast recordings stored as MPG files into a DVR system for organized television archive playback
- Re-encoding MPEG-2 broadcast captures from a TV tuner card into DVR format so they can be stored and replayed on a standalone digital video recorder appliance
- Archiving legacy surveillance footage originally recorded to DVD in MPG format into a DVR-compatible format for integration with modern CCTV management software
- Converting MPG files from a DVD camcorder or set-top recorder into DVR format to consolidate home video archives on a network-attached DVR storage device
- Reducing the file size of large MPEG-2 broadcast recordings — which use fixed high bitrates — by re-encoding to H.264's variable bitrate compression before storing on a DVR with limited disk capacity
- Preparing MPG content captured from satellite or cable feeds for ingestion into a broadcast capture and DVR workflow system
Frequently Asked Questions
Because both the source MPEG-2 and the output H.264 are lossy formats, this conversion involves a second generation of lossy compression, which does introduce some quality loss. However, H.264 encoded at CRF 23 is generally quite efficient — for most broadcast or DVD-resolution MPG content, the visual difference is minimal. If you need to preserve maximum quality, you can lower the CRF value (e.g., -crf 18) in the FFmpeg command to reduce compression and maintain fidelity closer to the source.
MP2 (MPEG Audio Layer II) was the standard audio codec for broadcast television and DVD Video under the MPEG-1/2 specification, which is why it's the default in MPG containers. DVR format targets modern digital video recorders, which typically use AAC — a more efficient codec that achieves better audio quality at the same bitrate. The FFmpeg command transcodes the MP2 stream to AAC at 128k, which is more than sufficient for spoken word, TV audio, and general broadcast content.
In most cases the DVR output will be noticeably smaller than the source MPG. MPEG-2 video, especially from DVD or broadcast sources, typically operates at constant bitrates between 4–9 Mbps. H.264 at CRF 23 uses variable bitrate encoding and can often match or exceed MPEG-2 visual quality at roughly half the bitrate. The exact reduction depends on the complexity and resolution of your original MPG content.
No. MPG containers based on MPEG-2 Program Streams do not support chapters or subtitles natively, and DVR format likewise does not support these features. Any broadcast metadata embedded in the MPEG-2 stream (such as ATSC or DVB service information) will not be carried over to the DVR output, as this information is transport-layer specific and not remapped during re-encoding.
The video quality is controlled by the -crf flag in the command. CRF 23 is the default — lower values produce higher quality and larger files (CRF 18 is near-visually lossless for most content), while higher values increase compression and reduce quality. For example, replace '-crf 23' with '-crf 18' for archival quality, or '-crf 28' to prioritize smaller file size. The audio quality can be adjusted by changing the -b:a value from '128k' to '192k' or '256k' for higher fidelity audio.
Yes. On Linux or macOS you can use a shell loop: 'for f in *.mpg; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mpg}.dvr"; 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.dvr"'. This is particularly useful for processing large batches of broadcast recordings or archived VCD/DVD rips that exceed the 1GB browser limit of the online tool.
Technical Notes
MPEG-2 video (mpeg2video) in MPG containers uses Discrete Cosine Transform compression with intra-frames (I-frames), predicted frames (P-frames), and bidirectional frames (B-frames), typically at fixed or constrained variable bitrates set during capture or encoding. H.264 (libx264) uses a far more sophisticated entropy coding model and motion compensation algorithm, which is why re-encoding from MPEG-2 to H.264 almost always yields substantial bitrate savings. The CRF (Constant Rate Factor) method used here is perceptually optimized — it targets a consistent visual quality level across the entire file rather than a fixed bitrate, making it well-suited for MPG source content that may have variable scene complexity. Note that MPG containers do not support multiple audio tracks, transparency, or subtitle streams, so there is no risk of silent data loss from unsupported features. One known limitation: some MPG files created from VCD sources use MPEG-1 video rather than MPEG-2; FFmpeg handles both transparently with the same command since libx264 can accept either as input. DVR format inherits H.264's broad device compatibility, making the output playable on most modern video processing tools even outside dedicated DVR hardware.