When you save or share video, the format you choose affects compatibility, quality, and file size. This article compares the four formats FFmpeg users handle most often: MP4, WebM, MOV, and MKV.

Tested with: FFmpeg 6.1 (ubuntu-latest / GitHub Actions CI-verified)


Format Cheat Sheet

MP4WebMMOVMKV
Extension.mp4.webm.mov.mkv
StandardISO/IECGoogle/W3CApple proprietaryMatroska
Browser playbackExcellentExcellentFairFair
Mobile compatibilityExcellentGoodGood (Apple)Fair
StreamingExcellentExcellentFairFair
Supported codecsH.264, H.265, AV1VP8, VP9, AV1H.264, ProRes, HEVCAnything
File sizeMediumMedium–smallMedium–largeMedium
Editing suitabilityGoodFairExcellent (Mac)Excellent

MP4 (.mp4)

The most widely used general-purpose format. Standardized as ISO/IEC 14496-14 and playable on virtually every device and platform.

Main use cases:

  • Uploading to YouTube and social media
  • Transferring to and storing on smartphones
  • Web delivery

Recommended codec combinations:

# Maximum compatibility: H.264 + AAC
ffmpeg -i input.mov -c:v libx264 -crf 23 -preset fast -c:a aac -b:a 128k -movflags +faststart output.mp4

# High efficiency: H.265 + AAC (about half the file size)
ffmpeg -i input.mov -c:v libx265 -crf 28 -c:a aac -b:a 128k output.mp4

Adding -movflags +faststart lets playback start before the download finishes — essential for Web delivery.


WebM (.webm)

An open Web-oriented format. Created by Google for HTML5 video, containing VP8/VP9/AV1 codecs. It’s patent-free and well-supported in browsers.

Main use cases:

  • Embedded videos on websites
  • Discord animations (as an alternative to GIF)
  • Web app UI video

FFmpeg conversion:

# VP9 WebM (high quality, high compression)
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 33 -c:a libopus -b:a 96k output.webm

# AV1 WebM (best efficiency, slow to encode)
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -c:a libopus output.webm

MOV (.mov)

Apple QuickTime format. Native to macOS and iOS, with support for high-quality codecs like ProRes. Windows may require additional codecs.

Main use cases:

  • Recording and editing on Mac and iPhone
  • Interchange with Final Cut Pro and DaVinci Resolve
  • Video production workflows (intermediate format)

FFmpeg conversion:

# MOV to MP4 (the most common conversion)
ffmpeg -i input.mov -c:v libx264 -crf 23 -c:a aac output.mp4

# MOV to MOV (codec conversion only)
ffmpeg -i input.mov -c:v libx264 -c:a aac output.mov

MKV (.mkv)

The most flexible container format (Matroska). Holds virtually any codec, plus subtitles, chapters, and multiple audio tracks in a single file. Some mobile devices require an extra app to play it.

Main use cases:

  • Long-term storage and archiving
  • Managing multi-language subtitles
  • Intermediate storage for editing projects

FFmpeg conversion:

# MP4 to MKV (no codec change, fast)
ffmpeg -i input.mp4 -c copy output.mkv

# MKV to MP4 (for better compatibility)
ffmpeg -i input.mkv -c:v libx264 -c:a aac output.mp4

Use caseRecommendedWhy
YouTube uploadsMP4 (H.264)Fastest processing, broad compatibility
Embedded web videoWebM (VP9) + MP4 fallbackSmaller file size
Storing iPhone footageMOV → MP4 conversionWorks on any device
Long-term storage with subtitlesMKVMulti-track support
Social media (Twitter / Instagram)MP4 (H.264)Platform requirement
Discord GIF alternativeWebMFits within file size limits

Convert in Your Browser Right Now

See the video format conversion tool (browser-based) — convert between MP4, WebM, MOV, and MKV without installing anything.

See the video compression tool when you want to minimize file size after conversion.


Frequently Asked Questions

Which format is best for YouTube uploads?

MP4 with H.264 video and AAC audio. YouTube re-encodes anyway, but MP4/H.264 uploads fastest because it doesn’t need pre-processing on YouTube’s side.

Should I use WebM or MP4 for my own website?

Both — serve WebM (VP9 or AV1) first for ~30% smaller files, with MP4 (H.264) fallback for older Safari and email clients.

MP4 vs MOV — what is the difference?

MOV is Apple’s container format and predates MP4. MP4 is the open standard derived from MOV. They are 95% binary-compatible — most players accept either.

Is MKV safe for sharing?

For Plex, Jellyfin, VLC — yes. For mainstream sharing (email, SNS, iPhone Photos) — no. Re-mux to MP4 with ffmpeg -c copy in.mkv out.mp4.

AVI is old — is it ever a good choice?

Only for legacy DV/HDV camcorder workflows. Modern codecs (H.264, HEVC, AV1) use MP4 or MKV. AVI lacks proper audio/video sync metadata for variable framerates.