Convert M4V to MKV — Free Online Tool

Convert M4V files to MKV by remuxing Apple's iTunes-compatible container into the open Matroska format, preserving your H.264 or H.265 video and AAC audio streams without re-encoding. This is especially useful for stripping M4V's Apple ecosystem restrictions and gaining access to MKV's superior subtitle, chapter, and multi-track metadata support.

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

M4V is Apple's flavor of the MPEG-4 container, and MKV (Matroska) is an open container capable of holding nearly any codec combination. Since both formats support H.264 (libx264) and AAC natively, this conversion re-encodes the video using libx264 at CRF 23 and passes AAC audio through at 128k bitrate. In practice, if the source M4V already uses H.264 and AAC — which is the overwhelming majority of iTunes and iOS-originated M4V files — the quality difference is minimal at default settings, but the output is now in a universally supported, DRM-free open container. M4V-specific metadata like Apple chapter markers and iTunes tags are translated into MKV's native chapter and metadata structures where possible.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that performs the actual M4V parsing, decoding, re-encoding, and MKV muxing. When running in this browser tool, this is executed via FFmpeg.wasm, a WebAssembly port of FFmpeg that runs entirely client-side.
-i input.m4v Specifies the input file — your source M4V, which FFmpeg reads as an Apple MPEG-4 container and demuxes into its constituent video and audio streams for processing.
-c:v libx264 Sets the video encoder to libx264, which re-encodes the video stream as H.264. Since most M4V files already contain H.264 video, this maintains broad compatibility while giving you control over quality via CRF; if your M4V source is already H.264, you could alternatively use '-c:v copy' to skip re-encoding entirely.
-c:a aac Sets the audio encoder to AAC, which re-encodes the audio stream using FFmpeg's native AAC encoder. M4V files almost universally contain AAC audio already, so this maintains the same codec family while ensuring the audio is cleanly muxed into the MKV container.
-crf 23 Sets the Constant Rate Factor for the libx264 video encoder to 23, which is the default and represents a balanced tradeoff between visual quality and file size for H.264. Lower values (e.g., 18) produce larger, higher-quality files; higher values (e.g., 28) produce smaller files with more visible compression artifacts.
-b:a 128k Sets the AAC audio output bitrate to 128 kilobits per second, which is sufficient for standard stereo content from iTunes M4V sources. Increase to 192k or 256k if the source M4V contains high-bitrate or surround audio that warrants it.
output.mkv Specifies the output filename with the .mkv extension, which tells FFmpeg to mux the encoded video and audio streams into a Matroska container — the open, flexible format that will hold your converted content with full chapter and multi-track support.

Common Use Cases

  • Moving iTunes video purchases (once DRM-free) into a Plex or Jellyfin media server that prefers MKV for its richer subtitle and multi-audio-track support
  • Preparing M4V files recorded on iOS devices or exported from Final Cut Pro for editing in DaVinci Resolve or other software that handles MKV more reliably than M4V
  • Archiving Apple TV show downloads in the open Matroska format to ensure long-term compatibility independent of Apple's ecosystem or iTunes software
  • Adding external SRT or ASS subtitle tracks to a video originally stored as M4V, since MKV's subtitle support is far more flexible and widely supported by media players like VLC and mpv
  • Consolidating a mixed video library into a single container format for use with media players on Linux or Android, where M4V support can be inconsistent
  • Converting M4V lecture recordings or screencasts exported from Mac software into MKV for upload to platforms or sharing with collaborators who work outside the Apple ecosystem

Frequently Asked Questions

At the default CRF 23 setting, the re-encoding introduces a small but measurable quality loss compared to a true lossless copy, because the video is decoded and re-encoded rather than stream-copied. However, CRF 23 with libx264 is considered visually transparent for most content — most viewers cannot distinguish it from the source at typical viewing distances. If you want to minimize quality loss, lower the CRF value (e.g., CRF 18) in the command, which increases file size but preserves more detail. The AAC audio at 128k is also re-encoded, but this is generally indistinguishable from the source for standard stereo content.
It actually can, if the source M4V contains a codec MKV also supports — and for H.264 or H.265, you could use '-c:v copy -c:a copy' to remux without re-encoding at all, which would be faster and lossless. The default command shown here uses libx264 re-encoding to ensure broad compatibility and to give you explicit control over quality settings. If you know your M4V source is already H.264/AAC, replacing '-c:v libx264 -c:a aac' with '-c:v copy -c:a copy' in the command will produce an identical-quality MKV nearly instantaneously.
FFmpeg does carry over chapter metadata from M4V to MKV in most cases, since both formats have native chapter support. M4V stores chapters in Apple's QuickTime-style chapter track format, and FFmpeg translates these into MKV's chapter block format automatically during conversion. You can verify the chapters were preserved by opening the output MKV in VLC or mpv and checking the Playback > Chapters menu.
By default, FFmpeg maps only the first detected audio and video stream unless you explicitly tell it to include all streams. If your M4V contains multiple audio tracks or embedded subtitles (common in iTunes purchases), add '-map 0' before the output filename to copy all streams into the MKV. MKV natively supports multiple audio tracks and a wide range of subtitle formats, so none of these streams need to be discarded or converted.
To change video quality, modify the '-crf' value: lower numbers mean better quality and larger files (CRF 18 is near-visually lossless), while higher numbers reduce quality and file size (CRF 28 is noticeably compressed). To change audio bitrate, modify the '-b:a' value — common options are 96k (smaller, acceptable for speech), 192k (high quality stereo), or 320k (maximum quality). For example, a high-quality archival command would look like: 'ffmpeg -i input.m4v -c:v libx264 -c:a aac -crf 18 -b:a 192k output.mkv'.
Yes — on Linux or macOS, you can run a simple shell loop: 'for f in *.m4v; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.m4v}.mkv"; done'. On Windows Command Prompt, use: 'for %f in (*.m4v) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "%~nf.mkv"'. This processes each M4V file in the current directory and outputs a corresponding MKV with the same base filename. The browser-based tool processes one file at a time, so the FFmpeg command is particularly valuable for batch workflows.

Technical Notes

M4V is structurally very close to MP4 — it uses the same ISOBMFF (ISO Base Media File Format) foundation — but includes Apple-specific extensions for DRM (FairPlay), iTunes metadata (cover art, ratings, content advisories), and a proprietary chapter track implementation. FFmpeg can read non-DRM-protected M4V files fully; DRM-encrypted M4V files cannot be processed by FFmpeg or this tool. The conversion to MKV drops the '-movflags +faststart' flag that M4V uses for HTTP streaming (moov atom at the front of the file), since MKV uses a different seeking mechanism and does not require this optimization. iTunes-specific tags like 'tvsh' (TV show name), 'tven' (episode number), and cover art embedded in the M4V will not all survive the conversion intact, as MKV uses a different metadata schema; standard tags like title and artist are preserved, but Apple-proprietary fields may be lost. MKV's flexibility means the output file can later be extended with external subtitle tracks using 'mkvmerge' without re-encoding, making this conversion a solid first step for any archival or post-production workflow.

Related Tools