Containers vs codecs
A container is the file wrapper — the extension you see, like .mp4 or .mov. A codec is the algorithm used to compress the video and audio inside.
For example, .mp4 is a container that usually holds H.264 video and AAC audio. H.264 is the codec; MP4 is the container.
The big five
MP4 is the universal format — small, high-quality, plays everywhere. Best for sharing, uploading, and web playback.
MOV is Apple's QuickTime container. Same codecs as MP4 in most cases, but the default for Final Cut, iMovie, and many Apple workflows.
AVI is older and larger, but still expected by some legacy editors and Windows-only tools.
WEBM is the open web format — small files using VP9 or AV1 video, perfect for embedding on websites.
MKV is a flexible open container that can hold almost any codec plus multiple audio tracks and subtitles. Popular for archives.
Which to pick
For sharing or uploading anywhere: MP4 with H.264 video.
For Apple editing workflows: MOV.
For website embeds: WEBM (with an MP4 fallback for older browsers).
For archiving footage with multiple tracks: MKV.