Extract Audio from MP4 to FLAC — Free Online Tool
Extract the audio track from an MP4 video file and save it as a lossless FLAC file — preserving every detail of the original audio without any quality degradation. Unlike converting to MP3 or AAC, FLAC uses lossless compression, making this ideal when the source MP4 contains high-quality AAC or uncompressed audio worth archiving at full fidelity.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP4 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
MP4 files typically store audio encoded in AAC (the default) or sometimes MP3 or Opus. During this conversion, FFmpeg discards the video stream entirely using the -vn flag, then decodes the existing audio track to raw PCM and re-encodes it into FLAC using lossless compression. Because FLAC is lossless, the output faithfully represents the decoded audio signal — though it's worth noting that if the source audio was already lossy AAC, the FLAC file preserves that decoded signal losslessly rather than recovering quality that was lost during the original AAC encoding. The -compression_level 5 setting controls only the file size vs. encoding speed tradeoff, not audio quality, which is always bit-perfect.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which handles all the demuxing, decoding, encoding, and muxing steps needed to extract and convert the audio from the MP4 container into a FLAC file. |
-i input.mp4
|
Specifies the input MP4 file. FFmpeg reads this container and identifies all available streams — typically a video stream and one or more audio streams encoded in AAC or another MP4-compatible audio codec. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore the video stream from the MP4. Since FLAC is a pure audio format and cannot contain video, this flag ensures no video processing is attempted and the output contains only the audio track. |
-c:a flac
|
Sets the audio codec to FLAC for the output file. FFmpeg decodes the source AAC audio from the MP4 to raw PCM and then re-encodes it using the lossless FLAC codec, producing a bit-perfect compressed audio file. |
-compression_level 5
|
Sets FLAC's compression level to 5 on a scale of 0 (fastest, largest file) to 8 (slowest, smallest file). This controls only encoding speed and output file size — audio quality is always lossless regardless of this value. Level 5 is the widely accepted default that balances speed and compression efficiency. |
output.flac
|
Specifies the output filename and format. The .flac extension tells FFmpeg to wrap the encoded audio in a FLAC container, which supports metadata tags, seeking, and cue sheets — making it compatible with audiophile players and lossless music library tools. |
Common Use Cases
- Archive the audio from a high-quality MP4 concert or live performance recording in a lossless format for long-term storage
- Extract dialogue or narration from an MP4 video to use as source material for audio restoration or noise reduction workflows that require lossless input
- Pull the audio track from a locally recorded MP4 screencast or tutorial to edit it in a DAW like Audacity or Reaper without introducing additional encoding artifacts
- Convert MP4 audio to FLAC for playback on audiophile hardware or media players like foobar2000 that prioritize lossless formats
- Extract a music video's audio track as FLAC to add to a lossless music library alongside other FLAC albums, keeping formats consistent
- Prepare audio from an MP4 interview recording for transcription software or speech analysis tools that accept FLAC as a high-quality input format
Frequently Asked Questions
No — if the MP4's audio track is encoded in AAC (the most common MP4 audio codec), that audio has already been through lossy compression. FLAC captures the decoded output of that AAC audio losslessly, but it cannot recover the detail that AAC discarded during encoding. The FLAC file will be a perfect, bit-accurate representation of what the AAC decoder produces, but it won't sound better than the original MP4 audio. The real benefit of FLAC is preventing any further quality loss in future processing or re-encoding steps.
AAC is a lossy codec that achieves very small file sizes by permanently discarding audio data the encoder deems less perceptible. FLAC is lossless and must store the full decoded audio signal in compressed form, which requires significantly more space than AAC. For example, a 128 kbps AAC audio track might expand to 700–1000 kbps equivalent when stored as FLAC. This is expected and is the fundamental tradeoff between lossy and lossless compression.
FFmpeg will attempt to copy standard metadata fields — such as title, artist, album, and track number — from the MP4 container's iTunes-style tags into FLAC's Vorbis comment metadata block. However, MP4-specific metadata like chapter markers, embedded cover art stored in certain MP4 tag structures, and multiple audio track labels will not carry over, since FLAC does not support chapters or multiple tracks. It's worth inspecting the output file's tags in a tool like foobar2000 or Kid3 to confirm the metadata transferred as expected.
The -compression_level flag in FLAC controls the balance between encoding speed and output file size — it has absolutely no effect on audio quality, which is always lossless regardless of the level. Level 0 encodes fastest but produces the largest FLAC files; level 8 encodes slowest but produces the smallest files. The default of 5 is a well-established middle ground used by most FLAC encoders. Unless you need faster encoding (use a lower number) or want to minimize file size at the cost of encoding time (use 8), leaving it at 5 is the right choice.
Replace the 5 in -compression_level 5 with any integer from 0 to 8, where higher numbers produce smaller files at the cost of longer encoding time. For example, use ffmpeg -i input.mp4 -vn -c:a flac -compression_level 8 output.flac for maximum compression. Keep in mind the file size difference between level 5 and level 8 is typically only 5–10%, so the tradeoff may not be worth it for most use cases. Level 0 is useful if you're processing many large files and encode speed is a priority.
Yes — on Linux or macOS, you can use a shell loop: for f in *.mp4; do ffmpeg -i "$f" -vn -c:a flac -compression_level 5 "${f%.mp4}.flac"; done. On Windows Command Prompt, use: for %f in (*.mp4) do ffmpeg -i "%f" -vn -c:a flac -compression_level 5 "%~nf.flac". This applies the same extraction settings to every MP4 in the current directory, which is practical for archiving an entire folder of video files as lossless audio.
Technical Notes
MP4 containers most commonly carry AAC audio at 128 kbps or higher, though some MP4 files — particularly those from professional cameras or screen recorders — may contain higher-bitrate AAC at 192 kbps or 320 kbps, or even PCM audio in less common configurations. In all cases, FFmpeg decodes the source audio to PCM internally before encoding to FLAC, so the codec path is always: MP4/AAC → PCM → FLAC. FLAC supports up to 8 channels and sample rates up to 655,350 Hz, so stereo and surround MP4 audio tracks are handled without issue. One known limitation: if the MP4 contains multiple audio tracks (e.g., a commentary track alongside the main audio), this command extracts only the first audio track by default — use -map 0:a:1 to target a specific track by index. FLAC does not support subtitle tracks, chapter data, or embedded video thumbnails, so any of those elements in the MP4 will be silently dropped. The output FLAC file will support ReplayGain tags and cue sheets if added in post-processing, making it well-suited for integration into lossless music library management tools.