Extract Audio from MPEG to M4A — Free Online Tool
Extract audio from MPEG video files and save it as M4A, re-encoding the legacy MP2 or MP3 audio track to AAC inside an MPEG-4 container. M4A offers better compression efficiency than MP2 at equivalent bitrates, making it ideal for archiving or distributing audio from older MPEG-1 and MPEG-2 sources.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MPEG 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
MPEG files (.mpeg, .mpg) typically carry audio encoded as MP2 — the older predecessor to MP3 used heavily in broadcast television and DVD authoring. Because M4A requires audio in a codec compatible with the MPEG-4 container (such as AAC, Opus, FLAC, or Vorbis), a straight stream copy is not possible here: the MP2 audio must be fully decoded and re-encoded to AAC. FFmpeg discards the MPEG-1 or MPEG-2 video stream entirely using the -vn flag, decodes the MP2 audio frames, and passes the raw PCM audio through the AAC encoder before writing it into an .m4a file. The result is a standalone audio file with no video data, wrapped in Apple's MPEG-4 audio container.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that handles the decoding of the MPEG container and re-encoding of its audio to AAC/M4A. |
-i input.mpeg
|
Specifies the source MPEG file, which may contain an MPEG-1 or MPEG-2 video stream alongside an MP2, MP3, or AAC audio track. FFmpeg reads the container and demuxes the streams for processing. |
-vn
|
Disables video recording, instructing FFmpeg to ignore the MPEG-1 or MPEG-2 video stream entirely. This is what makes the operation an audio extraction rather than a full conversion — no video data is decoded or written to the output file. |
-c:a aac
|
Sets the audio codec to AAC (Advanced Audio Coding), re-encoding the source MP2 audio from the MPEG file into the modern AAC format required by the M4A container. AAC provides better compression efficiency than the legacy MP2 codec found in most MPEG files. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second. This is a standard quality level for AAC that balances file size and audio fidelity; since the source MP2 audio in MPEG files is already lossy, 128k AAC is generally sufficient, though 192k or 256k can be used to preserve more detail from higher-quality sources. |
-vn
|
A second -vn flag explicitly applied to the output, reinforcing that no video stream should be written into the M4A file. M4A is an audio-only container, and this ensures FFmpeg does not attempt to mux any video data into the output even if stream mapping is ambiguous. |
output.m4a
|
The destination filename with the .m4a extension, which tells FFmpeg to write the AAC-encoded audio into an MPEG-4 audio container — the format popularized by iTunes and natively supported by Apple devices and most modern media players. |
Common Use Cases
- Extracting the audio commentary or narration from an archived MPEG-2 broadcast recording to create a standalone podcast or audio file
- Pulling music or soundtrack audio from legacy MPEG-1 video files ripped from early CD-ROM titles or VCDs for playback in iTunes or Apple Music
- Converting MP2-encoded audio from digitized VHS or broadcast captures into the AAC/M4A format required by iOS devices and Apple ecosystem apps
- Archiving the audio track from MPEG-2 DVD source footage in a smaller, more efficient M4A file before the original video files are deleted or compressed further
- Producing an M4A audio file from an MPEG news broadcast clip to attach as a media asset to a podcast episode or audio article
- Extracting spoken-word content from MPEG training or educational videos into M4A format compatible with audiobook players and podcast apps
Frequently Asked Questions
Because MP2 is already a lossy format, re-encoding to AAC involves a generation loss — the audio is decoded from MP2 back to raw PCM and then compressed again using AAC. At the default bitrate of 128k, AAC is generally more efficient than MP2 and can sound comparable or better at the same bitrate. However, if the source MP2 was encoded at a low bitrate (64k or 96k), artifacts from the original encoding may become more audible after re-encoding. For best results, use the highest quality source available and consider raising the output bitrate to 192k or 256k if the source permits it.
MP2 (MPEG-1 Audio Layer II), the dominant audio codec in MPEG-1 and MPEG-2 files, is not a valid codec inside the MPEG-4 container that M4A uses. The M4A format only supports codecs like AAC, FLAC, Opus, and Vorbis. This means FFmpeg must fully decode the MP2 audio and re-encode it — a stream copy with -c:a copy would either fail or produce an unplayable file. If your MPEG file happens to use AAC audio (less common but possible), stream copying would technically work, but the default command re-encodes to be safe.
Replace the -b:a 128k flag with your desired bitrate. For example, use -b:a 192k or -b:a 256k for higher fidelity, which is worthwhile if the source MPEG file has a high-quality MP2 track at 192k or above. The full command would look like: ffmpeg -i input.mpeg -vn -c:a aac -b:a 256k -vn output.m4a. Going above 256k with AAC offers diminishing returns, and 128k–192k is typically transparent for most listeners with a good source file.
MPEG containers have very limited metadata support, especially compared to M4A which was designed with iTunes metadata tags (title, artist, album, artwork, etc.) in mind. FFmpeg will attempt to copy any metadata tags present in the source MPEG file into the M4A output, but in practice most MPEG files carry little to no embedded metadata beyond basic stream properties. You may want to add or edit metadata tags in the resulting M4A file using a tool like MusicBrainz Picard or iTunes after conversion.
Yes. On Linux or macOS, you can run a shell loop in the terminal: for f in *.mpeg; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -vn "${f%.mpeg}.m4a"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -vn "%~nf.m4a". This applies the same extraction and AAC encoding settings to every MPEG file in the current directory. The browser-based tool processes one file at a time, so the FFmpeg command line is especially useful for large batch jobs.
The size reduction is dramatic because the video stream — which accounts for the vast majority of an MPEG file's data — is completely discarded. A typical MPEG-2 video file encoded at several megabits per second might be hundreds of megabytes, while the extracted M4A audio at 128k bitrate will be only a few megabytes per minute of content. The audio-only M4A file size depends solely on its duration and the chosen bitrate, roughly calculated as (bitrate in kbps × duration in seconds) ÷ 8 = size in kilobytes.
Technical Notes
MPEG-1 and MPEG-2 containers are legacy formats that predate modern audio codec ecosystems. Their standard audio codec, MP2 (MPEG-1 Audio Layer II), is a predecessor to MP3 and was widely used in broadcast television, VCD, and DVD production but is rarely used today. AAC, the default codec for M4A, was designed as the successor to MP3 and delivers comparable or better perceived quality at the same bitrate. The -vn flag appears twice in the resolved command — once before the codec flags (as a filter to ignore the video input stream) and once at the end (as an explicit no-video directive for the output); FFmpeg accepts this gracefully and the behavior is the same as using it once. The M4A container supports chapter markers, which could be useful if the source MPEG content was a structured broadcast, though MPEG sources rarely carry chapter data for FFmpeg to transfer. If your MPEG file contains multiple audio tracks (uncommon in standard MPEG-1/2), only the first audio stream will be extracted by default; use -map 0:a:1 to select an alternate track. The output M4A file is compatible with iTunes, Apple Music, iOS, and most modern media players.