Extract Audio from MPEG to OGA — Free Online Tool

Extract audio from MPEG video files and save it as an OGA file encoded with the Vorbis codec — an open, royalty-free format ideal for web and media player use. This tool strips the MPEG-1/2 video stream entirely and re-encodes the MP2 or MP3 audio track into a high-quality Ogg Vorbis stream, all inside your browser.

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

MPEG files typically carry MP2 or MP3 audio alongside MPEG-1 or MPEG-2 video. Because OGA uses the Ogg container which does not support MPEG audio streams natively, the audio cannot simply be remuxed — it must be decoded and re-encoded. FFmpeg decodes the source audio track and re-encodes it using the libvorbis encoder, producing a Vorbis audio stream wrapped in an Ogg container with a .oga extension. The video stream is discarded entirely using the -vn flag, keeping output file sizes small and focused purely on audio.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles the decoding of the MPEG container, audio transcoding, and writing of the Ogg output. In the browser, this runs via FFmpeg.wasm compiled to WebAssembly.
-i input.mpeg Specifies the input MPEG file. FFmpeg will read and demux the MPEG-1/2 container, making the video and audio streams (typically MPEG-2 video and MP2 audio) available for processing.
-vn Disables video output entirely, telling FFmpeg to ignore the MPEG-1 or MPEG-2 video stream. Since OGA is an audio-only format, this flag ensures no video data is processed or written to the output.
-c:a libvorbis Selects the libvorbis encoder to re-encode the decoded MPEG audio track as a Vorbis audio stream. Vorbis is required here because the Ogg container used by OGA cannot natively encapsulate the MP2 audio found in MPEG files.
-q:a 4 Sets the Vorbis variable bitrate quality level to 4 on a scale of 0–10, which targets approximately 128–160 kbps. This is a good general-purpose setting that balances audio fidelity against file size when downconverting from MPEG's typically higher-bitrate MP2 audio.
output.oga Defines the output filename and instructs FFmpeg to write an Ogg container with the .oga extension, signaling that the file contains audio-only content (Vorbis) rather than a mixed audio/video Ogg stream.

Common Use Cases

  • Recovering the audio commentary or narration from old MPEG broadcast recordings or DVD rips for use in open-source media projects
  • Converting MPEG soundtrack files from legacy video archives into OGA for playback in Firefox or other browsers that prefer open Ogg-based formats
  • Extracting music or sound effects from MPEG video game cutscenes to use in royalty-free or open-licensed game projects requiring Vorbis audio
  • Archiving audio from MPEG training videos or lectures in an open format that avoids patent-encumbered codecs like MP2 or MP3
  • Stripping audio from MPEG broadcast captures to create standalone audio files for podcast editing or audio mixing workflows
  • Preparing OGA audio assets for HTML5 web applications that use the Web Audio API with Ogg Vorbis for broad open-format compatibility

Frequently Asked Questions

Yes, some quality loss is technically possible because this conversion involves two lossy stages: the source MPEG file already used a lossy codec (typically MP2 at 192k or MP3), and re-encoding to Vorbis introduces another generation of lossy compression. In practice, at the default quality setting of -q:a 4 (roughly equivalent to 128–160 kbps), the result is transparent for most listeners. If the source MP2 track was high bitrate, the Vorbis output will faithfully represent the audio that was already there.
The Ogg container format does not support MP2 or standard MPEG audio streams as native encapsulated codecs — it is designed primarily for Vorbis, FLAC, and Opus streams. This means the audio must be fully decoded and re-encoded into a Vorbis stream to be valid inside an Ogg container. There is no lossless remux path from MPEG MP2 audio to OGA; transcoding is unavoidable.
Adjust the -q:a value in the command. The scale runs from 0 (lowest quality, smallest file) to 10 (highest quality, largest file), with 4 as the default giving a good balance. For example, changing the command to 'ffmpeg -i input.mpeg -vn -c:a libvorbis -q:a 7 output.oga' will produce a higher-bitrate Vorbis stream, typically around 190–220 kbps. For archival purposes where file size is not a concern, -q:a 9 or 10 is recommended.
Yes. On Linux or macOS you can use a shell loop: 'for f in *.mpeg; do ffmpeg -i "$f" -vn -c:a libvorbis -q:a 4 "${f%.mpeg}.oga"; done'. On Windows PowerShell, use: 'Get-ChildItem *.mpeg | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a libvorbis -q:a 4 ($_.BaseName + ".oga") }'. This is especially useful for processing large MPEG archives that exceed the 1GB browser limit.
Standard MPEG files do not support embedded chapter metadata, so no chapters will be lost in this conversion. Basic metadata tags such as title or artist embedded in the MPEG container may or may not transfer, depending on how they were stored. OGA via the Ogg container supports Vorbis Comment metadata tags, and FFmpeg will attempt to map any recognized metadata fields. You can add or overwrite tags explicitly in the command using -metadata title='My Title' before the output filename.
OGA is a file extension specifically indicating an Ogg container holding audio-only content (typically Vorbis or FLAC), while .ogg is a more general extension used historically for both audio and video Ogg streams. Most modern media players including VLC, Firefox, and foobar2000 treat them identically. If a player does not recognize the .oga extension, simply renaming the file to .ogg will resolve playback without changing any of the actual audio data.

Technical Notes

MPEG files produced for broadcast or DVD commonly carry MP2 audio at 192–256 kbps, a codec that was dominant in the 1990s and early 2000s but is now largely obsolete outside legacy systems. Vorbis, the default codec for OGA, is a modern psychoacoustic codec that generally achieves better perceived quality than MP2 at equivalent or lower bitrates, so the transcoded output can sound cleaner despite the generation loss. The Ogg container used by OGA supports Vorbis Comment tags for rich metadata and chapter point storage, though chapter data cannot be sourced from MPEG since MPEG does not carry that information. One practical limitation to note: MPEG files with multiple audio tracks (e.g., multilingual DVD rips) will only have the first audio track extracted by default; to select a specific track, add '-map 0:a:1' (for the second audio track) to the command before the output filename. The OGA format has no support for video streams, making it strictly suitable for audio-only distribution.

Related Tools