Convert MKV to FLAC — Free Online Tool

Extract and convert the audio track from an MKV video file into a lossless FLAC file — preserving every detail of the original audio with zero quality loss. Ideal for archiving high-quality audio from MKV sources that may contain FLAC, AAC, MP3, or Opus audio streams.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

When converting MKV to FLAC, FFmpeg reads the audio stream from the Matroska container and re-encodes it using the FLAC codec, which compresses audio data losslessly. If the MKV already contains a FLAC audio track, the stream could theoretically be copied directly, but re-encoding to FLAC still guarantees a clean, standalone lossless file. If the source audio is lossy (e.g., AAC or Opus), the resulting FLAC will be lossless in format but cannot recover the quality already lost by that prior lossy encoding — it will faithfully preserve whatever fidelity remains. The video stream is discarded entirely, since FLAC is a pure audio format. Only the first audio track is extracted; MKV files with multiple audio tracks require additional flags to select a specific track.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, which is the open-source multimedia processing engine powering both this browser tool (via WebAssembly) and local desktop conversions.
-i input.mkv Specifies the input file — in this case a Matroska MKV file, which may contain video, one or more audio tracks, subtitles, and chapters. FFmpeg reads all streams but only the audio is used in this conversion.
-c:a flac Sets the audio codec to FLAC (Free Lossless Audio Codec), encoding the extracted MKV audio stream into a losslessly compressed format. No audio quality is lost regardless of the source audio's bit depth or sample rate.
-compression_level 5 Controls FLAC's compression effort on a scale of 0 to 8. Level 5 is the standard default — it produces smaller files than level 0 without meaningfully slowing down encoding. This setting has no effect on audio quality; all levels decode to identical audio data.
output.flac The name of the resulting FLAC file. The .flac extension tells FFmpeg to use the FLAC container, which is a simple audio-only format — the MKV's video stream, subtitles, and chapters are not included.

Common Use Cases

  • Archiving the lossless audio score or soundtrack from a Blu-ray rip stored as an MKV, where preserving every detail matters for long-term storage
  • Extracting a high-quality audio commentary track from an MKV movie file to listen to separately in an audio player
  • Pulling the audio from an MKV concert video to create a lossless FLAC music file for audiophile listening or a lossless music library
  • Converting an MKV screen recording that captured system audio at high quality into a standalone FLAC for transcription or audio editing in a DAW
  • Separating dialogue or narration from an MKV lecture or documentary video into a lossless FLAC for further processing or archiving
  • Preserving the uncompressed or losslessly-encoded audio from an MKV anime episode for fansub or translation projects that require an unmodified audio reference

Frequently Asked Questions

It depends on the audio codec inside the MKV. If the source MKV contains a lossless audio stream — such as FLAC, PCM, or TrueHD — then converting it to FLAC preserves full, bit-perfect audio quality. However, if the MKV's audio track is already lossy (AAC, MP3, or Opus are common in MKV files), the FLAC output will capture that lossy audio exactly as it is, but cannot restore detail that was discarded during the original lossy encoding. FLAC itself never introduces any additional quality loss.
FLAC is a pure audio format and cannot contain video data, so the video stream from the MKV is completely discarded during this conversion. Only the audio is extracted and encoded. If you need to keep the video, consider extracting audio to a separate FLAC file while keeping the original MKV, rather than replacing it.
The -compression_level flag controls how hard the FLAC encoder works to compress the audio data, on a scale from 0 (fastest, largest file) to 8 (slowest, smallest file). Critically, this setting affects only file size and encoding speed — not audio quality. All compression levels produce bit-identical audio when decoded. Level 5 is the widely accepted default that balances encoding speed and file size well. For batch processing large MKV libraries, level 0 or 1 will encode much faster with only a modest increase in file size.
By default, FFmpeg selects the first audio track (stream index 0) in the MKV file. If your MKV contains multiple audio tracks — such as a Japanese and English dub, or a commentary track alongside the main audio — you need to specify which track to extract. Add the flag -map 0:a:1 before the output filename to select the second audio track, or -map 0:a:2 for the third, and so on. You can inspect all tracks in an MKV by running ffmpeg -i input.mkv in a terminal.
Simple metadata tags such as title, artist, album, and track number are generally carried over from the MKV's Matroska metadata into the FLAC file's Vorbis comment tags, which is the native metadata format for FLAC. However, MKV-specific structures such as chapters, subtitle tracks, and complex attachment data are not supported by FLAC and will be dropped. If your MKV has chapter markers you want to preserve, consider exporting a cue sheet separately before converting.
To convert an entire folder of MKV files to FLAC on your desktop, you can use a shell loop. On Linux or macOS, run: for f in *.mkv; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.mkv}.flac"; done. On Windows Command Prompt, use: for %f in (*.mkv) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac". This is especially useful for files over 1GB, which exceed this browser tool's limit but can be processed freely with FFmpeg installed locally.

Technical Notes

FLAC supports sample rates up to 655,350 Hz and bit depths up to 32 bits, so it can faithfully represent virtually any audio source found in an MKV file, including 24-bit/96 kHz or 24-bit/192 kHz high-resolution audio from Blu-ray rips. One important limitation is that FLAC does not support multichannel layouts beyond 8 channels, though this is rarely a practical concern. MKV files may contain Dolby TrueHD or DTS-HD MA streams; FFmpeg will decode these and re-encode them as FLAC, which is a lossless-to-lossless conversion preserving full fidelity. FLAC supports Replay Gain tags, which can be added after conversion with a tool like loudgain if you want consistent volume normalization across a music library. Because FLAC is an audio-only format, subtitle streams, chapter markers, and font attachments embedded in the MKV are silently discarded — if these matter, archive the original MKV alongside the FLAC output.

Related Tools