Extract Audio from MPG to M4A — Free Online Tool

Extract audio from MPG video files and save it as M4A, re-encoding the original MP2 or MPEG audio stream to AAC — the modern, efficient codec used by Apple iTunes, iOS, and streaming platforms. Ideal for pulling audio from VCD, DVD, or broadcast MPEG recordings into a format that plays natively on any Apple device or modern 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

MPG files typically carry audio encoded as MP2 (MPEG-1 Audio Layer II), the legacy codec common to VCD and broadcast MPEG content, though some MPG files use MP3 or AAC. M4A uses the MPEG-4 container and defaults to AAC audio. Because MP2 and AAC are different codecs, the audio must be fully decoded and then re-encoded — this is not a lossless remux. FFmpeg reads the MPG, discards the video stream entirely using the -vn flag, decodes the MP2 audio, and re-encodes it to AAC at 128k bitrate, wrapping the result in an MPEG-4 (.m4a) container. The result is a compact, widely compatible audio file with no video data.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, the open-source multimedia processing engine that powers this conversion both in the browser (via WebAssembly) and on your local desktop.
-i input.mpg Specifies the input file — an MPG container holding MPEG-1 or MPEG-2 video alongside MP2, MP3, or AAC audio, as commonly produced by VCD, DVD, or broadcast MPEG encoding.
-vn Disables video output entirely, preventing FFmpeg from including the MPEG-1 or MPEG-2 video stream in the M4A file. This is mandatory because the M4A container is audio-only and cannot hold MPEG video data.
-c:a aac Instructs FFmpeg to encode the output audio using the AAC codec, transcoding from the source MP2 audio in the MPG file. AAC is the native and default audio codec for M4A files and is required for compatibility with iTunes and iOS devices.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second, a standard quality level suitable for speech and general music. This can be increased to 192k or 256k for higher fidelity when the source MPG contains high-quality broadcast or music audio.
-vn A second instance of the video-disable flag positioned before the output filename, reinforcing that no video streams should be written to the M4A output. This is redundant with the earlier -vn but harmless — a single -vn is technically sufficient for this conversion.
output.m4a Defines the output file as an M4A file — an MPEG-4 audio container that wraps the newly encoded AAC stream. The .m4a extension signals to iTunes, iOS, and other players that this is an audio-only MPEG-4 file, ensuring correct handling and metadata support.

Common Use Cases

  • Extracting the audio commentary or dialogue track from a VCD or DVD-sourced MPG recording to archive or edit separately
  • Converting MPEG broadcast recordings captured from a TV tuner card into M4A files for playback in iTunes or on an iPhone without video overhead
  • Pulling music or soundtrack audio from MPEG-1 or MPEG-2 video files to add to an Apple Music library or sync to an iPod or iOS device
  • Archiving the audio from old VCD-format home videos encoded as MPG files into a modern, space-efficient M4A format for long-term storage
  • Preparing audio extracted from broadcast MPEG footage for podcast editing, where the MP2 source needs to be converted to a DAW-compatible AAC file
  • Stripping audio from MPEG-2 video files produced by professional broadcast equipment to distribute as standalone audio files via web players that support M4A natively

Frequently Asked Questions

Yes, some quality loss is expected because this conversion involves decoding the original MP2 audio and re-encoding it to AAC — a generation of lossy compression is added. However, at 128k bitrate, AAC is generally considered to sound better than MP2 at the same bitrate due to more advanced psychoacoustic modeling. If your source MPG has high-bitrate MP2 audio (e.g., 192k or 256k), the resulting AAC at 128k will be slightly smaller and perceptibly similar in quality for most listeners.
M4A with AAC is the recommended modern alternative to MP3, offering better audio quality at equivalent or lower bitrates. It is natively supported on all Apple devices, modern browsers, Android, and most streaming platforms. While some MPG files do contain MP3 audio streams, re-encoding to AAC in an M4A container produces a file better suited for contemporary use cases like iTunes libraries, iOS playback, and web audio. If you specifically need MP3 output, FFmpeg can be run locally with -c:a libmp3lame instead.
MPG files based on MPEG-1 and MPEG-2 standards have very limited metadata support — they typically carry no embedded title, artist, or album tags at all. As a result, the M4A output will generally not contain meaningful ID3-style metadata. You can add metadata after conversion using a tool like iTunes, MusicBrainz Picard, or ffmpeg's -metadata flag locally. The M4A container itself fully supports iTunes-style metadata fields once populated.
Replace the -b:a 128k value with a higher bitrate such as -b:a 192k or -b:a 256k. For example: ffmpeg -i input.mpg -vn -c:a aac -b:a 192k -vn output.m4a. For most music and speech content, 192k AAC provides excellent transparency compared to the original. Note that going above 256k in AAC offers diminishing returns and M4A files above 320k are rarely necessary.
Yes, on Linux or macOS you can use a shell loop: for f in *.mpg; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -vn "${f%.mpg}.m4a"; done. On Windows Command Prompt, use: for %f in (*.mpg) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -vn "%~nf.m4a". This browser-based tool processes one file at a time, so the local FFmpeg command is the best approach for large batch jobs.
The -vn flag appears twice in the generated command as a safety measure. The first instance, placed before the output filename, explicitly instructs FFmpeg to exclude any video streams from the output — which is essential since MPG files always contain a video track. The second occurrence is redundant but harmless; FFmpeg applies the last relevant option and both point to the same instruction. In practice, a single -vn before the output filename is sufficient for this conversion.

Technical Notes

MPG files encode video using MPEG-1 or MPEG-2 video codecs and audio most commonly as MP2 (MPEG Audio Layer II), a codec that predates MP3 and was standard for VCD and early DVD authoring. MP2 is not natively supported in most modern operating systems or media players without additional codecs. AAC (Advanced Audio Coding), the codec used in M4A, is a technically superior successor designed as part of the MPEG-4 standard — it achieves better frequency resolution and perceptual coding efficiency than MP2 at equivalent bitrates. The M4A container supports chapters (useful if you later want to segment long recordings) and gapless playback metadata, features completely absent from the MPG format. One limitation to be aware of: because the original MP2 stream cannot be stream-copied directly into an M4A container without transcoding, every conversion here involves a full decode-encode cycle. Keeping the output bitrate at or above the source MP2 bitrate (commonly 192k for broadcast content) will help minimize the cumulative quality impact. The -vn flag is critical here — without it, FFmpeg would attempt to include the MPEG-1 or MPEG-2 video stream in the output, which the M4A container does not support and would cause an error.

Related Tools