Convert MKV to AIF — Free Online Tool

Convert MKV video files to AIF audio by extracting and decoding the audio stream to uncompressed PCM — perfect for Mac users who need lossless audio from video content. The video is discarded entirely, and any compressed audio codec inside the MKV (AAC, MP3, Opus, etc.) is decoded and re-encoded as 16-bit big-endian PCM, the native AIF format.

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

MKV is a flexible container that can hold nearly any codec combination, so its audio track might be AAC, MP3, Opus, Vorbis, or FLAC. During this conversion, FFmpeg discards all video streams and decodes the first audio stream from its compressed format into raw PCM samples, which are then written as 16-bit big-endian PCM (pcm_s16be) into an AIF container. Because AIF stores audio as uncompressed PCM, this process always involves full decoding of the source audio — there is no stream-copy shortcut even if the MKV contained FLAC. The result is a lossless AIF file whose quality ceiling is determined by the quality of the original MKV audio track.

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 the desktop command line.
-i input.mkv Specifies the input file — an MKV (Matroska) container, which may contain video, one or more audio tracks encoded in formats like AAC, MP3, Opus, Vorbis, or FLAC, plus optional subtitles and chapters.
-c:a pcm_s16be Sets the audio codec for the output to signed 16-bit big-endian PCM, which is the standard uncompressed audio encoding required by the AIF format. Whatever compressed audio codec was inside the MKV is fully decoded and re-encoded into these raw PCM samples.
output.aif Specifies the output filename with the .aif extension, which tells FFmpeg to write an Audio Interchange File Format container — an Apple-native lossless audio file containing the uncompressed PCM audio extracted from the MKV source.

Common Use Cases

  • Extracting a clean, uncompressed audio track from an MKV film rip to import into Logic Pro or GarageBand for audio post-production on a Mac
  • Pulling the audio from an MKV lecture or conference recording into AIF format for editing in Apple's audio tools where AIF is the preferred native format
  • Converting an MKV music video download to AIF so the audio can be imported losslessly into a DJ library or sample pack
  • Archiving the audio commentary track from an MKV Blu-ray rip as a standalone AIF file for long-term storage in an uncompressed format
  • Extracting game cinematic audio stored in MKV format into AIF for use as sound assets in a Mac-based game development pipeline
  • Preparing audio from an MKV podcast recording for mastering in a professional Mac DAW that requires uncompressed AIF input files

Frequently Asked Questions

It depends entirely on the codec inside your MKV file. If the MKV contains a lossy codec like AAC, MP3, or Opus, that quality loss already exists in the source and cannot be recovered — the AIF output will be an uncompressed copy of those already-lossy samples. If the MKV contains a lossless codec like FLAC, the decode-to-PCM step is mathematically lossless, giving you a true lossless AIF. In no case does the conversion to AIF introduce any additional quality degradation beyond what was already in the source.
AIF is a simple audio-only format designed to hold a single audio stream, so it has no concept of multiple tracks or streams. FFmpeg will automatically select the first audio stream from your MKV (usually the default or highest-priority track). If you need a specific track — for example, a director's commentary or a different language dub — you would need to add a stream selector flag like '-map 0:a:1' to the FFmpeg command to pick the second audio stream.
All of it is discarded. AIF does not support subtitles, chapter markers, or rich metadata containers like those found in MKV. The output AIF file will contain only the raw audio PCM data and minimal standard AIF header fields. If preserving chapters or subtitle timing data matters for your workflow, you should export that information separately before converting.
Replace 'pcm_s16be' with 'pcm_s24be' in the command: 'ffmpeg -i input.mkv -c:a pcm_s24be output.aif'. AIF supports 16-bit (pcm_s16be), 24-bit (pcm_s24be), and 32-bit (pcm_s32be) signed big-endian PCM. Choosing 24-bit is common for professional audio work since it provides greater dynamic range headroom. Note that if your MKV source audio was captured at 16-bit, upsizing to 24-bit does not recover lost detail — it simply stores the same information in a wider container.
Yes, on the command line you can use a shell loop to process multiple files. On macOS or Linux, the command would be: 'for f in *.mkv; do ffmpeg -i "$f" -c:a pcm_s16be "${f%.mkv}.aif"; done'. This iterates over every MKV in the current directory, extracts the audio, and writes a matching AIF file. The browser-based tool on this page processes one file at a time, so the FFmpeg command shown is most useful for batch jobs exceeding that workflow.
MKV files almost always use compressed audio codecs like AAC, Opus, or MP3, which can reduce audio file size by 80–90% compared to uncompressed audio. AIF stores audio as raw, uncompressed PCM samples, so a 10-minute stereo track at 44.1 kHz and 16-bit depth will always be approximately 100 MB regardless of how small the compressed source was. This size increase is expected and is the direct result of converting to an uncompressed lossless format.

Technical Notes

AIF uses big-endian byte ordering (a convention inherited from classic Motorola-based Mac hardware), which is why the codec name is pcm_s16be — 's16' denotes signed 16-bit integers and 'be' denotes big-endian. This differs from WAV, which uses little-endian PCM (pcm_s16le). The sample rate from the source MKV audio stream is preserved by default; if your MKV audio is at 48 kHz (common for video production), the AIF output will also be 48 kHz. If you need a specific sample rate for compatibility — for instance, 44.1 kHz for CD-standard audio — add '-ar 44100' to the FFmpeg command. Only the first audio stream in the MKV is converted; any additional audio tracks, video streams, subtitle streams, and chapter metadata are fully discarded since AIF has no mechanism to store them. AIF is natively supported by macOS, Logic Pro, GarageBand, Pro Tools, and most professional Mac audio software without any additional codec installation.

Related Tools