Extract Audio from AVI to ALAC — Free Online Tool

Extract audio from AVI video files and save it as ALAC (Apple Lossless Audio Codec) in an M4A container — preserving every bit of the original audio data without any lossy compression. Ideal for archiving AVI audio tracks in a lossless format fully compatible with iTunes, Apple Music, and all Apple devices.

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

This conversion discards the AVI video stream entirely and re-encodes the audio track using Apple's ALAC codec, outputting an M4A file. Because AVI typically stores audio as MP3 (libmp3lame) or AAC, it is important to understand that ALAC will losslessly preserve whatever audio data exists in the source AVI — but if the source audio was already lossy (e.g., MP3 at 128k), the ALAC output encodes that lossy audio losslessly; it does not recover quality lost during original encoding. The output M4A container supports chapters and rich metadata tags, though AVI carries neither chapters nor subtitle tracks, so only basic audio metadata can be transferred. No video data is written to the output file.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all the demuxing of the AVI container, audio decoding, ALAC re-encoding, and writing of the M4A output file entirely within your browser via WebAssembly.
-i input.avi Specifies the input AVI file. FFmpeg reads and demuxes the AVI container, separating the interleaved audio and video streams so each can be handled independently.
-vn Disables video output entirely, ensuring no video stream is written to the M4A file. Since ALAC is an audio-only format and M4A is an audio-only container variant, this flag is essential to produce a clean audio-only output.
-c:a alac Instructs FFmpeg to encode the audio stream using Apple's ALAC (Apple Lossless Audio Codec), which compresses audio without any quality loss. This is applied the first time it appears in the command and is the key step that produces the lossless M4A output.
-c:a alac A duplicate of the preceding codec flag — this second instance is redundant and has no additional effect. FFmpeg uses the last occurrence when a flag is repeated, so the result is identical to specifying it once. You can safely omit this when running the command locally.
output.m4a Defines the output filename with the .m4a extension, which tells FFmpeg to wrap the ALAC-encoded audio in an MPEG-4 audio container — the standard format recognized by iTunes, Apple Music, and all Apple devices.

Common Use Cases

  • Archiving the audio track from a legacy AVI home video or camcorder recording in a lossless format for long-term storage on Apple devices
  • Extracting a music performance or live concert recorded in AVI format to a lossless ALAC file for playback in iTunes or Apple Music without quality degradation
  • Pulling the audio from an AVI-based screen recording or tutorial video to create a high-fidelity reference audio file for audio engineering workflows on macOS
  • Converting an AVI file containing a losslessly recorded audio track (e.g., PCM audio in AVI) to ALAC so it can be synced to an iPhone or iPad via Apple Music
  • Preparing AVI audio content for import into Logic Pro or GarageBand, which handle ALAC natively and benefit from lossless source material
  • Migrating an old AVI media library's audio content to a modern Apple ecosystem-compatible lossless format before archiving or deleting the original video files

Frequently Asked Questions

No — ALAC is lossless, meaning it perfectly preserves whatever audio data is in your AVI source, but it cannot reconstruct quality that was already discarded. AVI files most commonly store audio as MP3 or AAC, both of which are lossy formats. The resulting ALAC file will be a lossless copy of that already-lossy audio, which is still useful for archival purposes but will not sound better than the original AVI audio track.
ALAC uses lossless compression, which is less aggressive than the lossy codecs (MP3 or AAC) typically found in AVI files. Because ALAC retains all audio data without discarding any, its file size is considerably larger — often several times bigger than an equivalent MP3 or AAC track at the same duration. This is the expected tradeoff for lossless storage quality.
AVI does technically support multiple audio streams, but the FFmpeg command as shown extracts only the default audio track. ALAC in an M4A container does not support multiple audio tracks in a single file, so only one stream can be output. If your AVI has multiple audio tracks and you need a specific one, you can modify the command to add '-map 0:a:1' (or the appropriate index) before the output filename to select a different track.
ALAC has broader compatibility than many assume — it is supported by VLC, foobar2000, Android (via certain apps), and many modern media players. However, it is not as universally supported as FLAC for lossless audio outside the Apple ecosystem. If your target device or platform does not support ALAC, FLAC would be a more portable lossless alternative, while AAC or MP3 would be better choices for maximum device compatibility.
You can batch process files in a shell loop. On Linux or macOS, use: 'for f in *.avi; do ffmpeg -i "$f" -vn -c:a alac "${f%.avi}.m4a"; done'. On Windows Command Prompt, use: 'for %f in (*.avi) do ffmpeg -i "%f" -vn -c:a alac "%~nf.m4a"'. This processes each AVI in the current directory and outputs a corresponding M4A file with the same base filename.
The duplicated '-c:a alac' flag in the generated command is redundant — specifying the codec once is sufficient for FFmpeg to encode the output audio as ALAC. The second instance does not cause an error; FFmpeg simply applies the last value when the same option appears multiple times. If you run this command locally, you can safely remove the duplicate and use 'ffmpeg -i input.avi -vn -c:a alac output.m4a' for a cleaner command.

Technical Notes

AVI is a legacy Microsoft container format that does not support modern container features such as chapters, subtitles, or rich metadata tag schemas — only basic ID3-style tags may be present. When extracting to ALAC in M4A, the output container does support iTunes-style metadata tags (artist, album, title, etc.) and chapters, but since AVI carries none of this structured metadata, the output M4A will generally have no embedded tags unless you add them manually with a tag editor afterward. The ALAC codec itself is open-source (Apple released the source in 2011) and produces files that are bit-for-bit identical to the input PCM audio when decoded. If the AVI source contains PCM audio (uncompressed), the ALAC output will be a true lossless representation; if it contains MP3 or AAC audio, there is an unavoidable generation of lossy-to-lossless wrapping. The M4A file extension is simply an MPEG-4 container carrying only audio, and is recognized natively across all Apple platforms including macOS Finder, iOS, tvOS, and Apple TV.

Related Tools