Extract Audio from MKV to AIF — Free Online Tool
Extract audio from an MKV video file and save it as a lossless AIF file, perfect for Mac-based audio workflows. The conversion decodes whatever audio codec is in the MKV — AAC, MP3, Opus, FLAC, or Vorbis — and re-encodes it to uncompressed 16-bit big-endian PCM, the native format Apple's AIF container uses.
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 files can carry audio encoded in a variety of compressed codecs — most commonly AAC or FLAC, but also Opus, Vorbis, or MP3. None of these can be stored directly inside an AIF container, which only supports raw PCM audio. During this conversion, FFmpeg discards the video stream entirely and decodes the MKV's audio stream from its compressed format back to raw audio samples, then writes those samples as uncompressed 16-bit big-endian PCM (pcm_s16be) inside an AIF wrapper. This is a full decode-and-re-encode of the audio — not a remux — so the output file will be significantly larger than the source. If your MKV's audio was lossless (e.g., FLAC), the AIF output is a true lossless representation. If the source audio was lossy (e.g., AAC or Opus), the AIF output is an uncompressed copy of that lossy signal — no further quality is lost, but the lost quality from the original encoding cannot be recovered.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that powers this conversion entirely within your browser via WebAssembly (FFmpeg.wasm) — no server upload required. |
-i input.mkv
|
Specifies the input file — in this case an MKV (Matroska) container, which may contain video, one or more audio tracks (in codecs like AAC, FLAC, Opus, or MP3), subtitles, and chapter markers. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore all video streams in the MKV. This is required because AIF is a pure audio container and cannot hold video data — omitting this flag would cause the conversion to fail. |
-c:a pcm_s16be
|
Sets the audio codec to 16-bit signed big-endian PCM, the uncompressed audio format native to AIF files. FFmpeg will fully decode whatever compressed audio codec (AAC, FLAC, Opus, etc.) is in the MKV and re-encode it as raw PCM samples in the byte order AIF expects. |
output.aif
|
Specifies the output filename with the .aif extension, which tells FFmpeg to wrap the uncompressed PCM audio in an Audio Interchange File Format container — the lossless, uncompressed format widely used in Apple's professional and consumer audio applications. |
Common Use Cases
- Extracting the audio from an MKV film rip to import into Logic Pro or GarageBand, which natively prefer AIF files for sample libraries and project assets
- Archiving the audio track of an MKV documentary as a lossless AIF master before further editing or mastering in a Mac-based DAW
- Pulling a FLAC-encoded audio track out of an MKV container and converting it to uncompressed AIF for compatibility with Pro Tools sessions that require PCM audio
- Creating a lossless AIF version of a lecture or conference recording stored as MKV for distribution to audio editors working on macOS
- Stripping the audio from an MKV screen recording to produce a clean, uncompressed AIF file for use as a voiceover asset in Final Cut Pro
- Converting an MKV music video's audio track to AIF so it can be imported into iTunes or Music on Mac without any transcoding step on Apple's side
Frequently Asked Questions
No — converting a lossy-compressed audio track (AAC, Opus, MP3, or Vorbis) to uncompressed AIF does not restore any quality that was removed during the original compression. The AIF file will be an exact uncompressed copy of what the lossy decoder produces, which means it will be much larger than the MKV audio track but will not sound better than the source. For a true lossless result, the audio in the MKV must itself have been lossless — such as FLAC — before conversion.
AIF stores audio as raw, uncompressed PCM samples with no compression applied whatsoever. A single minute of 16-bit stereo audio at 44.1 kHz consumes roughly 10 MB in an AIF file. By contrast, an AAC stream in an MKV might represent the same audio in under 1 MB. The dramatic size increase is expected and is the cost of storing fully uncompressed audio — it is the same tradeoff as WAV versus MP3.
MKV files can carry rich metadata, but the AIF format has very limited metadata support compared to formats like FLAC or MP3. FFmpeg will attempt to map common tags (title, artist, album) into the AIF file's MARK and NAME chunks, but complex or custom MKV metadata fields will not survive the conversion. If metadata preservation is critical to your workflow, consider using the AIF file alongside a sidecar file or reviewing the tags in your DAW after import.
By default, FFmpeg selects the first audio track (stream index 0:a:0) in the MKV. Since AIF does not support multiple audio tracks, only one stream can be written to the output. If you need a different audio track — for example, a surround mix or a different language — you can modify the FFmpeg command by adding '-map 0:a:1' (for the second audio track) before the output filename to select a specific stream.
Yes. The default command uses pcm_s16be, which produces 16-bit big-endian PCM audio — the most compatible AIF variant. If you want higher bit depth, replace '-c:a pcm_s16be' with '-c:a pcm_s24be' for 24-bit or '-c:a pcm_s32be' for 32-bit PCM. This is especially useful if your MKV contains a FLAC audio track encoded at 24-bit, as 24-bit AIF will preserve that full resolution. Most DAWs on macOS handle all three depths without issue.
You can run the conversion in a loop from the command line. On macOS or Linux, use: 'for f in *.mkv; do ffmpeg -i "$f" -vn -c:a pcm_s16be "${f%.mkv}.aif"; done'. On Windows Command Prompt, use: 'for %f in (*.mkv) do ffmpeg -i "%f" -vn -c:a pcm_s16be "%~nf.aif"'. Each MKV in the folder will be processed sequentially, producing a matching AIF file. Note that because AIF is uncompressed, batch processing many large MKV files will generate very large output files quickly.
Technical Notes
The AIF format stores audio in big-endian byte order, which reflects its Apple origins — the Motorola 68000 processors in early Macs were big-endian architectures. The default codec in this conversion, pcm_s16be, means signed 16-bit integer samples in big-endian order, which is the most universally supported AIF variant across macOS applications including Logic Pro, GarageBand, Final Cut Pro, and iTunes/Music. The MKV container's flexibility means the source audio codec is unpredictable — FFmpeg handles the decoding transparently regardless of whether it is AAC, Opus, libvorbis, MP3, or FLAC. One important limitation: MKV supports multiple audio tracks and subtitles, none of which carry over to AIF, which is a simple single-stream audio container with no subtitle or chapter support. If your MKV audio is encoded in 5.1 or 7.1 surround, the AIF output will retain all those channels as multi-channel PCM, but compatibility with stereo-only applications may require a downmix step. The '-vn' flag is essential here — without it, FFmpeg would attempt to encode the video stream into the output and fail, since AIF cannot contain video data.