Extract Audio from MKV to ALAC — Free Online Tool
Extract audio from an MKV file and save it as ALAC (Apple Lossless Audio Codec) in an M4A container — preserving every bit of the original audio with zero quality loss. ALAC is ideal for Apple ecosystem users who want lossless fidelity in iTunes, Apple Music, or on iOS and macOS devices.
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
This tool reads the MKV container and discards all video streams entirely, then re-encodes the audio stream using Apple's ALAC codec into an M4A (MPEG-4) container. Because ALAC is lossless, the output audio is mathematically identical to what you'd get from decoding the source — no audio information is discarded. However, this is a full re-encode rather than a stream copy, meaning the audio is decoded from whatever codec the MKV uses (commonly AAC, Opus, Vorbis, MP3, or FLAC) and then re-encoded into ALAC. If the source audio in the MKV is already lossless (e.g., FLAC), the ALAC output will be a perfect lossless representation. If the source is lossy (e.g., AAC or Opus), the ALAC output will be a lossless capture of that already-lossy signal — no further degradation occurs, but the original lossy compression artifacts are preserved.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all demuxing, decoding, encoding, and muxing in this conversion pipeline. |
-i input.mkv
|
Specifies the input Matroska file. FFmpeg reads the MKV container and identifies all contained streams — video, audio, subtitles, and chapters — making them available for processing. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore all video streams from the MKV. This is essential for audio extraction — without it, FFmpeg would attempt to include video in the output, which the M4A/ALAC format cannot hold. |
-c:a alac
|
Sets the audio codec to ALAC (Apple Lossless Audio Codec), instructing FFmpeg to encode the decoded audio stream into lossless ALAC format compatible with Apple devices, iTunes, and Apple Music. This flag appears twice in the raw command; FFmpeg uses the final effective value, which is 'alac'. |
output.m4a
|
Defines the output file name and format. The .m4a extension tells FFmpeg to mux the ALAC-encoded audio into an MPEG-4 container, which is the standard and natively supported container for ALAC audio on all Apple platforms. |
Common Use Cases
- Extracting the audio soundtrack from an MKV movie or TV episode rip to build a lossless music library playable in Apple Music or iTunes
- Pulling lossless audio from an MKV that contains a FLAC track — converting it to ALAC so it syncs to an iPhone or iPad without transcoding penalties
- Converting MKV concert recordings or live performance videos to ALAC for archival-quality audio on Apple devices
- Stripping audio from an MKV video project to get a lossless ALAC master for audio editing in GarageBand or Logic Pro
- Preparing MKV-sourced audiobook or lecture recordings as ALAC M4A files for native playback in Apple's Books or Podcasts apps
- Creating an Apple-compatible lossless audio backup of an MKV file's audio track before editing or distributing the video
Frequently Asked Questions
ALAC itself is lossless, so the encoding step introduces no degradation. The key factor is the source audio in your MKV. If the MKV contains a lossless audio track (such as FLAC or PCM), your ALAC output will be a perfect copy of that audio. If the MKV contains a lossy track (such as AAC, Opus, or Vorbis), the ALAC file will be a lossless snapshot of that already-lossy audio — no additional quality is lost, but you won't recover quality that lossy compression already discarded.
ALAC is a codec, not a container format. The audio data encoded with ALAC is stored inside an MPEG-4 container, which uses the .m4a file extension. This is the standard and expected format for ALAC files, and it's what Apple devices, iTunes, and Apple Music all natively recognize and play. You should not rename the file to .alac — .m4a is correct.
By default, FFmpeg selects the first audio stream it finds in the MKV. MKV files commonly contain multiple audio tracks (for example, different languages or commentary tracks). If you need a specific track, you can modify the FFmpeg command to target it using the -map flag, such as adding '-map 0:a:1' to select the second audio track. The tool's displayed FFmpeg command gives you a starting point to customize locally for multi-track files.
Both MKV and the M4A container support chapters, so FFmpeg will attempt to carry chapter metadata through to the output. However, ALAC M4A's chapter support is limited compared to MKV, and compatibility depends on the player. Apple-native apps like iTunes and Apple Music have limited chapter display for M4A audio files. If chapters are critical, verify playback in your target application after conversion.
ALAC is a lossless codec and does not use a bitrate setting — there is no '-b:a' flag to adjust. The output file size and bit depth are determined entirely by the source audio's sample rate, bit depth, and channel count. If you want a smaller file with adjustable quality, you would choose a lossy codec like AAC instead of ALAC. For ALAC, the only way to reduce file size is to downsample the source audio, which is a separate operation.
The displayed command processes one file at a time, but you can easily loop it in a shell script. On Linux or macOS, use: 'for f in *.mkv; do ffmpeg -i "$f" -vn -c:a alac "${f%.mkv}.m4a"; done'. On Windows Command Prompt, use: 'for %f in (*.mkv) do ffmpeg -i "%f" -vn -c:a alac "%~nf.m4a"'. This is especially useful for files over 1GB that exceed the browser tool's limit.
Technical Notes
ALAC encodes audio at whatever bit depth and sample rate the source provides — commonly 16-bit/44.1 kHz for standard audio or up to 24-bit/192 kHz for high-resolution sources. Because MKV can carry audio in virtually any codec, the re-encode path varies: FLAC-sourced audio decodes and re-encodes losslessly (FLAC and ALAC are both lossless, so no quality difference), while AAC or Opus sources will be decoded to PCM and then losslessly compressed as ALAC, preserving the lossy signal faithfully. The resulting M4A file will typically be larger than a lossy equivalent (such as AAC at 256k) but smaller than uncompressed WAV/AIFF, as ALAC typically achieves 40–60% compression over raw PCM. Metadata tags (artist, title, album) from the MKV are partially carried over, though MKV and M4A use different tagging schemas and some fields may not map perfectly. Subtitle streams are not supported by the M4A/ALAC format and are dropped entirely. The codec flag '-c:a alac' appears twice in the raw command due to how the tool constructs arguments — FFmpeg respects the last valid instance, so output is unaffected.