Convert MPG to WEBA — Free Online Tool
Convert MPG video files to WEBA audio by extracting and re-encoding the audio track using the Opus codec — discarding the MPEG-1/2 video stream entirely. Ideal for pulling clean audio from VCD rips, broadcast recordings, or DVD-sourced MPG files for modern web playback.
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 alongside MP2 or MP3 audio. Since WEBA is a strictly audio-only container (a WebM variant), the video stream is completely discarded during this conversion — nothing is remuxed from it. The source audio, usually MP2-encoded, is decoded to raw PCM and then re-encoded using the Opus codec (libopus) at 128k bitrate by default. Opus is a modern, highly efficient lossy codec standardized for web use, and it delivers noticeably better quality than MP2 at equivalent or lower bitrates. The resulting WEBA file is a lightweight, streamable audio file with no video overhead.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In this browser-based tool, FFmpeg runs entirely via WebAssembly (ffmpeg.wasm) — no server is involved. The same command works identically on your local desktop installation of FFmpeg for files over 1GB. |
-i input.mpg
|
Specifies the input MPG file. FFmpeg will demux the MPEG-1/2 program or transport stream, making both the MPEG video and the MP2/MP3 audio tracks available for processing. |
-c:a libopus
|
Sets the audio encoder to libopus, which encodes the decoded MP2 audio from the MPG source into the modern Opus codec. Opus is the standard audio codec for the WEBA/WebM container and provides superior quality-per-bit compared to the original MP2 audio. |
-b:a 128k
|
Targets an audio bitrate of 128 kilobits per second for the Opus output. At 128k, Opus delivers perceptually transparent quality for most speech and music content — often matching or exceeding the quality of the original MP2 audio at higher bitrates. |
-vn
|
Disables video output entirely. This is essential for WEBA conversion because the format is audio-only — without this flag, FFmpeg would fail attempting to mux the MPEG-2 video into a WebM container, which does not support MPEG video codecs. |
output.weba
|
Defines the output filename with the .weba extension. FFmpeg uses this extension to automatically select the WebM container in audio-only mode, producing a file with the audio/webm MIME type suitable for direct embedding in modern web browsers. |
Common Use Cases
- Extracting the audio commentary or narration from a broadcast-captured MPG recording to publish as a podcast or audio article
- Pulling music or soundtrack audio from a VCD or DVD-sourced MPG file to create a web-playable Opus audio file
- Stripping the audio from MPG training or lecture videos for offline listening in browsers or Opus-compatible players
- Archiving just the audio portion of large MPG broadcast recordings to save storage space while retaining acceptable quality
- Preparing audio from legacy MPG news or documentary footage for embedding in a modern web page using the HTML5 audio element
- Converting MP2-encoded MPG audio to Opus for use in WebRTC or low-latency web streaming pipelines that expect the WEBA/Opus format
Frequently Asked Questions
The video stream — whether MPEG-1 or MPEG-2 encoded — is completely discarded. WEBA is an audio-only container and cannot store video data at all. Only the audio track from your MPG file is decoded and re-encoded into the output WEBA file. If preserving the video matters, you should choose a different output format.
Yes, this is a lossy-to-lossy transcode, so there is a generation of quality loss. The original MP2 audio in your MPG is decoded to raw PCM and then re-encoded with Opus. However, Opus at 128k is perceptually superior to MP2 at typical MPG bitrates (often 192k or lower), so the audible quality difference is often negligible or even a perceived improvement. For critical archival use, use the highest available bitrate (320k) to minimize loss.
Opus (libopus) is the default audio codec for WEBA because it is technically superior to Vorbis in nearly every practical scenario — it achieves better audio quality at lower bitrates, supports lower latency, and is the modern IETF-standardized successor to Vorbis. All current browsers that support the WEBA format also support Opus. Vorbis remains available as an alternative but is generally only used for legacy compatibility reasons.
Replace the value after -b:a in the command. For example, to use 256k bitrate instead of the default 128k, the command becomes: ffmpeg -i input.mpg -c:a libopus -b:a 256k -vn output.weba. Available options are 64k, 96k, 128k, 192k, 256k, and 320k. Higher bitrates preserve more audio detail, which matters most for music-heavy MPG content like VCD soundtracks.
Yes. On Linux or macOS, you can use a shell loop: for f in *.mpg; do ffmpeg -i "$f" -c:a libopus -b:a 128k -vn "${f%.mpg}.weba"; done. On Windows Command Prompt: for %f in (*.mpg) do ffmpeg -i "%f" -c:a libopus -b:a 128k -vn "%~nf.weba". This processes every MPG file in the current directory and outputs a matching WEBA file for each.
No. MPG does not natively support chapters or subtitles in the FFmpeg demuxer, and WEBA as an audio-only format cannot carry any of those features regardless. If your MPG file contains multiple audio tracks (uncommon but possible in MPEG-2 program streams), only the first audio track will be selected by default. You can specify a different track with the -map flag if needed, e.g., -map 0:a:1 to select the second audio stream.
Technical Notes
MPG files sourced from VCD or DVD typically encode audio as MPEG Layer II (MP2) at 192–384 kbps, occasionally as MP3 or AAC in MPEG-2 transport streams. All of these must be fully decoded before re-encoding to Opus, since WEBA has no compatibility with any MPEG audio codec. The -vn flag is mandatory for this output format — without it, FFmpeg would attempt to include the MPEG-2 video stream in the WebM container, which would fail because WebM does not support MPEG video codecs. The libopus encoder in FFmpeg operates in variable bitrate (VBR) mode by default when -b:a is specified as a target; this is generally preferable to CBR for file storage use cases. WEBA files use the .weba extension and the audio/webm MIME type, and they are natively playable in Chromium-based browsers and Firefox. Safari has historically had limited WEBA/Opus support, so if broad compatibility is required, consider converting to an M4A or MP3 format instead. No metadata from the MPG source (such as title or creation date embedded in the MPEG program stream) is mapped to the WEBA output by default.