Learn
Fastly Origin Shield: How Shielding Works and What It Costs
Fastly origin shield has no separate line item on a Fastly invoice as of 2026. A shielded cache miss is billed as an ...
A video file is two independent decisions stacked together. The container (MP4, MKV, MOV, WebM, MPEG-TS) defines how audio, video, subtitle and metadata tracks are interleaved, timestamped and indexed. The codec (H.264, HEVC, VP9, AV1) defines how the pixels inside those tracks are compressed. Most confusion about video file formats comes from reading the extension as if it described both. A 6 Mbps H.264 stream is still a 6 Mbps H.264 stream after it is remuxed from MKV into MP4.
As of 2026, fragmented MP4 packaged as CMAF (ISO/IEC 23000-19) is the one container format that serves both HLS and DASH players from a single set of segments, and H.264 with AAC audio remains the codec pair with the widest browser and device playback. AV1 in the same container typically needs roughly 30 to 50% fewer bits than H.264 at comparable visual quality, which is the main reason streaming teams add a second codec ladder.
Verdict, evaluated October 2026: for adaptive streaming, package CMAF fragmented MP4 with an H.264 baseline ladder and add AV1 (or HEVC for Apple-heavy audiences) once device share justifies the extra encoding and storage. For short clips and progressive download, ship a single MP4 with its index moved to the front of the file. WebM with VP9 or AV1 is a solid second source for Chromium and Firefox. MKV and MOV are production and archive formats, so remux or transcode them before they reach a CDN. MPEG-TS survives for legacy HLS clients and broadcast handoffs, at a measurable overhead cost.
The container is a filing system. It holds the sample tables that map timestamps to byte offsets, the presentation and decode timestamps (PTS and DTS) that keep audio in sync with B-frame reordered video, the codec configuration records a decoder needs before the first frame, and the signaling for captions, chapters and encryption. In MP4 those live in boxes such as moov, stbl and pssh; in Matroska they live in EBML elements such as Tracks and Cues.
The codec decides everything about the compressed bitstream: profile and level, GOP length, keyframe placement, B-frame depth, bit depth and color signaling. Those choices set your bitrate, your encode CPU budget and which hardware decoders can play the result.
The practical consequence is the difference between a remux and a transcode. A remux (stream copy) moves the same compressed samples into a new container, finishes in seconds and is lossless. A transcode decodes and re-encodes, costs real CPU time and adds generation loss. Players check both layers at once: a browser asked whether it can play video/mp4; codecs="avc1.64001F, mp4a.40.2" is answering a container question and a codec question in one call, and a "yes" to MP4 means nothing if the codec string says HEVC on a device without an HEVC decoder.
The table orders containers by fitness for web streaming in 2026, judged on browser playback, adaptive streaming support and delivery overhead.
| Container | Typical codecs carried | Browser playback | HLS / DASH fit | Main limitation |
|---|---|---|---|---|
| MP4 / fragmented MP4 (CMAF) | H.264, HEVC, AV1, VP9; AAC, Opus, E-AC-3 | All major browsers | Both, from one segment set | Progressive files stall if the index sits at the end |
| WebM | VP8, VP9, AV1; Vorbis, Opus | Chromium and Firefox; Safari later and less complete | DASH only | No HLS path, so no native Apple streaming |
| MPEG-TS | H.264, HEVC; AAC, AC-3 | Native only in Safari; elsewhere via a player that transmuxes | HLS only | Packet overhead of several percent |
| MOV (QuickTime) | ProRes, H.264, HEVC; PCM, AAC | Reliable in Safari, inconsistent elsewhere | Not a streaming target | Usually carries mezzanine bitrates |
| MKV (Matroska) | Nearly any codec, multiple audio and subtitle tracks | Not officially supported | Not a streaming target | No dependable browser playback |
Fragmented MP4 is the only container in this list that reaches every major browser and both adaptive streaming protocols with a single copy of the media.
MP4 is MPEG-4 Part 14, built on the ISO Base Media File Format, which itself descends from QuickTime. Fragmented MP4 splits the index into per-fragment moof boxes, which is what makes it segmentable for HLS (supported since 2016) and DASH, and CMAF formalizes that profile so one encrypted segment set can serve both. Its honest limitation: a plain MP4 written with the moov box at the end forces the player to fetch the tail of the file with a byte-range request before playback starts, which is why ffmpeg's movflags faststart option exists.
WebM is a restricted subset of Matroska limited to royalty-free codecs, which makes it the natural home for VP9 and AV1 outside the MP4 world. Its limitation is distribution: HLS does not carry WebM, so any Apple-device audience still needs an MP4 path.
MPEG-TS was designed for lossy broadcast links, so it chops everything into 188-byte packets with a 4-byte header each, plus PES headers, program tables and padding. The header alone is 2.1% of every packet; real-world overhead typically lands between 3 and 10% depending on bitrate and audio packetization, highest on low-bitrate renditions. Its strength is compatibility with older HLS clients and broadcast equipment.
MOV is Apple's QuickTime File Format and the native output of most cameras and editing suites, often carrying ProRes at hundreds of megabits per second. It is a capture and editing container; serving it directly means serving mezzanine bitrates to viewers who need a fraction of them.
Matroska is the most flexible container here: any codec, unlimited audio and subtitle tracks, chapters and attachments. That flexibility makes it excellent for archives and personal libraries and a poor delivery format, because no browser vendor commits to playing it.
Codec choice drives bitrate, encode cost and decoder reach far more than container choice does. Efficiency figures below are typical ranges from published encoder comparisons, not guarantees for your content.
| Codec | Bitrate vs H.264 (typical, estimate) | Web containers | Browser playback, 2026 | Licensing |
|---|---|---|---|---|
| H.264 / AVC (2003) | Baseline | MP4, MPEG-TS | Universal | Patent pool |
| HEVC / H.265 (2013) | 25 to 50% lower | MP4, MPEG-TS | Safari natively; Chromium and Firefox only with hardware decode | Multiple patent pools |
| VP9 (2013) | 25 to 40% lower | WebM, MP4 | All major browsers | Royalty-free by intent |
| AV1 (2018) | 30 to 50% lower | MP4, WebM | Chromium and Firefox; Safari on devices with AV1 hardware | Royalty-free by intent |
H.264 is still the only codec you can ship without a fallback, so every newer codec in a 2026 ladder is an addition to it, not a replacement.
On audio, AAC is the safe default in MP4 and MPEG-TS, Opus gives better quality per bit at low bitrates and works in both WebM and MP4, and E-AC-3 matters mainly for surround on living-room devices. VVC (H.266, 2020) exists but has no meaningful browser playback yet.
For adaptive streaming at scale, CMAF fragmented MP4 streams best: one segment set serves HLS and DASH, overhead stays around 1 to 2% (estimate), and it carries every web codec that matters. The numbers below show why the container and codec choices compound at catalog and delivery scale.
Assume a VOD catalog of 2,000 hours with a four-rung H.264 ladder at 6, 3.5, 1.8 and 1 Mbps, an aggregate of 12.3 Mbps. One hour of the full ladder is 12.3 Mbps times 3,600 seconds divided by 8, or about 5.5 GB, so the catalog is about 11.1 TB per packaging.
The codec decision moves five times more traffic than the container decision in this model, but the container decision is nearly free to make, which is why CMAF should come first.
Format choice also decides what the delivery layer has to do. BlazingCDN does not transcode; its HLS Streaming CDN delivers pre-encoded HLS, LL-HLS and DASH segments, so encoding and CMAF packaging stay upstream and the CDN caches the finished fragmented MP4 or TS files.
CMAF unifies segments but not always encryption. FairPlay requires the cbcs scheme defined in ISO/IEC 23001-7, while some older Widevine and PlayReady clients only handle cenc. If your device mix includes those clients, you may still store two encrypted copies, and the duplicate-packaging saving above shrinks.
Segment and keyframe discipline matters more than the container label. Every rung must have aligned keyframes at segment boundaries, typically 2 to 6 second segments for VOD, and LL-HLS partial segments well under a second. A misaligned ladder breaks rendition switching in any container.
AV1 decode on phones without AV1 hardware falls back to software, which costs battery and can drop frames at 1080p. Gate AV1 renditions on hardware decode capability reported by the player rather than on browser name. HEVC carries the opposite risk: excellent Apple coverage, but royalty exposure and patchy desktop playback outside Safari.
Finally, MPEG-TS is not dead weight everywhere. Set-top boxes, broadcast contribution chains and pre-2016 HLS clients still expect it, and for those audiences a small TS rendition set is cheaper than a support queue.
| Workload | Container | Video / audio | Why |
|---|---|---|---|
| VOD streaming, broad audience | CMAF fMP4 | H.264 plus AV1 / AAC | One segment set, largest egress saving |
| Low-latency live | CMAF fMP4 with partial segments | H.264 / AAC | Real-time encode budget rules out heavy AV1 presets |
| Apple-heavy audience | CMAF fMP4 | H.264 plus HEVC / AAC | Hardware HEVC decode across the device base |
| Short clips, autoplay, progressive download | MP4 with front-loaded index, optional WebM source | H.264, VP9 or AV1 / AAC or Opus | No manifest overhead, instant start |
| Legacy set-top boxes, broadcast handoff | MPEG-TS | H.264 / AAC or AC-3 | Compatibility outweighs 3 to 10% overhead |
| Mezzanine and archive | MOV or MKV | ProRes or lossless / PCM | Re-encode source, never a delivery file |
Unless you serve legacy hardware or need an archive master, every row resolves to MP4 in some form, and the real decision is which codecs to place inside it.
MP4 is a container, not a codec. It is MPEG-4 Part 14, based on the ISO Base Media File Format, and it can hold H.264, HEVC, AV1 or VP9 video alongside AAC, Opus or E-AC-3 audio. Two MP4 files can therefore have completely different bitrates, decoder requirements and browser support, which is why players check the codecs string, not just the extension.
MP4 is built for streaming and MKV is not. Fragmented MP4 is supported by HLS, DASH and every major browser, while Matroska has no official browser support and no HLS path. MKV is better for archives because it holds unlimited audio and subtitle tracks, but its streams should be remuxed into MP4, usually losslessly, before web delivery.
HLS accepts MPEG-TS and fragmented MP4, and DASH accepts fragmented MP4 and WebM. Fragmented MP4 packaged as CMAF is the only container both protocols share, so a single segment set can serve Apple and non-Apple players. Encryption can still force two copies when legacy clients require cenc while FairPlay requires the cbcs scheme.
AV1 in MP4 is ready to supplement H.264, not to replace it. It typically saves 30 to 50% bitrate at similar quality and plays in Chromium and Firefox, but Safari needs AV1 hardware and older phones decode it in software. Most teams in 2026 ship AV1 to capable devices and keep an H.264 ladder as the universal fallback.
Yes, a MOV file can be remuxed to MP4 without re-encoding when its codecs are allowed in MP4, such as H.264, HEVC and AAC. The conversion copies compressed samples, takes seconds and loses no quality. MOV files carrying ProRes or PCM audio still need a transcode, because those streams are far too large for web delivery anyway.
This week, run ffprobe or MediaInfo across your delivery library and record container, video codec and profile, audio codec, keyframe interval and whether the MP4 index sits at the front of each file. Count how many titles you store in more than one packaging, then plug your own ladder bitrates and monthly egress into the math above to price a CMAF migration and an AV1 ladder separately. The two numbers usually justify different timelines, and both are worth knowing even if you change nothing else.
Once packaging is settled, BlazingCDN's Video CDN replicates the finished library inside the CDN and keeps your origin out of the delivery path; the BlazingCDN Video CDN page covers how that works for fragmented MP4 and HLS catalogs.
Heavy traffic.
Light bill.
The CDN for video and large traffic
Learn
Fastly origin shield has no separate line item on a Fastly invoice as of 2026. A shielded cache miss is billed as an ...
Learn
Lossy vs lossless compression comes down to one trade: lossless compression rebuilds every original bit and typically ...