Video file formats explained: MP4, MOV, MKV, WebM
Video file formats such as MP4, MOV, MKV and WebM are containers; the codec inside decides quality and size. What each is for, where it plays, how to switch.

On this page
Video file formats such as MP4, MOV, MKV, WebM and AVI are containers: boxes that hold the picture, the sound and their timing. What decides the picture and the file size is the codec inside, such as H.264 or HEVC. MP4 with H.264 video is the pair that plays almost everywhere.
The common video formats at a glance
| Format | Extension | From | Video usually inside | Where it plays | Good for |
|---|---|---|---|---|---|
| MP4 | .mp4 | An ISO/IEC standard, 2003 | H.264, HEVC, AV1 | Almost everywhere, including every current browser | Sharing and uploading |
| MOV | .mov | Apple’s QuickTime, 1991 | H.264, HEVC, ProRes | Apple devices; elsewhere in players such as VLC | iPhone video, editing on a Mac |
| MKV | .mkv | Matroska, an open format, an IETF standard since 2024 | Any codec, plus subtitle tracks and chapters | Players such as VLC; fewer phones and TVs | Films with several sound tracks and subtitles |
| WebM | .webm | The WebM Project, 2010 | VP8, VP9, AV1 | Every current browser | Video on websites |
| AVI | .avi | Microsoft, 1992 | Xvid and DivX (MPEG-4 Part 2), older codecs | Computers, older DVD players and TVs | Devices that ask for AVI |
| MTS, M2TS | .mts, .m2ts | AVCHD camcorders, 2006 | H.264 | Computers and the camera itself | Camcorder recordings |
| WMV | .wmv | Microsoft’s ASF format | Windows Media Video | Windows | Old Windows videos |
The makers and dates come from the Library of Congress pages on MP4, QuickTime, Matroska, AVI and WMV, the Matroska standard RFC 9559, the WebM Project and avchd-info.org. Browser support is from MDN’s guide to media container formats. All checked on 16 Nov 2026.
Two rows are closer than they look. MP4 grew out of Apple’s format: in MDN’s words, it “is derived from the ISO base media file format, which is directly derived from the QuickTime file format developed by Apple”. And WebM is built on Matroska, the same design as MKV, limited to open codecs.
What’s the difference between a codec and a container?
A container is the file; a codec is how the picture or the sound inside it is compressed. The container holds one or more streams, usually a video stream and a sound stream, sometimes subtitles and chapters, plus the timing that keeps them together. Each stream was compressed with a codec, and a player needs that codec’s decoder to show it.
The Matroska standard puts it plainly: a container “is NOT a video or audio compression format (codec). It is an envelope in which there can be many audio, video, and subtitles streams”.
So the extension names the box, not what’s in it:
- An iPhone video is a MOV box with AAC sound and HEVC video, or H.264 video when the camera is set to Most Compatible instead of High Efficiency.
- A file ready for YouTube is an MP4 box with H.264 video and AAC sound.
- A film or a series episode is often an MKV box with H.264 or HEVC video, several sound tracks and subtitles.
This is why one MP4 plays on a PC and another doesn’t: the box is the same, the codec isn’t. A PC without the HEVC Video Extensions opens an H.264 MP4 and refuses an HEVC one. What HEVC is covers that case.
The codecs you’ll meet most often:
- Video: H.264 (also called AVC), which everything plays; HEVC (H.265), about half the size for the same picture; AV1 and VP9, the open codecs of WebM; ProRes, Apple’s editing codec, which Pro iPhones can record; MPEG-4 Part 2 (Xvid, DivX) in older AVI files.
- Sound: AAC in MP4 and MOV; Opus and Vorbis in WebM; MP3 and AC-3 in AVI and older files; uncompressed PCM in camera and editing files.
Change a video’s format with Vidray
Vidray is a video compressor and converter for Windows and Mac that works on your own computer. Its Convert tool makes MP4, MOV, MKV, M4V, WebM, AVI, GIF and ProRes.
- Open Vidray and choose Convert.
- Pick the format, for example MP4.
- Drop the video in. When the new container takes the streams as they are, the row says “No re-encoding” and the job takes seconds. Otherwise Vidray encodes the picture once.
What Vidray copies, and what it makes when it can’t copy:
| Into | Copied as it is | Otherwise Vidray makes |
|---|---|---|
| MP4, M4V | H.264, HEVC, AV1 video; AAC, MP3, AC-3, E-AC-3, ALAC sound | H.264 video, AAC sound |
| MOV | H.264, HEVC, ProRes video; AAC, MP3, AC-3, ALAC, PCM sound | H.264 video, AAC sound |
| MKV | Any video and sound | Rarely needed: MKV takes them all |
| WebM | VP8, VP9, AV1 video; Opus, Vorbis sound | AV1 video on the processor, Opus sound |
| AVI | Xvid and DivX video; MP3, AC-3 sound | Xvid video up to 1080p, MP3 sound |
| ProRes (MOV) | ProRes video, PCM sound | ProRes 422 in 10 bits, PCM sound |
| GIF | Nothing | A GIF, from videos up to 60 seconds |
A few things to know:
- HEVC copied into MP4 is still HEVC. Convert fixes a box a device won’t open, not a codec it can’t decode. For an H.264 copy that plays everywhere, use Compress with “Fit a size”, as what HEVC is shows.
- Subtitle tracks don’t come along. Every sound track does, except in AVI, which keeps the first one, as its players expect.
- Your original stays. Vidray never overwrites a video. The new file goes beside it, or into a folder you choose in Settings.
Free does all of this, 10 videos a month. Pro makes as many as you like, with no monthly limit. $24.99, once.
Is H.264 the same as MP4?
No. H.264 is a codec, and MP4 is a container. “H.264 MP4” means an MP4 file whose video stream is H.264. It is the most common pair there is, and the one YouTube’s recommended upload settings name: MP4 as the container, H.264 video, and AAC-LC or Opus sound (checked on 16 Nov 2026).
The two come apart all the time. An MP4 can hold HEVC or AV1 instead, and H.264 can sit in MOV, MKV or a camcorder’s MTS file. So “it’s an MP4” doesn’t tell you whether a device will play it.
To see what is really inside a file:
- MediaInfo is free and open source for Windows and Mac. It shows the container and each stream’s codec, and it calls H.264 by its other name, AVC.
- ffprobe comes with FFmpeg and lists every stream:
ffprobe -v error -show_entries stream=codec_name,codec_type -of compact=p=0 input.mp4
For a phone video it prints lines such as codec_name=h264|codec_type=video and codec_name=aac|codec_type=audio. The command ran as written in FFmpeg 8.1.1 on 16 Nov 2026.
Does the format change quality or file size?
No, not on its own. We copied the video of our 4K test clip (21.2 seconds of H.264 at 16.9 Mbit/s, from Pexels) into other containers with FFmpeg, without re-encoding. The video stream’s MD5 checksum was the same in every file, so not one bit of the picture changed:
| Container | Bytes | Video stream |
|---|---|---|
| MP4, the original | 44,813,471 | H.264 |
| MOV | 44,815,740 | The same, to the bit |
| MKV | 44,812,574 | The same, to the bit |
| WebM | No file | Refused: WebM takes only VP8, VP9 or AV1 |
The three boxes differ by at most 3,166 bytes, less than a hundredth of a percent. WebM refused the copy because its rules allow only open codecs, so an H.264 video has to be re-encoded to become a WebM.
What does change the size and the picture is the codec and its bitrate. On the same clip, at the same picture-quality score (VMAF 95.6 on a scale of 0 to 100), HEVC needed 9.8 MB where H.264 needed 19.1 MB. Within any codec, the bitrate sets the size: how big a minute of video is has the numbers.
So there is no “lightest” or “best quality” format. A smaller file comes from a more efficient codec or a lower bitrate, which is what compressing does: see how to compress a video without losing quality.
Change a format without Vidray
FFmpeg is free on Windows, Mac and Linux. This moves the streams into another container without re-encoding, which works when the new container takes them:
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4
A WebM for a website needs the picture and the sound encoded. This makes AV1 video and Opus sound, the same codecs Vidray uses for WebM:
ffmpeg -i input.mp4 -c:v libsvtav1 -preset 10 -crf 30 -c:a libopus -b:a 128k output.webm
Both commands ran as written in FFmpeg 8.1.1 on 16 Nov 2026. AV1 is encoded on the processor, so a long 4K video takes a while; a lower -preset number is slower and makes a smaller file.
Renaming isn’t converting. Changing .mov to .mp4 in the file name leaves the box as it was: in our test, ffprobe still read a renamed MOV as QuickTime. Some players open such a file anyway, others refuse it.
Subtitles from an MKV need their own step. MKV to MP4 has the FFmpeg command that keeps text subtitles.
Which video format should you use?
- “I’m sending a video or uploading it.” MP4 with H.264 video. It is what YouTube recommends, and what phones, computers and TVs open without help.
- “I shoot on an iPhone and edit on a Mac.” Keep MOV, especially for ProRes, and make an MP4 copy of what you share. MP4 vs MOV compares the two.
- “I keep films with several sound tracks and subtitles.” MKV. It holds them all in one file; play it in VLC or on a TV that reads MKV.
- “I put video on my own website.” WebM with AV1 or VP9, plus an MP4 copy as a fallback, as MDN’s guide suggests.
- “An old DVD player or TV asks for AVI.” AVI with Xvid video. Vidray makes it at up to 1080p, because players that want AVI are older than 4K.
- “I have camcorder MTS files.” Copy them into MP4: MTS to MP4 shows how, and what to do about lines on moving things.
- “I want the smallest file.” That’s a codec and a size, not a format. Compress the video instead.
Choose the container by where the video is going, and change the codec only when a device can’t decode it. To change one file now, download Vidray for Windows or Mac and convert it: when the streams fit the new box, it takes seconds and the picture stays as it was.
Common questions
What is the most common video format?
MP4. Phones, cameras, editing apps and websites expect it more than any other, every current browser plays it, and YouTube’s recommended upload settings name MP4 with H.264 video. MOV is common too, because iPhones save videos as MOV, and copying one into MP4 takes seconds.
Is MP4 a codec?
No. MP4 is a container, a box that holds the video, the sound and their timing. The codec is how the picture inside is compressed, usually H.264, sometimes HEVC or AV1. That is why two MP4 files can behave differently: one plays everywhere, the other needs an HEVC decoder.
Which video format has the best quality?
None, by itself. MP4, MOV and MKV can hold the same video bit for bit: on our 4K test clip, the three copies matched to the bit and differed in size by at most 3,166 bytes. Quality depends on the codec and its bitrate, so a higher bitrate looks better in any container.
Can I change a video's format by renaming the file?
No. Renaming .mov to .mp4 changes the name, not the container inside, so some players refuse the file. A real conversion rewrites the box; when the new format takes the same codecs, it copies the streams without re-encoding, which takes seconds and loses nothing.
What format are iPhone videos?
MOV. iPhones save videos in Apple’s QuickTime container, with HEVC video when the camera is set to High Efficiency or H.264 with Most Compatible, and AAC sound. Pro models can also record ProRes. Copying the video into MP4 keeps the picture exactly as it is.
What is the difference between MP4 and MKV?
Both are containers. MKV takes almost any codec, several sound and subtitle tracks, and chapters; MP4 plays on more phones, TVs, browsers and editing apps. Moving H.264 or HEVC video from MKV to MP4 is usually a copy, but subtitle tracks need a step of their own.


