Extract Audio from AVI to M4A — Free Online Tool
Extract the audio track from an AVI file and save it as an M4A file encoded with AAC — the same high-efficiency codec used by Apple iTunes and streaming services. This is ideal for pulling clean audio from legacy AVI recordings without re-encoding the video stream you no longer need.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your AVI 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
AVI files store interleaved audio and video streams in a single container. During this conversion, FFmpeg discards the video stream entirely using the -vn flag — no video decoding or encoding occurs. If the AVI's audio track is already AAC-encoded, FFmpeg can stream-copy it directly into the M4A container with no quality loss. However, AVI files most commonly carry MP3 audio (via the libmp3lame codec), which means the audio must be transcoded from MP3 to AAC. This transcoding step is a lossy-to-lossy conversion, so the output M4A is encoded fresh at the target bitrate (default 128k) rather than being a bit-perfect copy. The M4A container itself is a restricted MPEG-4 Part 14 file — essentially an MP4 with no video — which is natively supported by iTunes, Apple Music, iOS, and most modern media players.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In the browser-based version of this tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — your file never leaves your device. |
-i input.avi
|
Specifies the input AVI file. FFmpeg reads the interleaved audio and video streams from this legacy Microsoft container to determine what streams are available for extraction. |
-vn
|
Disables video output, telling FFmpeg to ignore the video stream in the AVI entirely. Since the goal is audio-only M4A output, this prevents any video decoding or encoding from occurring and keeps processing fast. |
-c:a aac
|
Sets the audio codec to AAC (Advanced Audio Coding), the standard codec for M4A files. Because AVI files typically carry MP3 audio, this instructs FFmpeg to transcode the MP3 stream into AAC rather than copying it as-is. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second. This is a widely used default that produces good quality for music and voice content while keeping the M4A file size compact — appropriate for most iTunes library and podcast use cases. |
-vn
|
A second -vn flag included in the generated command — this is redundant but harmless. It reaffirms that no video stream should be written to the output, which is required since the M4A container is audio-only. |
output.m4a
|
The output filename with the .m4a extension. FFmpeg uses this extension to automatically select the MPEG-4 audio container format, which is natively recognized by iTunes, Apple Music, iOS, and most modern media players. |
Common Use Cases
- Extract a music recording or live performance captured in AVI format from an older camcorder or video editor and import it into iTunes or Apple Music as an M4A file.
- Pull the audio commentary track from an AVI-format gameplay recording or screen capture to use as a standalone podcast episode or voiceover clip.
- Convert a collection of AVI video lectures or conference recordings into M4A audio files for listening on an iPhone or iPod without consuming video storage.
- Extract dialogue or sound effects from an AVI source file in a post-production workflow where the audio needs to be delivered in an AAC-based format for an Apple ecosystem pipeline.
- Archive the audio from legacy AVI home videos into a more modern, space-efficient M4A format that is compatible with current media management software like iTunes.
- Strip the audio from an AVI training video to create a portable audio guide that can be played on mobile devices without requiring video playback capability.
Frequently Asked Questions
It depends on the audio codec inside the AVI file. Most AVI files use MP3 audio, which means the conversion involves transcoding from MP3 to AAC — a lossy-to-lossy process that introduces a small amount of generational quality loss. At 128k AAC the result is generally transparent for most listeners, but audiophiles working with critical recordings may want to increase the bitrate to 192k or 256k. If the AVI happens to contain AAC audio already, FFmpeg can copy the stream without re-encoding, preserving the original quality exactly.
AAC, the codec used inside M4A files, is technically more efficient than MP3 — it achieves similar perceived quality at lower bitrates, and it supports features like gapless playback that MP3 lacks. M4A is also the native format for Apple's ecosystem, meaning files play without conversion in iTunes, Apple Music, iOS, and macOS. If your end destination is an Apple device or iTunes library, M4A is the more natural target format compared to an intermediate MP3.
AVI has very limited metadata support — it stores basic tags in a RIFF INFO chunk, and FFmpeg will attempt to map these to the M4A container's iTunes-style metadata atoms during conversion. In practice, most AVI files carry little or no embedded metadata, so the resulting M4A will likely be similarly sparse. You can add or edit tags like title, artist, and album after conversion using a tool like MusicBrainz Picard, iTunes, or mp4tags.
By default, FFmpeg selects the first audio stream it finds in the AVI file. AVI does support multiple audio tracks, and if your source file has more than one (for example, a primary audio mix and a commentary track), you can target a specific stream by adding -map 0:a:1 to the command to select the second audio track, or -map 0:a:0 for the first. The M4A container does not support multiple audio tracks, so only one stream can be written to the output file.
Replace the value after -b:a in the command with your desired bitrate. For example, to encode at 256 kbps use -b:a 256k, giving you: ffmpeg -i input.avi -vn -c:a aac -b:a 256k -vn output.m4a. For spoken-word content like podcasts or lectures, 96k is often sufficient and produces smaller files. For music where quality is critical, 192k or 256k AAC is generally considered transparent. The default of 128k is a reasonable balance for general use.
Yes. On Linux or macOS, you can run the following shell loop: for f in *.avi; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -vn "${f%.avi}.m4a"; done. On Windows Command Prompt, use: for %f in (*.avi) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -vn "%~nf.m4a". This processes every AVI file in the current directory and outputs a corresponding M4A file with the same base filename. Batch processing is especially useful when migrating a large archive of legacy AVI recordings.
Technical Notes
The M4A container is technically an MPEG-4 Part 14 file with the audio-only file extension convention established by Apple. It supports AAC (the default used here), ALAC (lossless), Opus, and Vorbis streams, and it includes native support for iTunes-style chapter markers and gapless playback metadata — features that AVI entirely lacks. One important limitation is that M4A does not support multiple audio tracks, so if the source AVI contains secondary audio streams they will be dropped. The -vn flag appears twice in the generated command (once before and once after the codec flags) — this is harmless redundancy; a single -vn is sufficient. FFmpeg's AAC encoder (the native aac codec used here) produces good quality output and is widely compatible, though the third-party libfdk_aac encoder, when available, is generally considered higher quality at equivalent bitrates. File size for the M4A output will be significantly smaller than the source AVI because the entire video stream is discarded and only the audio is retained. A one-hour AVI file at typical video bitrates might be several gigabytes, while the extracted M4A at 128k will be roughly 57 MB.