Convert MPG to FLV — Free Online Tool

Convert MPG files (MPEG-1/2 video with MP2 audio) to FLV format using H.264 video and AAC audio — the codec combination that powered web video delivery through Adobe Flash Player. This tool runs entirely in your browser via WebAssembly, so your files never leave your device.

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 typically contain MPEG-2 video and MP2 audio — codecs designed for broadcast television, VCD, and DVD authoring in the 1990s and 2000s. Converting to FLV replaces the MPEG-2 video stream with H.264 (libx264), a far more efficient modern codec that achieves similar visual quality at significantly smaller file sizes. The MP2 audio track is transcoded to AAC, which is the standard audio codec for Flash-era FLV files and offers better compression than MP2 at equivalent bitrates. Both the video and audio streams must be fully re-encoded during this conversion — there is no stream-copy shortcut since neither codec is shared between the two containers. The result is an FLV file compatible with Flash Player-based players, legacy web video pipelines, and streaming infrastructure that expects this container format.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles decoding the MPEG-2 video and MP2 audio from the MPG container and re-encoding them into the FLV output.
-i input.mpg Specifies the input MPG file. FFmpeg will detect the MPEG-1 or MPEG-2 video codec and the MP2 (or other) audio codec inside the container automatically, preparing them for re-encoding.
-c:v libx264 Tells FFmpeg to re-encode the video stream using the libx264 encoder, replacing the MPEG-2 video from the MPG source with H.264 — a modern, efficient codec that is the standard video format for FLV files compatible with Flash Player 9 and later.
-c:a aac Transcodes the audio stream to AAC, replacing the MP2 audio typically found in MPG broadcast or DVD files. AAC is the expected audio codec inside FLV containers and is not natively supported in MPEG-2 program streams, making this transcoding step mandatory.
-crf 23 Sets the Constant Rate Factor for the H.264 encoder to 23, which is the libx264 default and produces a good balance of visual quality and file size. Lower values (e.g., 18) increase quality and file size; higher values (e.g., 28) reduce both — useful for compressing large MPEG-2 broadcast recordings significantly.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second. This is appropriate for stereo audio from broadcast or VCD MPG sources — sufficient to cleanly represent the audio that was originally encoded in MP2 at similar or lower bitrates.
output.flv Defines the output filename and tells FFmpeg to use the FLV container format. FFmpeg infers the FLV container from the .flv extension and wraps the H.264 video and AAC audio streams accordingly, producing a file compatible with Flash-based players and legacy streaming infrastructure.

Common Use Cases

  • Uploading archived broadcast or VCD footage to older Flash-based video platforms or content management systems that only accept FLV input
  • Preparing MPEG-2 recordings from a DVD ripper or broadcast capture card for use in legacy Flash video players embedded in older websites
  • Converting MPG training or educational videos into FLV for use with ActionScript-based e-learning platforms built on Adobe Flash
  • Reducing the file size of bulky MPEG-2 video files from security cameras or broadcast archives by re-encoding to the more efficient H.264 codec inside an FLV container
  • Ingesting MPG footage into video editing or transcoding workflows that use FLV as an intermediate or delivery format for Flash-based streaming servers like Wowza or Red5
  • Preserving compatibility with kiosk or display systems that use embedded Flash players and require FLV-formatted video assets

Frequently Asked Questions

MPEG-2, the video codec used in most MPG files, was designed in the early 1990s and is significantly less efficient than H.264 by modern standards. H.264 (libx264) uses more sophisticated compression techniques — including better motion estimation and transform coding — that can achieve the same perceived visual quality at roughly half the bitrate. Additionally, AAC audio is more efficient than the MP2 audio track commonly found in MPG files, contributing further to the smaller output size.
Yes — both the video and audio must be fully re-encoded during this conversion, which introduces some generation loss since MPG is already a lossy format. However, with the default CRF value of 23 used by this tool, the H.264 output is generally considered visually transparent for most broadcast and VCD-quality MPEG-2 sources. If your source MPG has high quality settings, you can lower the CRF value (e.g., to 18) for better fidelity at the cost of a larger file size.
Not natively — Adobe Flash Player was officially discontinued at the end of 2020, and modern browsers no longer support it. FLV files can still be played using standalone media players like VLC, and some server-side streaming platforms and legacy systems still ingest or serve FLV. This conversion is most relevant for workflows tied to older infrastructure or for use with software that specifically requires the FLV container, rather than for general web playback.
No — the FLV container does not support embedded subtitles or chapter markers, and neither does MPG in any meaningful way. Neither format carries these features, so nothing of that kind will be lost or carried over. If your MPG source has multiple audio tracks, be aware that FLV also does not support multiple audio tracks, so only the first (or default) audio stream will be included in the output.
The video quality is controlled by the -crf flag, which accepts values from 0 (lossless) to 51 (lowest quality), with 23 as the default. Lower CRF values produce higher quality and larger files — for archiving MPEG-2 broadcast content, a CRF of 18 is often a good balance. To change it, replace '23' in the command with your desired value: for example, use '-crf 18' for higher quality output from a high-bitrate MPG source.
The single-file command shown converts one file at a time, but you can batch process using a shell loop. On Linux or macOS, run: for f in *.mpg; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.mpg}.flv"; 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.flv". This is especially useful for batch-converting archived broadcast MPG files.

Technical Notes

MPG files built on MPEG-2 typically carry a fixed bitrate or CBR-encoded video stream, which contrasts with H.264's default variable bitrate (VBR) encoding controlled by the CRF parameter. During conversion, libx264 will analyze each frame and allocate bits based on complexity, meaning simple scenes get fewer bits and complex scenes get more — a more efficient approach than the fixed-rate MPEG-2 stream. The AAC audio codec used in the output is natively supported inside the FLV container as of Flash Player 9 Update 3, making it the correct and expected audio codec for this container. MP2 audio, found in many broadcast and DVD-sourced MPG files, is not supported inside FLV, making transcoding to AAC mandatory. FLV with H.264 video uses the codec tag 'AVC' internally, sometimes referred to as F4V-style FLV. Be aware that FLV has a 4GB file size limitation inherited from its 32-bit timestamp design, which makes it unsuitable for very long video files — if your MPG source is longer than a few hours at high quality, consider MP4 as an alternative output format. No metadata beyond basic stream properties is preserved during this conversion, as neither MPG nor FLV offer robust metadata container support.

Related Tools