AAC to FLAC: Convert and What to Expect
A practical guide to converting AAC and M4A files to FLAC. Covers quality expectations, use cases, and step-by-step conversion instructions.
AAC to FLAC is a conversion that depends entirely on what is actually inside your input file. The .aac and .m4a extensions hide a fork in the road: the audio inside is either AAC (lossy) or ALAC (Apple Lossless). Convert AAC to FLAC and you get a lossless container around already-degraded audio. Convert ALAC to FLAC and you get bit-perfect lossless conversion. The first step before doing anything else is identifying which one you have.
This guide covers how to check, what each path means for quality and file size, and the exact conversion commands for both cases.
Check the Codec First with ffprobe
Run this on your input file before deciding whether the conversion is worthwhile:
'ffprobe input.m4a'
Look for the Stream line. The 'codec_name' field will say one of:
- 'aac' — AAC-LC, the standard lossy codec used by Apple Music, iTunes Store purchases, YouTube downloads, podcast feeds, and most consumer audio.
- 'alac' — Apple Lossless Audio Codec. Used by lossless tracks in Apple Music's lossless tier and CDs ripped via iTunes "Apple Lossless Encoder."
- 'aac_he' — HE-AAC (High-Efficiency), used for lower-bitrate streams.
MediaInfo (free, cross-platform, GUI) shows the same information if you prefer not to use the command line.
Path 1: AAC Inside (Lossy → Lossless Container)
If the codec is AAC or HE-AAC, the conversion is the same situation as OGG Vorbis to FLAC — a lossy source repackaged in a lossless container. The FLAC cannot recover detail the AAC encoder discarded; it just preserves what is left perfectly going forward.
Quality expectations by AAC bitrate:
- 256 kbps AAC (Apple Music, iTunes Store): essentially transparent. Converting to FLAC preserves this near-source quality, but it is still AAC-quality at the ceiling.
- 128 kbps AAC (typical YouTube audio, older podcasts): artifacts present on cymbals, sibilance, and dense high-frequency material. Converting to FLAC preserves those artifacts perfectly.
- 64 kbps HE-AAC: noticeable compression artifacts. The FLAC just ensures no further degradation.
When this conversion is worth doing despite the quality ceiling:
- Cross-platform library consistency. FLAC plays cleanly on Linux, Windows non-Apple players (foobar2000, MusicBee), Android (Poweramp, VLC), and dedicated audio players (FiiO, Astell&Kern). Apple's AAC ecosystem is reliable on Apple devices but uneven elsewhere.
- Avoiding stacked lossy generations. Editing AAC and re-exporting to MP3 or another lossy format compounds artifacts. Decoding to FLAC once and editing from there keeps every subsequent step lossless until the final encode.
- Library standardization. If your archive policy is "all FLAC," convert and accept the underlying quality.
- Better metadata and integrity. FLAC's Vorbis Comments tags work cleanly across every player; AAC metadata in iTunes-tagged M4As is sometimes interpreted differently across non-Apple software. FLAC also stores an MD5 of decoded PCM, enabling 'flac -t' integrity checks.
When this conversion is not worth doing:
- The file plays fine and stays in your AAC-friendly ecosystem (Apple Music, iTunes, iOS).
- You expect a quality improvement (you will not get one).
- Storage is constrained — FLAC will be 3-5× larger than the AAC source.
- The next step is re-encoding to another lossy format anyway.
Path 2: ALAC Inside (Lossless → Lossless)
If ffprobe shows 'codec_name=alac', the conversion is fundamentally different. ALAC and FLAC are both lossless predictor-based codecs. Converting ALAC to FLAC is a true lossless operation — the decoded PCM samples are bit-identical, just stored in a different container with a different prediction scheme.
This is the same pattern as WAV to FLAC: the audio is preserved perfectly, only the container and compression algorithm change. Use cases:
- Cross-platform archive. ALAC is reliable on Apple devices but spotty elsewhere. FLAC is the open standard supported everywhere except some Apple products.
- Library management with non-Apple tools. Plex, Roon, foobar2000, and most dedicated audio players prefer FLAC.
- Verifiable integrity. FLAC's stored MD5 of decoded PCM lets you verify the file decades later. ALAC does not have an equivalent built-in verification.
File size is comparable — both formats compress lossless PCM to roughly 50-60% of WAV size. The conversion does not significantly change file size.
File Size After Conversion
For AAC sources:
- 256 kbps AAC ≈ 1.9 MB per minute of stereo audio. As FLAC ≈ 6-8 MB per minute. Roughly 3-4× larger.
- 128 kbps AAC ≈ 0.95 MB per minute. As FLAC ≈ 6-8 MB per minute. Roughly 6-8× larger.
For ALAC sources, the conversion is approximately size-neutral — both formats are lossless and compress to similar ratios.
Browser-Based Conversion
The fastest path is FFmpeg. The conversion is a decode-then-encode operation regardless of which codec is inside the M4A.
For command-line conversion:
'ffmpeg -i input.m4a output.flac'
ffmpeg auto-detects whether the M4A contains AAC or ALAC, decodes either correctly, and writes a FLAC at the source sample rate and bit depth. The PCM intermediate is held in memory; no temp files written.
To set FLAC compression explicitly (default level 5):
'ffmpeg -i input.m4a -compression_level 8 output.flac'
For batch conversion:
'for f in *.m4a; do ffmpeg -i "$f" "${f%.m4a}.flac"; done'
For browser-based AAC conversion paths, see the AAC to MP3 tool and AAC to WAV for related conversions.
Verify the Result
After converting, run 'flac -t output.flac'. FLAC stores an MD5 of decoded PCM in its header; the test command decodes the file and verifies it matches. Exit 0 means the file is intact. This is the integrity benefit you gain by switching from AAC or ALAC to FLAC, regardless of the underlying audio quality.
Decision Tree
- ffprobe shows 'aac' → lossy source. Convert only if you have a workflow reason (cross-platform consistency, edit prep, archive standardization). Quality will not improve.
- ffprobe shows 'alac' → lossless source. Convert freely; FLAC is bit-identical and gains better cross-platform support and verifiable integrity.
- Lossy source headed to another lossy format → skip the FLAC step. Convert directly.
- Lossy source headed to a DAW for edits → convert to WAV or FLAC first to avoid stacking lossy generations.
For format-level background, the What is AAC explainer covers the codec design and Apple's AAC and ALAC variants. What is M4A covers the container and the codec fork. What is FLAC covers the lossless prediction-based codec and the integrity verification model.