Extract Audio from MKV to M4A — Free Online Tool
Extract audio from an MKV file and save it as an M4A file using AAC encoding — the same codec used by Apple Music and iTunes. This is ideal when your MKV contains an AAC audio track, since the audio can be passed through with minimal quality loss into an MPEG-4 audio container fully compatible with Apple devices and media players.
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 flexible container that often bundles video, multiple audio tracks, subtitles, and chapters together. This tool strips the video stream entirely using the -vn flag and extracts one audio track, re-encoding it to AAC at 128k bitrate and wrapping it in the M4A container (a restricted variant of the MPEG-4 container used exclusively for audio). Because M4A supports only a single audio track, if your MKV has multiple audio streams, only the default track is extracted. Chapter metadata from the MKV is preserved in the output M4A, since both formats support chapters. Subtitle data and any additional audio tracks are discarded, as the M4A format does not support them.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program. In the browser this runs via FFmpeg.wasm (WebAssembly), so no installation is needed — the same command also works identically in a local terminal if FFmpeg is installed on your system. |
-i input.mkv
|
Specifies the input file — your source MKV container, which may contain video, one or more audio tracks, subtitles, chapters, and other metadata that will be selectively extracted or discarded during this conversion. |
-vn
|
Disables all video stream output. This is essential for producing a valid M4A file, since M4A is an audio-only container and including a video stream would cause an error or a non-conformant output. It also ensures the output file is as small as possible. |
-c:a aac
|
Sets the audio codec to AAC (Advanced Audio Coding), which is the native and default codec for the M4A container. AAC is natively supported on all Apple devices and software, including iTunes, Apple Music, iPhone, and Safari. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which is the default and a reasonable balance between file size and audio quality for general listening. For music or high-fidelity content, increasing this to 256k or 320k will produce noticeably better results. |
-vn
|
A second instance of the -vn flag appears as an output option in this command, explicitly reinforcing that no video stream should be written to the M4A output file. While the first -vn disables video reading, this placement as an output flag ensures the M4A container specification is strictly respected. |
output.m4a
|
The output filename with the .m4a extension, which signals to both FFmpeg and downstream media players that this is an audio-only MPEG-4 file. The .m4a extension ensures correct handling in iTunes, Apple Music, Finder, and web browsers, distinguishing it from a .mp4 file that might be expected to contain video. |
Common Use Cases
- Rip the audio from an MKV movie or TV episode rip to create an M4A file that plays natively in iTunes, Apple Music, or on an iPhone without any app needed.
- Extract a podcast recording or lecture that was captured in MKV format (common with OBS or screen recorders) and convert it to M4A for submission to podcast platforms that prefer AAC-based audio.
- Pull the audio from an MKV music concert or live performance video to build an audio-only library entry in your iTunes or Apple Music collection, retaining chapter markers for individual songs.
- Convert an MKV audiobook file with chapter data into M4A so it works correctly with Apple Books or Overcast, both of which rely on M4A/AAC chapter support for bookmarking.
- Shrink an MKV file that contains only audio (or where the video is irrelevant) into a compact M4A for storage on an iPhone or iPod without wasting space on the unused video stream.
- Prepare audio content originally recorded in MKV for use in an Apple ecosystem workflow — Final Cut Pro, GarageBand, or iMovie — where M4A/AAC is the preferred import format.
Frequently Asked Questions
Yes, there is a small quality loss in this conversion even if the source MKV contains AAC audio, because the audio is decoded and re-encoded rather than stream-copied. This happens because the tool encodes to AAC at 128k bitrate regardless of the original's bitrate. If your source MKV has a high-bitrate AAC track (e.g., 256k or 320k), you can run the FFmpeg command locally and change -b:a 128k to -b:a 256k to better preserve the original quality, or use -c:a copy to stream-copy the AAC track without any re-encoding at all.
Yes. Both MKV and M4A support chapter metadata, and FFmpeg will carry chapter markers from the source MKV into the output M4A file. This makes the conversion particularly useful for MKV audiobooks or concert recordings where chapters mark individual tracks or sections. Players like Apple Music, VLC, and Overcast will display and navigate these chapters correctly in the resulting M4A.
M4A does not support multiple audio tracks, so only one track can be included. FFmpeg will select the default audio stream from the MKV, which is typically the first audio track or whichever track has the 'default' flag set in the container. If you need a specific non-default track, you can run the FFmpeg command locally and add -map 0:a:1 (for the second audio track, zero-indexed) before the output filename to select it explicitly.
M4A is technically an MPEG-4 container (identical to .mp4 at the binary level) but conventionally uses the .m4a extension to signal that it contains audio only — no video. Apple popularized this convention through iTunes. The AAC codec itself is just the audio compression format inside the container; a raw .aac file would have no container at all, meaning no support for chapters, metadata, or gapless playback. M4A gives you those container features while signaling audio-only content to media players.
To change the bitrate, replace -b:a 128k in the command with your preferred value, such as -b:a 256k or -b:a 320k for higher quality, or -b:a 96k for smaller files. For lossless audio, you can switch to FLAC encoding by changing -c:a aac -b:a 128k to -c:a flac, which produces a lossless M4A — though note that lossless M4A files are less universally supported than standard AAC M4A files across Apple devices and software.
The browser tool processes one file at a time, but the displayed FFmpeg command is easy to adapt for batch processing on your desktop. On Linux or macOS, you can run: for f in *.mkv; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k "${f%.mkv}.m4a"; done. On Windows Command Prompt, use: for %f in (*.mkv) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k "%~nf.m4a". This is especially useful for large collections or files over the 1GB browser limit.
Technical Notes
M4A is an audio-only MPEG-4 container that constrains which codecs are permitted — AAC is by far the most common, with FLAC and Opus also supported by recent FFmpeg builds but with variable player compatibility. The -vn flag is mandatory here because without it, FFmpeg would attempt to copy or encode the video stream into the M4A container, which would either fail or produce a non-conformant file. MKV's rich subtitle and multi-track audio features are fully discarded in this conversion: M4A supports neither subtitles nor multiple audio streams. Chapter metadata is the one structural feature that survives intact, making this conversion well-suited for audiobooks and segmented recordings. One important consideration is that if the source MKV audio is encoded in a non-AAC codec (such as libopus, libvorbis, FLAC, or MP3), the re-encoding to AAC at 128k will be a cross-codec transcode, and the quality difference may be more noticeable at lower bitrates. The output M4A is compatible with iTunes metadata tagging, gapless playback in Apple Music, and direct web playback via the HTML5 audio element in most modern browsers.