A codec compresses frames, a segment packages a span of playback time, and a storage chunk identifies bytes for reuse. They can all divide the same file differently. A viewer changing networks needs the next playable span at a sustainable bitrate. A backup system needs to recognize bytes it has stored before.
Change bitrate without changing playback time
Playback follows aligned two-second segments in the high-bitrate rendition. Each column covers the same interval in both encodings.
Why it exists
An adaptive stream offers multiple encodings of one timeline. A playlist describes the alternatives and the URLs to fetch. The player uses buffer health and recent transfer speed to decide what it can download before the current buffer runs out.
View diagram · Adaptive playbackAbout two seconds of network time can now supply four seconds of playback. Full size
Words to know
Rendition
One encoding of the same program at a particular quality or bitrate.
Content-defined chunk
A byte span with boundaries selected from the data to support reuse after edits.
How it works
Step through the idea, or press Play.
Step 1 of 3
Publish renditions. Transcode the same timeline at several bitrates. Align switchable segment boundaries and keyframes. An HLS multivariant playlist advertises streams; each media playlist identifies its playable segments.
Protect playback. Let the player select a rendition using throughput and buffer health. Publish a segment before the playlist that names it. Smaller segments reduce scheduling delay but increase request overhead.
Choose chunk boundaries for backup. Fixed offsets make ranges simple. Inserting bytes near the start shifts later fixed blocks. Content-defined chunking seeks repeatable boundaries after the edit so unchanged spans can deduplicate. Media playback boundaries serve a different purpose.
Understand it
Start here
Four seconds before a stall
A student has four seconds of a lecture ready to play when Wi-Fi drops. Follow the next segment at two qualities and compare its arrival time with the playback deadline.
Four seconds before a stall
A player can decode the next span at a lower quality.
Structure
Adaptive playback
Adaptive playback
About two seconds of network time can now supply four seconds of playback.
A stalled rendition
At 4 Mbps a four-second segment carries roughly 2 MB. At 2 Mbps it needs roughly eight seconds to download. A player with four seconds buffered cannot sustain that stream. A lower aligned rendition can avert the stall; independently verify old backup chunks still resolve after editing the intro.
An arbitrary byte offset can begin with a frame that depends on earlier frames. Encode switchable boundaries with the required decoding context and align their positions across renditions. Then a player finishing one segment can request the next time interval at a lower quality. Publish referenced objects before publishing their playlist and retain them long enough for lagging clients.
What an edit does to a backup
Insert a title card at the start of a stored lecture. Fixed-size chunks after the insertion may now start at different byte positions, reducing reuse even where the content survived. Content-defined boundaries can resynchronize after local changes in an otherwise similar byte stream. Re-encoding the entire lecture may change most bytes, so deduplication gains depend on what the ingest pipeline actually stores.
Switch at aligned boundaries
A player can decode the next span at a lower quality.
Switch at any byte offset
A frame may depend on decoding context the player lacks.
Can the next segment arrive in time?
4s×4Mbps/2Mbps=8s
Ignoring overhead, a four-second buffer empties four seconds before this high-quality segment finishes.
Summary
The whole topic in one minute.
Use time-aligned decodable segments for playback and content identity for storage reuse. Check bitrate decisions against the actual time left in the buffer.