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. Once you have picked one, the basics of video format conversion walk through the actual commands.

Tested with: FFmpeg 6.1 (verified against real FFmpeg)


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 (can be smaller at similar quality)
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. For the smallest files, see the dedicated guide to AV1 encoding with SVT-AV1 and libaom.

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

Measured Example

This example converts a 1080p/30fps, 2-minute H.264 MP4 to WebM VP9 while aiming for similar visual quality:

ffmpeg -i input.mp4 \
  -c:v libvpx-vp9 -b:v 0 -crf 33 \
  -c:a libopus -b:a 96k \
  output.webm

If the input MP4 is around 150 MB, VP9 WebM may land around 80–120 MB. The result depends heavily on content, CRF, and audio bitrate. AV1 can be smaller again, but encoding is usually slower.

For maximum compatibility, keep MP4 (H.264 + AAC) as the baseline and add WebM for websites where browser delivery benefits from it. Results vary by environment.


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 a QuickTime-family container, while MP4 is a standardized container with strong delivery compatibility. Their structures are related, but metadata and editing-oriented codec workflows differ. For web delivery, MP4 is usually the safer choice.

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.