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.

Book cover: Video Encoding, Volume 1 of the Fora Soft Video Engineering Handbook

The book · Volume 1 of 7

Video Encoding: A Complete Guide to Video Compression — From Pixels and Color to H.264, HEVC, AV1, Quality Metrics, and AI

A container wraps video, audio, subtitles and metadata, and the wrong one breaks seeking, streaming or device support even when the codec is fine. Volume 1 covers containers in detail: MP4 and fMP4, MKV, WebM, MOV and MPEG-TS, which codecs each carries, and how containers feed HLS, DASH and CMAF packaging. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Picking the right container format for recording, editing and streaming?

Describe your workflow from capture to playback: we recommend a container for each stage, flag device compatibility gaps and give you the remux and packaging steps. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →