A container is the wrapper file format that holds compressed video, audio, subtitles and metadata together in one playable file. .mp4, .mkv, .webm, .mov, .ts — these are all containers. The container itself doesn't compress video; it just organises everything so a player can find and play it. Think of a container like a folder full of related files, but stored as one disk-efficient package with rules for how the parts line up.
Container and codec are separate concerns, and confusing them is a classic mistake. A .mp4 file can hold H.264 video, HEVC video, AV1 video, or any of several others — same container, different codec inside. Likewise, the same H.264 video can sit in a .mp4 or in a .mkv. The container determines compatibility (will this file play in iOS Safari?) and capabilities (multiple audio tracks? subtitles? chapter markers?), while the codec determines compression efficiency and decode requirements.
For a streaming product, container choice is mostly a compatibility decision. MP4 is the universal default — every browser, phone, TV, set-top box plays it. Fragmented MP4 (also called fMP4, CMAF) is the streaming-specific variant used for HLS and DASH — same underlying format, just chopped into independently-playable segments. MKV is popular for high-quality private libraries but barely works on iOS. WebM is the open-codec sibling restricted to royalty-free codecs (VP9/AV1 + Opus). MPEG-TS is legacy broadcast and the original HLS segment format. For nearly everything new in 2026, the answer is fragmented MP4.

