Extract Audio from MPG to ALAC — Free Online Tool
Extract audio from MPG video files and save it as ALAC (Apple Lossless Audio Codec) in an M4A container. Unlike lossy extraction formats, ALAC preserves every bit of the decoded audio signal — ideal when you want the highest-quality archive of audio originally encoded as MP2 or AAC inside an MPEG-1/2 stream.
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 store audio using lossy codecs — most commonly MPEG Layer 2 (MP2), but sometimes MP3 or AAC depending on the source. During this conversion, FFmpeg discards the video stream entirely and decodes the audio to raw PCM. That raw audio is then re-encoded using Apple's ALAC codec and wrapped in an MPEG-4 (M4A) container. Because ALAC is lossless, the output is a perfect reconstruction of the decoded audio — meaning no additional quality is lost beyond what was already introduced when the MPG was originally encoded. The result is a bit-for-bit reproducible audio file that is significantly larger than the original MPG audio track but compatible with Apple devices, iTunes, and any ALAC-aware player.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program. In the browser-based version of this tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — no data is sent to a server. When running this command on your desktop, this calls your locally installed FFmpeg binary. |
-i input.mpg
|
Specifies the input file — an MPG container holding MPEG-1 or MPEG-2 video alongside a lossy audio track (most commonly MP2). FFmpeg probes this file to identify all streams before processing. |
-vn
|
Disables video output entirely, discarding the MPEG-1 or MPEG-2 video stream. This is essential because M4A containers cannot hold video, and it also avoids wasting processing time encoding video that isn't needed for audio extraction. |
-c:a alac
|
Instructs FFmpeg to encode the audio stream using Apple's ALAC (Apple Lossless Audio Codec). The MPG audio (typically MP2) is decoded to raw PCM and then losslessly re-encoded as ALAC, ensuring no additional quality degradation beyond what the original MPG compression introduced. |
-c:a alac
|
A duplicate of the previous '-c:a alac' flag — this is redundant and has no additional effect. FFmpeg simply applies the same ALAC codec instruction twice. You can omit this second instance when running the command locally without any change to the output. |
output.m4a
|
Defines the output file name and format. The .m4a extension tells FFmpeg to use an MPEG-4 audio container, which is the standard wrapper for ALAC files and ensures compatibility with Apple Music, iTunes, iOS devices, and other ALAC-capable players. |
Common Use Cases
- Archiving the audio from old VCD or DVD-sourced MPG recordings as a lossless master before creating smaller distribution copies
- Extracting broadcast-quality MP2 audio from an MPEG-2 video capture (such as from a TV tuner card) into a format editable in Logic Pro or GarageBand without introducing further compression artifacts
- Pulling the audio track from an MPG home movie to preserve in an Apple ecosystem library via iTunes or the Music app on macOS/iOS
- Creating a lossless audio reference file from an MPG video interview or documentary segment to use as a transcription or editing source
- Extracting the audio from MPEG-1 VCD files to archive concert or performance recordings at the highest recoverable quality before the source media degrades
- Converting MPG training or instructional video audio to ALAC so editors can sync it with higher-quality video in Final Cut Pro
Frequently Asked Questions
No — ALAC is lossless, but that means it losslessly captures the already-decoded output of the lossy MPG audio codec (usually MP2). The original lossy compression artifacts that existed in the MPG are baked in permanently. What ALAC guarantees is that no additional quality is lost during this extraction step, making it the best possible archive of whatever audio quality the MPG contained.
MPEG-2 audio (MP2) in an MPG file is typically encoded at 128–192 kbps using lossy compression that discards audio data the encoder deems inaudible. ALAC, by contrast, losslessly stores the full decoded waveform using lossless compression — similar to how ZIP compresses files without removing data. A typical MPG audio track at 192 kbps MP2 might expand 5–8x in size as ALAC, depending on the audio content's complexity.
MPG files have very limited metadata support due to the constraints of the MPEG-1/2 container format — they rarely carry meaningful ID3-style tags. The M4A/ALAC output container does support rich metadata including title, artist, album, and chapter markers, but this tool will only transfer whatever metadata FFmpeg can extract from the source MPG, which is often none. You would typically add tags manually after conversion using a tool like MusicBrainz Picard or iTunes.
ALAC has been open-sourced by Apple since 2011, so support has expanded significantly beyond the Apple ecosystem. VLC, foobar2000, ffplay, Plex, and most modern media players handle ALAC in M4A containers without issue. However, some older Android devices, car stereos, and non-Apple portable players may not support it natively. If broad device compatibility matters more than lossless quality, consider extracting to FLAC instead.
The command contains '-c:a alac' twice, which is redundant but harmless. FFmpeg processes flags in order, and the second instance simply overwrites the first with the same value. The effective instruction is still to encode the audio using the ALAC codec. You can safely remove one of the duplicate flags if you run the command locally — 'ffmpeg -i input.mpg -vn -c:a alac output.m4a' is the clean equivalent.
Yes — on the command line you can use a shell loop to process multiple files. On Linux or macOS, the command 'for f in *.mpg; do ffmpeg -i "$f" -vn -c:a alac "${f%.mpg}.m4a"; done' will iterate through all MPG files in the current directory and produce a matching M4A for each. On Windows PowerShell, use 'Get-ChildItem *.mpg | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a alac ($_.BaseName + ".m4a") }'. The browser-based tool on this page processes one file at a time.
Technical Notes
MPG audio is almost always MP2 (MPEG-1 Audio Layer II) in MPEG-1/VCD sources, while MPEG-2 program streams (such as DVD-sourced MPG files) may carry MP2, AC-3 (Dolby Digital), or occasionally AAC. This tool and the FFmpeg command handle all of these automatically — FFmpeg detects the audio codec in the MPG stream, decodes it to PCM, and re-encodes to ALAC regardless of the original MPG audio codec. The '-vn' flag is critical: without it, FFmpeg would attempt to include the video stream in the M4A output, which is unsupported by the M4A container and would cause an error. ALAC encodes at the same bit depth and sample rate as the decoded source, so if the MPG audio is 16-bit/48 kHz (common in broadcast MPEG-2), the ALAC output will also be 16-bit/48 kHz. There are no quality settings to configure for ALAC — it is always lossless, and file size is determined entirely by the audio content's complexity and duration. One known limitation: MPG files with multiple audio tracks (common in multi-language DVD rips) will have only the first audio stream extracted; FFmpeg's default stream selection picks the first audio track unless you specify '-map' flags manually.