All articles
Video Engineering

Video Formats Explained: MP4 vs MOV vs WebM, H.264 vs H.265 vs AV1

Most format confusion comes from mixing up two different things: the container and the codec. Once you separate them, MP4 vs MOV, H.264 vs H.265 vs AV1, 4K vs 1080p and frame rate all get much simpler. A practical guide with current browser support.

12 min read
Exploded isometric diagram of a container box with separate video and audio stream layers floating above it

The short answer

MP4 with H.264 if you want it to play everywhere without thinking about it. That combination works on every browser, phone, TV, and console made in the last decade. Everything below is about when it is worth deviating - and why "MP4 vs H.264" is not actually a comparison.

Container vs codec: the distinction that fixes everything

Most format confusion comes from treating these as one thing. They are two layers doing different jobs.

  • The container - MP4, MOV, WebM, MKV - is the box. It holds the video stream, the audio stream, subtitles, chapters, and metadata, and defines how they are interleaved. The file extension names the container.
  • The codec - H.264, H.265, VP9, AV1 - is the compression method used on the stream inside. It determines file size, quality, and how much work playback costs.

The two are largely independent. H.264 video can sit inside MP4, MOV, or WebM. An MP4 can contain H.264, H.265, or AV1. So .mp4 tells you how the file is packaged and almost nothing about how it is compressed - which is why two MP4s can differ enormously in size and quality, and why one plays on a device and the other does not.

The containers

ContainerTypical codecsStrengthUse it when
MP4H.264, H.265, AV1Universal playbackAlmost always - it is the default for good reason
MOVH.264, ProResEditing, alpha channelsWorking in Final Cut or Premiere, or you need transparency
WebMVP9, AV1Open, royalty-free, smallWeb delivery where you can offer a fallback
MKVAnythingHolds any combinationArchiving; poor browser support

MP4 vs MOV

MOV is Apple's container and MP4 was derived from it, so structurally they are close cousins - a MOV holding H.264 and an MP4 holding H.264 contain nearly the same data. The practical differences: MOV handles ProRes and alpha-channel transparency, which matters for editing and compositing, while MP4 plays on more things with less fuss.

Edit in MOV, deliver in MP4. Converting between them when the codec is already H.264 can often be done by remuxing rather than re-encoding, which is lossless and near-instant.

MP4 vs WebM

WebM is open and royalty-free, and with VP9 or AV1 inside it produces meaningfully smaller files than an equivalent H.264 MP4. The catch is coverage: not every device and player handles it, and Safari's support has historically lagged.

For the web, the usual answer is not to choose. Serve WebM as the primary source with an MP4 fallback in the same <video> element and the browser picks - that covers essentially everything, at the cost of storing two encodes.

The codecs

CodecSize vs H.264SupportCatch
H.264 (AVC)BaselineUniversal since ~2010Largest files; still the safe default
H.265 (HEVC)~30-40% smallerGood, via OS hardware decodePatent licensing; browser support depends on the OS
VP9~30-40% smallerChrome, Firefox, EdgeRoyalty-free; slower to encode
AV1~30-50% smallerModern browsers and GPUsBest compression; needs newer hardware to decode

H.264 vs H.265

H.265 delivers roughly the same quality in 30-40% less space, which is why 4K streaming and modern phone cameras use it. The reason it never fully displaced H.264 is licensing: its patent pool is complicated and expensive, which made browser vendors reluctant. In practice H.265 plays where the operating system provides hardware decode and is unreliable elsewhere.

Rule of thumb: H.265 for storage, archiving, and Apple-ecosystem delivery. H.264 when anything unknown might have to play it.

Where AV1 fits

AV1 is the best compressor on this list - 30-50% smaller than H.264 at equivalent quality - and it is royalty-free, which is why YouTube, Netflix, and Meta have moved to it. Hardware decoding is now standard on current devices, but pre-2020 hardware generally cannot decode it, and software decoding is punishing on battery.

Encoding is also far slower than H.264. AV1 pays off at scale, where you encode once and serve millions of times. For a handful of videos on a small site, the encoding time costs more than the bandwidth saves.

Browser support, as of 2026

BrowserH.264H.265VP9AV1
Chrome / EdgeYesWith OS hardware supportYesYes
Safari 17+YesYesPartialHardware decoder only, no software fallback
FirefoxYesOnly with OS hardware decodeYesYes

4K vs 1080p, and what actually drives quality

Resolution is the least important of the three numbers people argue about. A 1080p file at a generous bitrate looks better than a 4K file that has been squeezed - and on a phone, where most viewing happens, the difference between them is often invisible.

What actually determines how a video looks:

  • Bitrate - how many bits per second of picture. This is the real quality dial. Starve it and you get blocking and mush at any resolution.
  • Codec - a better codec gets more quality from the same bitrate.
  • Source quality - upscaling 1080p to 4K adds pixels, not detail, and costs you file size for nothing.
  • Resolution - matters mainly on large screens and when there is fine detail such as text.

Shoot 4K if you want room to crop and reframe in the edit. Deliver 4K when the platform rewards it - YouTube allocates a higher bitrate to 4K uploads, which is a real reason to upload at 4K even for viewers watching at 1080p.

Frame rate

Frames per second is how many images a second the video shows. The number carries a look, not just a smoothness level:

Frame rateReads asUse for
24 fpsCinematicFilm, narrative, anything wanting a movie feel
30 fpsBroadcast, neutralSocial, talking heads, general web video
60 fpsHyper-real, smoothSport, gaming, screen recordings
120 fps+Capture onlyShooting for slow motion in post

Doubling the frame rate roughly doubles the data needed for the same quality, so 60 fps is not free. Match your source rather than converting: going from 30 to 24 fps means dropping frames unevenly, which produces visible judder.

Why this matters when you pull a single frame

Formats stop being abstract the moment you try to extract one specific frame. Inter-frame codecs like H.264, H.265, and AV1 do not store every frame in full. They store occasional complete keyframes and then describe the frames in between as changes from their neighbours.

Two practical consequences:

  • Seeking lands on keyframes. Ask a player for a timestamp and it typically jumps to the nearest keyframe, then decodes forward. With sparse keyframes, "the frame at 4.20s" can be several frames off.
  • The last frame is the awkward one. Getting the true final frame means decoding to the actual end of the stream rather than seeking near it - which is why naively seeking to the duration often returns a black frame or stops slightly short.

Our last frame extractor handles that end-of-stream case specifically, and the frame grabber steps frame by frame so you can land on an exact one rather than the nearest keyframe. Both decode in the browser at full source resolution, so nothing is uploaded and nothing is re-compressed on the way.

What to actually use

SituationContainerCodec
Anything that must just playMP4H.264
Web delivery, want it smallerWebM primary + MP4 fallbackAV1 or VP9, plus H.264
Editing and compositingMOVProRes
Archiving master filesMP4 or MKVH.265
Uploading to socialMP4H.264 - they re-encode anyway

That last row is worth internalising. Every platform re-encodes what you upload, so delivering an exotic codec gains you nothing - it just adds a conversion step before theirs. Upload a high-bitrate H.264 MP4 and let them do their thing.

FAQ

Is MP4 a codec or a container?

A container. It holds streams compressed with a codec such as H.264 or AV1. This is why "MP4 vs H.264" is not a real comparison - most MP4 files contain H.264.

Which is better, MOV or MP4?

Neither, they are for different stages. MOV for editing, especially with ProRes or alpha channels. MP4 for delivery, because it plays on more devices.

Should I use H.265 or H.264?

H.264 unless you have a specific reason. H.265 saves 30-40% of the space but its browser support depends on operating-system hardware decode, so it is less predictable for anything you hand to an unknown viewer.

Is 4K worth it if people watch on phones?

For viewing, rarely. For production, often - it gives you room to crop and stabilise, and platforms like YouTube give 4K uploads a higher bitrate, which improves even the 1080p rendition viewers actually see.

Why is my exported video so large?

Almost always bitrate, sometimes frame rate - not resolution. Halving the bitrate roughly halves the file. Moving from 60 to 30 fps saves a similar amount where the motion allows it.

Sources

Browser support checked August 2026. Codec support moves, particularly for AV1 and H.265 - verify against Can I Use before relying on it.

Keep reading