Extract Audio from MKV to FLAC — Free Online Tool
Extract the audio from any MKV file and save it as a lossless FLAC file — preserving every bit of the original audio data with no quality loss. Whether the MKV contains AAC, MP3, Opus, Vorbis, or already FLAC audio, this tool re-encodes the stream to FLAC so you get a standalone, archival-quality audio file.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MKV 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
MKV is a container that can hold multiple audio streams encoded in various codecs (AAC, MP3, Opus, Vorbis, FLAC, and others). This tool strips the video stream entirely and re-encodes the first audio track to FLAC — a lossless codec that compresses audio without discarding any data. If the source audio in the MKV is already FLAC, the re-encoding step is technically redundant but still produces a bitwise-identical result at the default compression level 5. If the source audio is lossy (e.g., AAC or Opus), the output FLAC file will be a lossless representation of that lossy signal — the existing lossy artifacts are frozen in place, but no further degradation is introduced. FLAC uses compression_level 5 by default, which balances encode speed and file size without affecting audio fidelity in any way.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this conversion both in the browser (via FFmpeg.wasm) and on your local desktop. |
-i input.mkv
|
Specifies the input Matroska file. FFmpeg reads and demuxes all streams inside the MKV — including video, audio, subtitles, and chapter data — making them available for selective output. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore all video streams from the MKV. This is required because FLAC is a pure audio format and cannot contain any video data. |
-c:a flac
|
Sets the audio codec to FLAC (Free Lossless Audio Codec), re-encoding the MKV's audio track — whatever its original codec (AAC, Opus, Vorbis, etc.) — into a lossless FLAC bitstream. |
-compression_level 5
|
Sets FLAC's compression level to 5, the widely-used default that balances encoding speed and output file size. This setting has no effect on audio fidelity — all FLAC compression levels decode to identical audio. |
output.flac
|
Defines the output filename with the .flac extension, which also signals to FFmpeg to use the FLAC file format muxer for writing the standalone lossless audio file. |
Common Use Cases
- Archive the audio from a high-quality MKV Blu-ray rip as a lossless FLAC file for a personal music or film score collection
- Extract a lossless audio track from an MKV recording of a live concert or musical performance for editing in a DAW like Audacity or Reaper
- Pull the audio from an MKV lecture or documentary to create an archival transcript source, where a lossless file ensures AI transcription tools work from the highest-fidelity input
- Convert MKV game cutscene videos to FLAC to extract original soundtrack music for tagging and organizing in a media library like Plex or Beets
- Extract lossless audio from an MKV video file to use as a reference track when mastering or mixing, where any lossy re-encoding would compromise the comparison
- Separate the audio from an MKV screen recording of a software tutorial to produce a standalone audio file for re-editing into a podcast or narration track
Frequently Asked Questions
No additional quality is lost during this conversion. FLAC is a lossless codec, meaning it compresses the audio mathematically without discarding any audio data. The output FLAC file is a perfect representation of whatever audio was in the MKV. If the MKV's audio track was already lossy (e.g., AAC at 128k or Opus), those original compression artifacts remain in the FLAC — but the conversion itself introduces zero further degradation.
By default, FFmpeg selects the first audio track (usually the primary or default-flagged stream) and encodes it to FLAC. FLAC is a single-stream format and cannot hold multiple audio tracks in one file. If you need to extract a specific track — for example, the second language dub — you would add the flag '-map 0:a:1' to the FFmpeg command to select the second audio stream (zero-indexed).
The '-compression_level' parameter in FLAC controls only the encoding speed and resulting file size — it has absolutely no effect on audio quality. Level 0 encodes very fast with the least compression (larger file), while level 8 encodes slowly with the most compression (smaller file). The default level 5 is a well-established middle ground used by most FLAC tools. All levels produce bitwise-identical audio output when decoded.
FFmpeg will attempt to copy compatible metadata tags from the MKV container to the FLAC file. Standard tags like title, artist, and date transfer cleanly because FLAC supports Vorbis comment-style metadata. However, MKV-specific metadata structures — such as chapter markers, subtitle tracks, and attachment data — are not supported by the FLAC format and will be discarded. If you need chapters preserved, a container like FLAC-within-OGG or a different output format would be required.
Replace the '5' in '-compression_level 5' with any integer from 0 to 8. For example, '-compression_level 8' will produce the smallest possible FLAC file at the cost of slower encoding time, while '-compression_level 0' encodes nearly instantly with a somewhat larger file. The full modified command would look like: ffmpeg -i input.mkv -vn -c:a flac -compression_level 8 output.flac. Remember that no matter which level you choose, the audio quality is identical.
Yes. On Linux or macOS, you can run a shell loop: 'for f in *.mkv; do ffmpeg -i "$f" -vn -c:a flac -compression_level 5 "${f%.mkv}.flac"; done'. On Windows Command Prompt, use: 'for %f in (*.mkv) do ffmpeg -i "%f" -vn -c:a flac -compression_level 5 "%~nf.flac"'. This is especially useful for large collections or files over 1GB, which exceed the browser tool's processing limit.
Technical Notes
The '-vn' flag is essential here — without it, FFmpeg would attempt to encode the video stream into the FLAC output file and fail, since FLAC is a pure audio format with no container for video data. The FLAC codec in FFmpeg supports sample rates from 1Hz to 655,350Hz and bit depths of 16-bit and 24-bit, meaning high-resolution audio from an MKV (such as 24-bit/96kHz content from a Blu-ray rip) is fully supported and preserved. One known limitation is that FLAC files produced by this tool will contain only the first audio stream from the MKV. MKV's support for multiple simultaneous audio tracks (e.g., multiple language dubs or director's commentary) does not carry over to FLAC. Additionally, MKV chapter markers and subtitle tracks are silently dropped since the FLAC format specification has no equivalent structures — though FLAC does support cue sheets as a separate sidecar mechanism outside this conversion workflow.