Convert MP4 to FLAC — Free Online Tool
Extract and convert audio from MP4 video files into FLAC, a lossless compressed format that preserves every bit of the original audio signal. Ideal for archiving high-quality audio from video sources without any quality degradation — the FLAC codec compresses audio to roughly 50–60% of uncompressed WAV size while remaining bit-for-bit identical to the source.
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
During this conversion, FFmpeg strips the video stream entirely and re-encodes the audio stream from the MP4 container into FLAC. If the MP4's audio is encoded in AAC or MP3 (both lossy formats), the audio is decoded to raw PCM first, then re-encoded using the FLAC codec — a lossless compression step. This means the output FLAC will be lossless relative to its own encoding, but it cannot recover quality lost during the original lossy encoding in the MP4. If the MP4 source contains uncompressed PCM audio (rare but possible), the resulting FLAC will be a true lossless representation. The compression level parameter controls encode speed and file size but never affects audio fidelity — all FLAC compression levels are mathematically lossless.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that handles the demuxing of the MP4 container, decoding of the audio stream, and encoding to FLAC. |
-i input.mp4
|
Specifies the input MP4 file. FFmpeg reads and demuxes all streams from the MP4 container — video, audio, subtitles, and chapters — though only the audio stream will be used in this conversion. |
-c:a flac
|
Instructs FFmpeg to encode the audio stream using the FLAC (Free Lossless Audio Codec) encoder. The decoded PCM audio from the MP4's AAC or MP3 track is re-encoded into lossless FLAC format. No video codec is specified because FLAC is audio-only and the video stream is automatically discarded. |
-compression_level 5
|
Sets the FLAC compression effort to level 5 on a scale of 0 (fastest, largest file) to 8 (slowest, smallest file). Level 5 is the FLAC default and provides a good balance between encoding speed and file size — all levels produce bit-for-bit identical audio output, so this setting never trades quality for size. |
output.flac
|
Specifies the output filename with the .flac extension, which tells FFmpeg to write a FLAC-formatted audio file. The resulting file contains only the losslessly compressed audio stream with no video, subtitle, or chapter data. |
Common Use Cases
- Archiving the audio soundtrack from a concert or live performance video in lossless quality for long-term preservation
- Extracting dialog or voiceover audio from a video production file to deliver to an audio mastering engineer who requires lossless source material
- Pulling the audio track from a high-resolution music video download (MP4) to add to a lossless music library managed by software like foobar2000 or Plex
- Converting recorded interview or podcast video files to FLAC as an archival master before producing compressed MP3 or AAC distribution copies
- Extracting instrument recordings or backing tracks from a video session file for use in a DAW (Digital Audio Workstation) that accepts FLAC input
- Converting educational or documentary video audio to FLAC for accessibility archiving where bit-perfect reproduction of the original capture is required
Frequently Asked Questions
No. If the MP4's audio track is AAC or MP3 — which is typical — those are lossy formats and any quality loss from their original encoding is permanent. FFmpeg decodes the lossy AAC or MP3 to PCM and then encodes that PCM to FLAC losslessly, so the FLAC is a perfect lossless copy of what the lossy decoder produced, not of the original recording. You will not gain quality that was never in the source file. However, no additional quality is lost in the conversion itself.
The FLAC output will typically be smaller than the MP4 in total file size because it contains only the audio stream — the video, subtitles, and chapter data are all dropped. However, the audio-only FLAC file will often be significantly larger than the audio portion inside the MP4 alone, because FLAC lossless compression is less space-efficient than the lossy AAC or MP3 codec used in most MP4 files. For a typical stereo AAC 128k audio track, the equivalent FLAC may be 3–5 times larger in audio data terms.
No. FLAC is a single-stream audio format and does not support multiple audio tracks, subtitle tracks, or chapters. Only the first (default) audio stream from the MP4 will be extracted and converted. If your MP4 contains multiple audio tracks — such as multiple languages or commentary — you would need to run separate FFmpeg commands with the '-map 0:a:1', '-map 0:a:2' flags to extract each track individually.
FFmpeg will attempt to copy compatible metadata tags from the MP4 container into the FLAC file's Vorbis comment metadata block, which is the native tagging format for FLAC. Common tags such as title, artist, album, and date are generally preserved. However, MP4-specific metadata fields (such as iTunes-style atoms or cover art embedded in certain ways) may not transfer perfectly, so you may want to verify and clean up tags using a tool like Mp3tag or beets after conversion.
You can change the compression level by adjusting the number after '-compression_level' to any integer from 0 to 8. Level 0 compresses the least and encodes fastest, while level 8 compresses the most but takes significantly longer to encode. Crucially, all levels produce identical audio output — the difference is purely in file size and CPU time. The default level of 5 is a well-balanced choice. For example, use 'ffmpeg -i input.mp4 -c:a flac -compression_level 8 output.flac' for maximum compression, or '-compression_level 0' for fastest encoding when storage space is not a concern.
Yes. On Linux or macOS, you can run a shell loop: 'for f in *.mp4; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.mp4}.flac"; done'. On Windows Command Prompt, use: 'for %f in (*.mp4) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac"'. This will process every MP4 in the current directory and produce a matching FLAC file for each, making it efficient to convert an entire video library to lossless audio archives.
Technical Notes
FLAC supports sample rates up to 655,350 Hz and bit depths of 4 to 32 bits per sample, making it more than capable of handling any audio quality found in a typical MP4 file (commonly 44.1 kHz or 48 kHz at 16-bit or 24-bit). When extracting audio from MP4 files encoded with AAC — which operates internally at 32-bit float — the decoded PCM output is typically converted to 16-bit or 32-bit integer PCM before FLAC encoding; FFmpeg handles this automatically. Note that FLAC does not support multi-channel layouts beyond 8 channels, which is rarely a limitation for video sources. The FLAC format natively supports Replay Gain tags and cue sheets for indexing, which can be added post-conversion using tools like metaflac. One important limitation: FLAC has no native support for embedded cover art in the same way MP4 does, though some FLAC implementations (and the format's specification) do allow a PICTURE metadata block for cover art — FFmpeg will attempt to copy cover art if present in the MP4 metadata stream.