Extract Audio from MPEG to AIF — Free Online Tool

Extract audio from MPEG video files and save it as a lossless AIF file, decoding the compressed MP2 or MP3 audio stream into uncompressed PCM — ideal for preserving every detail of your legacy broadcast or DVD-era footage's audio in a Mac-compatible archive format.

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 audio encoded with MP2 (MPEG-1 Audio Layer II) or sometimes MP3 or AAC, all of which are lossy compressed formats. When extracting to AIF, FFmpeg discards the video stream entirely and decodes the compressed audio into raw, uncompressed PCM data — specifically 16-bit big-endian PCM (pcm_s16be), which is AIF's default codec. This is a full decode, not a stream copy: the compressed audio is decompressed into uncompressed samples, resulting in a lossless AIF file that exactly represents the audio as it sounded in the MPEG. Because the source audio was already lossy-compressed in the MPEG, no new lossy degradation is introduced during this step, but the original compression artifacts from the MPEG's encoding remain preserved in the output.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program. In the browser-based tool, this runs via FFmpeg.wasm compiled to WebAssembly — no installation required and no files leave your machine.
-i input.mpeg Specifies the input MPEG file. FFmpeg will read the MPEG-1 or MPEG-2 container and automatically detect both the video stream (mpeg1video or mpeg2video) and the audio stream (typically MP2 in legacy MPEG files) contained within it.
-vn Disables video output entirely, telling FFmpeg to ignore the MPEG video stream and produce an audio-only output. Without this flag, FFmpeg would attempt to include video in the output, which AIF cannot contain.
-c:a pcm_s16be Decodes the MPEG's compressed MP2 (or other lossy) audio and re-encodes it as signed 16-bit big-endian PCM — the standard uncompressed audio codec for AIF files and the format natively expected by Apple audio software like Logic Pro and GarageBand.
output.aif Sets the output filename and tells FFmpeg to write an Audio Interchange File Format container. The .aif extension causes FFmpeg to use the AIFF muxer, which packages the pcm_s16be audio data into the chunk-based AIFF structure that Apple applications and professional DAWs recognize.

Common Use Cases

  • Archiving audio commentary or narration tracks from legacy MPEG broadcast recordings into a lossless format for long-term preservation on Mac-based post-production systems
  • Extracting the audio from DVD-era MPEG-2 video files to import into Logic Pro or GarageBand, which natively handle AIF without any additional conversion
  • Recovering high-quality audio from old MPEG home videos to use as clean source material for music or podcast production without introducing further lossy re-compression
  • Pulling the audio bed from MPEG broadcast footage to deliver to a sound designer who requires uncompressed AIF deliverables per studio specification
  • Converting MPEG training video audio into AIF for transcription workflows that require uncompressed audio input for maximum speech recognition accuracy
  • Isolating the MP2 audio from archival MPEG news or documentary footage and storing it as an AIF master so the audio can be re-encoded to any format later without generational loss

Frequently Asked Questions

No — the AIF output will not be higher quality than what existed in the MPEG source. MPEG files store audio in lossy formats like MP2, and those compression artifacts are baked into the data. What this conversion does is decode that compressed audio into an uncompressed PCM representation without adding any new lossy compression, so the AIF file is a lossless snapshot of the MPEG audio exactly as it was. Think of it as the ceiling, not the floor — you preserve what was there, but cannot recover what lossy encoding removed.
MPEG audio is heavily compressed — MP2 at 192 kbps is roughly a 6:1 reduction compared to CD-quality uncompressed audio. When FFmpeg decodes that stream into AIF's uncompressed pcm_s16be format, it expands back to full PCM size: approximately 10 MB per minute of stereo audio at 44.1 kHz. A 100 MB MPEG video file might produce a 50–200 MB AIF depending on audio length, because you are now storing raw samples rather than compressed data.
Yes. FFmpeg reads the channel configuration from the MPEG audio stream — whether it is mono, stereo, or in some broadcast cases multi-channel — and writes the same layout into the AIF file. The pcm_s16be codec used in this command is channel-agnostic and will carry over whatever channel count the source MP2 or MP3 stream contained. No downmixing or upmixing occurs unless you explicitly add channel mapping flags.
Yes, the command works regardless of whether the MPEG file contains MP2, MP3, or AAC audio. FFmpeg automatically detects the audio codec in the MPEG container and decodes it to PCM before writing to AIF. The output will always be uncompressed pcm_s16be AIF regardless of which audio codec the source used, so you do not need to modify the command for different MPEG audio variants.
Replace pcm_s16be in the command with another AIF-compatible PCM codec: pcm_s24be for 24-bit, pcm_s32be for 32-bit integer, or pcm_f32be and pcm_f64be for 32-bit and 64-bit floating point respectively. For example, to produce a 24-bit AIF — the preferred format for professional audio delivery — run: ffmpeg -i input.mpeg -vn -c:a pcm_s24be output.aif. Note that the source MP2 audio in most MPEGs was encoded at 16-bit resolution, so 24-bit output adds bit depth headroom but does not recover detail that was not in the source.
Yes. On macOS or Linux, you can loop over files in a directory with: for f in *.mpeg; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.mpeg}.aif"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -vn -c:a pcm_s16be "%~nf.aif". Each MPEG file will be processed sequentially, producing a matching AIF file with the same base filename. This is especially useful for archiving large collections of legacy MPEG recordings.

Technical Notes

AIF uses big-endian byte ordering for its PCM data, which is reflected in the codec name pcm_s16be (signed 16-bit big-endian). This is native to Apple's original architecture and is why AIF enjoys first-class support in Logic Pro, GarageBand, Final Cut Pro, and the macOS Audio MIDI Setup utility. The MPEG container does not store audio metadata like track titles or artist tags in a standardized way — broadcast MPEG streams may carry some metadata in their program stream headers, but FFmpeg typically does not map this to AIF ID3 or AIFF chunk metadata, so the output AIF will likely have no embedded metadata tags. The sample rate of the output AIF is inherited directly from the MPEG audio stream; most MPEG-1 files use 44.1 kHz while MPEG-2 broadcast content often uses 48 kHz, and FFmpeg preserves this without resampling. If you need a specific sample rate for a DAW session or broadcast delivery, add -ar 48000 (or another value) to the command. Because AIF does not support multiple audio tracks, only the first audio stream in the MPEG will be extracted.

Related Tools