Extract Audio from MPG to AIF — Free Online Tool
Extract audio from MPG video files and save it as a lossless AIF file using PCM encoding. This conversion strips the lossy MP2 or MP3 audio track from MPEG-1/2 video and reencodes it as uncompressed 16-bit big-endian PCM, the native format for high-quality audio work on macOS.
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 audio encoded as MP2 (MPEG-1 Audio Layer II), a lossy compressed format commonly used in VCD and DVD production. During this conversion, FFmpeg discards the video stream entirely and decodes the compressed audio, then re-encodes it into PCM signed 16-bit big-endian (pcm_s16be) — the uncompressed audio codec used in AIF files. Because the source audio is lossy MP2, this is a lossy-to-lossless pipeline in the container sense: the AIF output is truly uncompressed PCM, but the audio fidelity is bounded by the quality of the original MP2 encoding. No further generation loss is introduced beyond what already existed in the MPG source.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, which is the underlying engine performing the audio extraction and codec conversion. In the browser-based version of this tool, this runs via FFmpeg.wasm compiled to WebAssembly. |
-i input.mpg
|
Specifies the input MPG file. FFmpeg reads the MPEG-1/2 Program Stream, identifying both the video stream (mpeg1video or mpeg2video) and the audio stream (typically MP2) contained within it. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore and not include the MPEG-1/2 video stream in the output. This is essential for audio extraction — without it, FFmpeg would attempt to encode video into the AIF container, which is audio-only and does not support video. |
-c:a pcm_s16be
|
Sets the audio codec to signed 16-bit big-endian PCM, which is the standard uncompressed audio encoding used in AIF files. This decodes the lossy MP2 audio from the MPG and re-encodes it as raw, uncompressed audio samples in the byte order required by the AIF format specification. |
output.aif
|
Specifies the output filename with the .aif extension, which tells FFmpeg to wrap the uncompressed PCM audio in an Audio Interchange File Format container — Apple's standard lossless audio format compatible with macOS audio applications and professional DAWs. |
Common Use Cases
- Extracting the audio commentary or dialogue from archived VCD or DVD-sourced MPG recordings for use in a macOS audio editing project in Logic Pro or GarageBand
- Pulling the audio from MPEG-2 broadcast recordings for transcription or subtitling workflows that require uncompressed AIF input
- Archiving the audio from old MPG home videos as uncompressed AIF files to preserve the decoded audio at its maximum available quality without further compression
- Preparing music or sound design stems extracted from MPG multimedia content for import into professional Digital Audio Workstations that expect AIF format
- Converting MPG audio tracks from legacy educational or training video content into AIF for use in Apple's multimedia tools on macOS
- Stripping audio from MPEG-1 video game cutscenes or demo recordings for use in audio restoration or upsampling workflows
Frequently Asked Questions
No. The AIF file will be uncompressed PCM, but it cannot recover quality that was already lost when the audio was originally encoded as MP2 inside the MPG container. What you gain is a lossless container that perfectly preserves every sample of the decoded MP2 output — meaning no additional quality is lost in further editing or re-export cycles from this point forward.
MPG stores audio as MP2, a compressed format that can reduce audio data by a factor of 6 or more. AIF with PCM encoding stores every audio sample without compression, so a 5-minute audio track at CD quality (44.1 kHz, stereo) will be roughly 50 MB uncompressed versus a few MB as MP2. This size increase is expected and is the trade-off for having a fully uncompressed, edit-ready audio file.
The output uses pcm_s16be — signed 16-bit big-endian PCM — which is the standard default codec for AIF files and is universally supported across macOS applications. If your source MPG has 24-bit audio or you need higher precision, you could substitute pcm_s24be in the FFmpeg command by changing '-c:a pcm_s16be' to '-c:a pcm_s24be', though most MP2-encoded MPG audio will not benefit from the additional bit depth.
Yes. FFmpeg preserves the original sample rate from the MPG audio stream — commonly 44,100 Hz for VCD content or 48,000 Hz for broadcast and DVD material — and writes it directly into the AIF file without resampling. If you need a specific sample rate for a particular workflow, you can add '-ar 44100' or '-ar 48000' to the FFmpeg command to force a specific output rate.
On macOS or Linux, you can loop over files in a directory with a shell command: 'for f in *.mpg; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.mpg}.aif"; done'. On Windows Command Prompt, use: 'for %f in (*.mpg) do ffmpeg -i "%f" -vn -c:a pcm_s16be "%~nf.aif"'. This applies the same extraction and PCM encoding to every MPG file in the current folder.
MPG containers have limited metadata support compared to modern formats, and AIF metadata handling in FFmpeg is also minimal. Basic tags that exist in the MPG may be passed through, but there is no guarantee all fields will map correctly to AIF's IFF chunk metadata structure. For professional workflows requiring specific metadata, it is recommended to tag the AIF file after conversion using a dedicated audio tagging tool such as Kid3 or Mp3tag.
Technical Notes
MPG (MPEG-1/2 Program Stream) encodes audio almost exclusively as MP2 (MPEG-1 Audio Layer II) at bitrates typically between 128 kbps and 384 kbps, though some MPG files — particularly those muxed from DVD sources — may contain AC-3 or even MP3 audio. FFmpeg auto-detects the input audio codec and decodes it regardless of which MPEG audio variant is present. The output codec pcm_s16be is 16-bit signed PCM in big-endian byte order, which is the byte order native to the AIF format specification (a legacy of Motorola 68k architecture used in early Macs). Unlike WAV, which uses little-endian PCM (pcm_s16le), AIF's big-endian encoding means the file is not interchangeable at the raw byte level even if the audio content is identical. The AIF format does not support lossy compression, multiple audio tracks, chapters, or embedded subtitles — all of which are also absent or limited in MPG, so no content is lost beyond the stripped video stream. One known limitation: if the MPG source contains a variable frame rate or has a malformed audio PTS (Presentation Timestamp), FFmpeg may produce slight audio drift; adding '-avoid_negative_ts make_zero' can help in edge cases with problematic broadcast-sourced MPG files.