Convert AVI to FLAC — Free Online Tool
Extract and convert the audio track from an AVI file into a lossless FLAC archive, preserving every detail of the original PCM audio data without any quality degradation. Ideal for archiving audio from legacy AVI recordings where the original audio fidelity must be maintained.
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
During this conversion, FFmpeg opens the AVI container and demuxes its audio stream — typically encoded as PCM, MP3, or AC3 inside the AVI wrapper — then re-encodes that audio data using the FLAC codec. The video stream is discarded entirely since FLAC is an audio-only format. If the source audio is already uncompressed PCM (common in older AVI files), FLAC compression is essentially a true lossless archive: every sample is preserved and the output file can be decoded back to bit-for-bit identical PCM. If the source audio is a lossy codec like MP3 inside the AVI, the conversion is still technically lossless in the sense that FLAC introduces no further degradation, but the quality ceiling is already set by the original lossy encoding.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg multimedia processing tool. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — no data leaves your device. |
-i input.avi
|
Specifies the input AVI file. FFmpeg reads the RIFF/AVI container, identifies the audio and video streams inside, and makes them available for processing or discarding. |
-c:a flac
|
Sets the audio codec to FLAC (Free Lossless Audio Codec). FFmpeg decodes whatever audio codec is inside the AVI — whether PCM, MP3, or AC3 — to raw PCM samples, then re-encodes those samples using FLAC's lossless compression algorithm. |
-compression_level 5
|
Sets FLAC's compression effort to level 5 out of 8. This controls only the encoded file size and encoding speed — not audio quality, which remains bit-perfectly lossless at every level. Level 5 is the standard default that offers strong compression without excessive encoding time. |
output.flac
|
Defines the output filename and format. The .flac extension tells FFmpeg to mux the encoded audio into a FLAC file container. The video stream from the AVI is automatically dropped because the FLAC format has no video stream support. |
Common Use Cases
- Extracting a clean, lossless audio recording from an archival AVI video — such as an old interview, lecture capture, or broadcast recording — for long-term preservation in a format that won't degrade over repeated transcodes.
- Pulling the audio track out of a raw AVI file produced by a screen recorder or legacy capture card to create a high-fidelity master before producing lossy distribution copies.
- Converting AVI files from old digital camcorders or DV captures into FLAC so the audio can be imported into a DAW (like Audacity or Reaper) for mixing or restoration without generation loss.
- Archiving audio from AVI home videos to FLAC before re-encoding the video into a modern format, ensuring the original audio can always be remixed or re-synced later.
- Extracting spoken-word audio from AVI conference recordings or depositions to create an archival transcript-ready file that lossless players and transcription tools can process reliably.
- Stripping the audio from an AVI music performance video to produce a FLAC master for an audio library or personal lossless music collection.
Frequently Asked Questions
FLAC is a lossless codec, so the conversion itself introduces zero quality loss — the output file decodes to mathematically identical PCM samples as the input. However, if the audio track inside the AVI was already encoded with a lossy codec like MP3 or AC3, that prior lossy compression is baked in and cannot be reversed. In that case, the FLAC file is a lossless copy of already-lossy audio, meaning it is perfectly preserved but not technically 'studio quality'.
The video stream is completely discarded. FLAC is a pure audio format and has no capacity to store video data. Only the first audio track from the AVI is extracted and encoded into the FLAC file. If you need both audio and video preserved, you should convert to a format like MKV or MP4 instead.
The AVI file contains both video and audio data, so removing the video alone will make the audio-only output dramatically smaller regardless of codec. FLAC's lossless compression then reduces the audio data further — typically by 40–60% compared to raw PCM — without losing any information. If the source AVI's audio was already a lossy format like MP3, the FLAC file may be slightly larger than the raw compressed audio bytes in the AVI because FLAC is optimized for compressing PCM, not re-compressing already-compressed data.
FFmpeg will attempt to copy compatible metadata fields — such as title, artist, and date — from the AVI container into FLAC's Vorbis comment tag block. However, AVI's metadata support is limited and non-standardized, so not all tags may carry over. You may want to use a tag editor like MusicBrainz Picard or Kid3 after conversion to verify and complete the FLAC metadata.
The -compression_level flag controls how aggressively FLAC compresses the audio data, on a scale from 0 (fastest, largest file) to 8 (slowest, smallest file). Critically, every level produces a file that decodes to bit-for-bit identical audio — only the encoded file size and encoding speed differ. Level 5 is the widely accepted default that balances speed and compression ratio well. For most AVI-to-FLAC archiving tasks, level 5 is appropriate; only use level 8 if minimizing storage is a priority and you have time to spare.
You can batch-process AVI files using a shell loop. On Linux or macOS, run: for f in *.avi; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.avi}.flac"; done. On Windows Command Prompt, use: for %f in (*.avi) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac". Each AVI file in the folder will be processed sequentially, extracting its audio track into a separate FLAC file with the same base filename.
Technical Notes
AVI files store audio using the RIFF container structure with a WAVEFORMATEX audio header, and the audio codec varies widely depending on the file's origin — uncompressed PCM (format tag 0x0001) is common in DV captures and screen recordings, while MP3 (0x0055) and AC3 are frequent in legacy encoded content. FFmpeg correctly identifies the audio codec and routes it through the appropriate decoder before handing raw PCM samples to the FLAC encoder. FLAC uses a combination of linear predictive coding (LPC) and Rice entropy coding to achieve lossless compression; at compression level 5, it applies a good LPC order search without exhaustive optimization. One known limitation: AVI officially supports only one audio stream per file in the standard spec, though some AVI files contain multiple audio streams via non-standard extensions — this tool extracts only the first detected audio stream. FLAC does not support multiple audio tracks in a single file, so if you have a multi-track AVI, you would need separate FFmpeg commands with -map 0:a:0, -map 0:a:1, etc. to extract each track individually. FLAC also supports embedded cue sheets and ReplayGain tags, both of which can be added with post-processing tools after conversion.