A slice is a piece of a video frame that can be decoded independently of the other slices in the same frame. Most frames in modern codecs are a single slice — one chunk of macroblocks or CTUs encoded as one unit. But the codecs also let the encoder split a frame into multiple slices for two specific purposes: error resilience and parallel processing. Each slice has its own header, can't reference content from other slices in the same frame, and decodes independently.

The original purpose was error resilience. In broadcast and other lossy-transmission contexts, if a packet gets corrupted or dropped, the decoder only loses the slice containing that packet — not the whole frame. The viewer might see a horizontal stripe of blocky video where the lost slice was, but the rest of the frame keeps playing cleanly. This was critical for satellite and over-the-air broadcast in the H.264 era.

For parallel processing, multiple slices let the encoder (and decoder) split the work across CPU cores: slice 1 to core 1, slice 2 to core 2, and so on. This was H.264's main parallelism strategy. Modern codecs prefer tiles (HEVC, AV1, VVC) over slices for parallelism because tiles have cleaner geometric boundaries and better cache behaviour, but slices remain in the standards for backward compatibility. For a product team, slices are mostly invisible — the encoder picks how to use them based on settings — but if you see weirdly-shaped artefacts in a video that hit only horizontal bands of the frame, that's a sign of slice-level packet loss in the transmission chain.