Convert MPEG to M4A — Free Online Tool

Extract and convert audio from MPEG video files (.mpeg, .mpg) into M4A, discarding the video stream and re-encoding the MPEG Layer 2 (MP2) or MP3 audio as AAC at 128k bitrate. The result is a compact, iTunes- and Apple-compatible audio file ideal for music, podcasts, or archiving legacy broadcast audio.

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 MP2 (MPEG Layer 2) audio alongside MPEG-1 or MPEG-2 video. During this conversion, FFmpeg strips the video stream entirely using the -vn flag and re-encodes only the audio track from MP2 (or MP3) into AAC, the native codec of the M4A container. This is a full audio transcode — not a remux — because M4A does not support MP2. The resulting M4A file wraps AAC audio in an MPEG-4 container, making it directly playable in iTunes, Apple Music, iOS, and most modern media players. Because both MP2 and AAC are lossy formats, this is a lossy-to-lossy transcode, meaning some generation loss is introduced. The video data from the original MPEG is permanently discarded, so output file sizes are dramatically smaller than the source.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool. In this browser-based tool, FFmpeg runs as a WebAssembly (WASM) binary entirely within your browser — no file is uploaded to a server. The same command runs identically on desktop FFmpeg installations.
-i input.mpeg Specifies the input file, which is an MPEG container holding MPEG-1 or MPEG-2 video and typically MP2 or MP3 audio. FFmpeg automatically detects the container format and the codecs of all streams inside it.
-c:a aac Sets the audio codec for the output to AAC (Advanced Audio Coding), which is the required and native codec for M4A files. Because the source audio is MP2 — a codec incompatible with M4A — this triggers a full decode-and-re-encode transcode of the audio stream rather than a stream copy.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second. This is a standard bitrate for general-purpose listening that balances file size and quality; it is appropriate for voice content and acceptable for music extracted from MPEG sources. Raise this to 192k or 256k if the source material is music and fidelity is a priority.
-vn Disables video output entirely, instructing FFmpeg to ignore the MPEG-1 or MPEG-2 video stream in the source file. This flag is required because M4A is an audio-only container and cannot hold video — without it, FFmpeg would attempt to include the video stream and fail or produce an invalid file.
output.m4a Specifies the output filename and container format. The .m4a extension tells FFmpeg to wrap the encoded AAC audio in an MPEG-4 audio container, which is the standard format used by Apple iTunes, Apple Music, and iOS devices for AAC audio playback.

Common Use Cases

  • Extracting the audio commentary or narration track from an old MPEG-1 or MPEG-2 broadcast recording for use as a podcast episode
  • Converting legacy DVD-compatible MPEG files to M4A so their audio can be imported into iTunes or Apple Music for syncing to iPhone or iPad
  • Pulling the soundtrack from an archival MPEG video — such as a digitized VHS or Betacam transfer — to create a standalone audio file for long-term preservation
  • Stripping audio from MPEG news footage or interview recordings so editors can import it into GarageBand, Logic Pro, or other AAC-friendly DAWs
  • Converting MPEG training videos to M4A audio files so learners can listen to the content as audio-only on the go without streaming video
  • Reducing the storage footprint of a large MPEG video archive by extracting just the MP2 audio tracks and re-encoding them as compact AAC M4A files

Frequently Asked Questions

Yes, because this is a lossy-to-lossy transcode. The original MPEG file's audio is encoded in MP2 (MPEG Layer 2) or sometimes MP3, and converting it to AAC in M4A requires fully decoding and re-encoding the audio. Each generation of lossy encoding introduces some degradation. However, AAC is a more efficient codec than MP2 — at 128k bitrate, AAC generally sounds comparable to MP2 at 192k or higher, so the perceptible quality loss at this bitrate is often minimal for voice content and moderate for music.
M4A is an audio-only container format; it is a subset of the MPEG-4 container (MP4) but restricted to audio streams by convention. The -vn flag in the FFmpeg command explicitly instructs FFmpeg to discard the video stream and produce a pure audio output. If you need to keep the video, you should convert to MP4 or MKV instead of M4A.
Yes. The -b:a 128k flag sets the AAC bitrate to 128 kilobits per second. You can increase it to 192k, 256k, or 320k for better audio fidelity — for example, replace '128k' with '256k' in the command to get higher-quality AAC output. For voice recordings or podcasts, 96k or 128k is typically sufficient. For music extracted from high-quality MPEG sources, 192k or 256k is a more conservative choice to limit generation loss.
MPEG files rarely contain rich metadata — the format predates modern tagging conventions and typically has no embedded ID3 or MPEG-4 metadata. M4A supports iTunes-style metadata tags (title, artist, album, artwork), but FFmpeg will only copy tags that exist in the source. In practice, most MPEG-to-M4A conversions produce an M4A with no embedded metadata, and you will need to add tags manually afterward using a tool like iTunes, MusicBrainz Picard, or mp4tags.
Yes. M4A with AAC audio is Apple's preferred audio format and is fully supported by iTunes, Apple Music, iPhone, iPad, iPod, Apple TV, and macOS. AAC encoded at 128k or higher in an M4A container will import into iTunes without transcoding and sync directly to iOS devices. This makes MPEG-to-M4A conversion a practical path for getting legacy broadcast or DVD audio content into the Apple ecosystem.
On macOS or Linux, you can run a shell loop: for f in *.mpeg; do ffmpeg -i "$f" -c:a aac -b:a 128k -vn "${f%.mpeg}.m4a"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -c:a aac -b:a 128k -vn "%~nf.m4a". Each file will be processed sequentially, stripping the video and encoding the audio to a matching M4A file. This is especially useful for the desktop FFmpeg command shown on this page when processing large archives beyond the 1GB browser limit.

Technical Notes

The MPEG container (file extensions .mpeg, .mpg) was designed primarily for broadcast and DVD distribution and carries MPEG-1 or MPEG-2 video alongside MP2 audio, which is a relatively inefficient legacy codec compared to modern standards. MP2 is not a supported codec in M4A or any MPEG-4 container, so a full audio transcode to AAC is mandatory — there is no remux path for this conversion. AAC (Advanced Audio Coding) is the default codec for M4A and delivers significantly better compression efficiency than MP2: AAC at 128k is broadly considered to match or exceed MP2 at 192–224k in perceptual quality. The -vn flag is a required special flag for M4A output because FFmpeg would otherwise attempt to include a video stream, which the M4A format does not support. M4A supports chapter markers (useful for podcast chapters) but the MPEG source format does not, so no chapter data will be present in the output unless added manually. Transparency and subtitle streams are not applicable to either format in this audio-extraction workflow. One known limitation: some very old MPEG-1 files encoded with non-standard or variable audio sampling rates may require an explicit -ar 44100 flag added to the command to force a standard sample rate that AAC encoders and Apple devices expect.

Related Tools