Extract Audio from MPG to OGG — Free Online Tool

Extract audio from MPG video files and save it as OGG Vorbis — converting the legacy MP2 audio typically found in MPEG-1/2 streams into a modern, open-source Vorbis audio file. Ideal for pulling audio from VCD or DVD-sourced footage into a format widely supported by open-source media players and Linux systems.

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 (based on MPEG-1 or MPEG-2) most commonly carry audio encoded as MP2 (MPEG-1 Audio Layer II), though some MPG files contain MP3 or AAC audio. During this conversion, the video stream is completely discarded using the -vn flag — no video decoding or encoding takes place. The MP2 audio is then decoded from the MPEG program stream and re-encoded using the libvorbis encoder into an OGG container. This means the audio is transcoded (decoded then re-encoded), introducing a generation of lossy compression. The output quality is controlled by Vorbis's variable bitrate quality scale, where a value of 4 targets approximately 128–160 kbps and delivers clean, transparent audio for most source material. The OGG container itself is a free, open format from Xiph.Org, distinct from the Vorbis codec it carries.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg command-line tool. In the browser-based version of this tool, the same open-source FFmpeg engine runs locally via WebAssembly (FFmpeg.wasm), so no files leave your device.
-i input.mpg Specifies the input file — an MPG container holding an MPEG-1 or MPEG-2 video stream alongside an audio stream (typically MP2). FFmpeg parses the MPEG program stream structure to identify and demux both streams.
-vn Disables video output entirely, discarding the MPEG-1/2 video stream from the MPG. This is the key flag that makes this an audio extraction — no video decoding occurs, which keeps processing fast even for long MPG files.
-c:a libvorbis Selects the libvorbis encoder to transcode the decoded MP2 audio into the Vorbis format. Vorbis is an open, patent-free codec developed by Xiph.Org and is the default and most widely supported audio codec for the OGG container.
-q:a 4 Sets the Vorbis variable bitrate quality level to 4 on a 0–10 scale, targeting approximately 128–160 kbps. This default provides transparent audio quality for typical MPG source material (speech, film audio, broadcast content) without producing unnecessarily large files.
output.ogg Defines the output filename and tells FFmpeg to wrap the encoded Vorbis audio stream in an OGG container. The .ogg extension is the standard for Vorbis audio and ensures compatibility with media players and platforms that recognize this open format.

Common Use Cases

  • Extracting the audio commentary or soundtrack from a VCD rip stored as an MPG file to archive it separately as an open-format audio file
  • Pulling the audio track from broadcast-recorded MPG footage to use in a video editing project that requires OGG Vorbis input (common in Godot, Blender, or open-source game engines)
  • Converting the MP2 audio from DVD-sourced MPG files into OGG for playback on Linux systems and media players like VLC or Rhythmbox that prefer open formats
  • Stripping audio from old home video MPG files recorded by early digital camcorders to create a standalone audio memento without re-encoding video
  • Preparing audio from MPG training or educational videos for use in open-source e-learning platforms that accept OGG Vorbis but not MP2 or raw MPEG audio
  • Archiving the audio from MPEG-2 broadcast recordings into a more compact and metadata-friendly OGG file that supports embedded chapter and tag information

Frequently Asked Questions

Yes, some quality loss is unavoidable because this conversion involves transcoding — the MP2 audio in the MPG is fully decoded and then re-encoded as Vorbis. Both formats are lossy, so you are introducing a second generation of lossy compression. In practice, at the default quality setting of -q:a 4 (targeting roughly 128–160 kbps), the result sounds transparent for most speech and music content, but audiophiles working with high-fidelity source material may notice subtle degradation compared to the original MP2 stream.
MPG files bundle both a video stream and an audio stream together, so stripping the video alone makes the output dramatically smaller than the input MPG. The OGG file's size relative to the original audio portion depends on the Vorbis quality setting — at -q:a 4, Vorbis typically produces a comparable or slightly smaller file than a standard 192 kbps MP2 stream. If the source MPG has a very low-bitrate MP2 track, the OGG output might actually be slightly larger because Vorbis encodes at a minimum quality floor.
MPG files have limited and inconsistently supported metadata, usually stored in system-layer headers or ancillary streams. FFmpeg will attempt to map any recognized metadata (such as title or artist fields) into OGG's Vorbis Comment tags, but MPG metadata is often absent or incomplete in practice. The good news is that OGG has robust metadata support, so you can easily add or edit tags in the output file afterward using tools like EasyTag or MusicBrainz Picard.
Yes — OGG Vorbis is one of the natively supported audio formats in Godot Engine and is a common choice for background music and sound effects in open-source games. For web use, OGG Vorbis is supported in Firefox and Chrome but is not supported in Safari on iOS or macOS without a fallback. If broad browser compatibility is essential, consider converting to MP3 or AAC instead; but for Linux-centric or game engine workflows, OGG Vorbis is an excellent target format.
Adjust the -q:a value to change the Vorbis quality level. The scale runs from 0 (lowest, roughly 64 kbps) to 10 (highest, roughly 500 kbps), with 4 being the default and a good balance for most content. For example, use 'ffmpeg -i input.mpg -vn -c:a libvorbis -q:a 6 output.ogg' for higher quality near 192 kbps, or '-q:a 2' for a smaller file around 96 kbps. Unlike MP3's -q:a flag, Vorbis quality levels are not directly mapped to fixed bitrates — they target a variable bitrate range, so actual file size will vary with audio complexity.
Yes. On Linux or macOS, you can run a shell loop: 'for f in *.mpg; do ffmpeg -i "$f" -vn -c:a libvorbis -q:a 4 "${f%.mpg}.ogg"; done'. On Windows Command Prompt, use: 'for %f in (*.mpg) do ffmpeg -i "%f" -vn -c:a libvorbis -q:a 4 "%~nf.ogg"'. This processes each MPG file in the current directory and outputs a matching OGG file with the same base name, which is especially useful when archiving a collection of VCD or broadcast recordings.

Technical Notes

MPG is a multiplexed container format wrapping MPEG-1 or MPEG-2 program streams, and its default audio codec MP2 (MPEG-1 Audio Layer II) is an older perceptual codec that predates MP3. When demuxing the audio from an MPG, FFmpeg must parse the MPEG program stream (PS) or transport stream (TS) structure, which can occasionally cause issues with malformed or poorly muxed files — adding '-fflags +genpts' to the command may help if you encounter timestamp errors. The libvorbis encoder used here is Xiph.Org's reference implementation and produces high-quality variable-bitrate output well-suited to music and speech. Notably, OGG supports multiple audio tracks and chapter markers in its container spec, but since the source MPG typically contains a single audio stream and no chapter data, these features are not exercised in this conversion. OGG Vorbis files are not natively supported by iTunes, Windows Media Player (without plugins), or Apple devices, so consider your target playback environment before choosing this format. If lossless extraction is a priority, the libopus or FLAC codec can be specified instead of libvorbis within the OGG container, though FLAC in OGG (as opposed to native FLAC) has limited player support.

Related Tools