Convert MPG to HEVC — Free Online Tool

Convert MPG files (MPEG-1/2 video) to HEVC (.hevc) using the libx265 encoder, achieving significantly smaller file sizes while preserving visual quality. HEVC's superior compression makes it ideal for archiving aging VCD, DVD, or broadcast MPG footage at roughly half the bitrate of the original MPEG-2 stream.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

MPG files contain MPEG-1 or MPEG-2 video (typically at relatively low bitrates designed for VCD or DVD) alongside MP2 or MP3 audio. During this conversion, the MPEG-2 video stream is fully re-encoded using the libx265 encoder into HEVC — there is no simple remux possible here because HEVC is a fundamentally different codec from MPEG-2. The encoder analyzes each frame and applies modern compression techniques like improved inter-frame prediction and larger transform blocks to achieve far better efficiency than the decades-old MPEG-2 standard. Note that the output .hevc file is a raw HEVC bitstream without a container, so audio from the MPG source is not carried over — you receive a video-only HEVC stream. If you need audio preserved, consider outputting to a container format like MKV or MP4 instead.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which orchestrates the entire conversion pipeline — reading the MPG container, decoding the MPEG-2 video, and passing raw frames to the libx265 encoder.
-i input.mpg Specifies the input MPG file. FFmpeg will demux the MPEG-1/2 container, extracting the MPEG-2 (or MPEG-1) video stream for re-encoding and identifying any MP2/MP3 audio tracks present.
-c:v libx265 Selects the libx265 encoder for the video stream, which re-encodes the decoded MPEG-2 frames into HEVC. This is a full transcode — the original MPEG-2 bitstream is fully decoded and then re-compressed using HEVC's superior compression algorithms.
-crf 28 Sets the Constant Rate Factor for the HEVC encoder to 28, controlling the quality-to-filesize tradeoff. For typical MPG source material (DVD or broadcast quality), CRF 28 produces a clean result at a much lower bitrate than the original MPEG-2 stream. Lower values like 18–23 increase quality and file size; higher values like 35+ reduce size further with more visible compression.
-x265-params log-level=error Passes a parameter directly to the libx265 encoder to suppress its verbose frame-level statistics output. Without this flag, libx265 prints detailed encoding data for every frame, cluttering the console — this keeps the conversion output readable without affecting the encoded video in any way.
output.hevc Specifies the output filename with the .hevc extension, telling FFmpeg to write a raw Annex B HEVC bitstream. This is a video-only stream with no container — audio from the source MPG is not included, and no metadata wrapper is applied.

Common Use Cases

  • Archiving a large collection of old VCD or DVD-ripped MPG files, shrinking them dramatically for long-term cold storage without visible quality loss
  • Preparing MPEG-2 broadcast or satellite recordings for playback on modern smart TVs and devices that support HEVC but struggle with legacy MPEG-2 streams
  • Reducing the file size of digitized VHS or camcorder footage that was captured as MPG before uploading to a video editing workflow that accepts raw HEVC
  • Generating a compact HEVC reference stream from an MPG master for quality comparison or codec benchmarking between MPEG-2 and H.265
  • Converting MPG content captured from broadcast hardware into a storage-efficient format before wrapping it into a container for distribution

Frequently Asked Questions

The conversion involves re-encoding the MPEG-2 or MPEG-1 video stream, which is a lossy process. However, because HEVC is dramatically more efficient than MPEG-2, the default CRF value of 28 typically produces visual quality that matches or exceeds the original MPG at a much lower bitrate. If the source MPG was already heavily compressed (such as a VCD at 1150 kbps), the output quality ceiling is limited by the source, not the encoder — HEVC simply represents that same quality more efficiently.
A raw .hevc file is a headerless bitstream that carries only video — it has no container structure to multiplex audio alongside the video. The MPG file's MP2 or MP3 audio tracks are dropped during this conversion. If you need to retain audio from the MPG source, you should output to a container like MP4 or MKV instead, which can hold both the HEVC video stream and a re-encoded or copied audio track.
MPEG-2 was standardized in 1994 and uses relatively simple compression tools — it is limited to 16x16 macroblock partitions and basic motion estimation. HEVC (H.265), standardized in 2013, uses coding tree units up to 64x64, more sophisticated inter-frame prediction, and improved entropy coding. In practice, HEVC delivers equivalent visual quality to MPEG-2 at roughly 50–70% lower bitrate, which is why MPG files converted to HEVC can be dramatically smaller.
Yes — the quality is controlled by the -crf flag, where lower values mean higher quality and larger files. The default is 28, which is a reasonable balance for most MPG source material. For archiving high-quality DVD-ripped MPG files where you want to maximize fidelity, try -crf 18 or -crf 20. For heavily compressed VCD-sourced MPG files where the source quality is already low, values of 28–35 are typically sufficient and will still produce clean output.
Yes — on Linux or macOS you can run a shell loop such as: for f in *.mpg; do ffmpeg -i "$f" -c:v libx265 -crf 28 -x265-params log-level=error "${f%.mpg}.hevc"; done. On Windows Command Prompt you can use: for %f in (*.mpg) do ffmpeg -i "%f" -c:v libx265 -crf 28 -x265-params log-level=error "%~nf.hevc". This is especially useful when archiving a large MPG collection, and the command displayed on this page is directly reusable on your local machine.
Raw .hevc bitstream files are not as universally playable as container-wrapped HEVC in MP4 or MKV. VLC media player can typically handle raw HEVC streams, and most command-line tools like ffplay will open them. However, many consumer devices, web browsers, and media servers expect HEVC wrapped in a proper container. If broad compatibility is your goal, consider using an MP4 or MKV output instead, which wraps the same HEVC video in a widely supported container.

Technical Notes

MPG files using the MPEG-2 video codec are a common legacy format from the DVD and broadcast era, typically encoded at fixed bitrates between 1–9 Mbps with 4:2:0 chroma subsampling. The libx265 encoder used here is the reference software implementation of HEVC and produces high-quality output but is computationally intensive — expect encoding times significantly longer than the original playback duration, especially on older hardware. The -x265-params log-level=error flag suppresses the verbose per-frame statistics that libx265 normally emits, keeping console output clean without affecting encoding quality. The output is a raw Annex B HEVC bitstream (.hevc), which contains no metadata, chapter markers, subtitle tracks, or audio — all of which are absent from the HEVC format itself. Because MPEG-2 source material often originated from interlaced broadcast or DVD sources, interlacing artifacts may be present in the HEVC output; for cleaner results with interlaced MPG sources, consider adding a deinterlace filter (-vf yadif) before re-encoding. Color space and display metadata from the MPG source are generally not preserved in a raw HEVC stream.

Related Tools