How H.264 splits video into 16×16 macroblocks and packages it in NAL units (SPS, PPS, slices, SEI), and why a missing SPS/PPS breaks playback.
In Chapter 3 we previewed the variable block partitioning of modern codecs. H.264 uses the original form of that idea, the macroblock: a fixed 16×16 pixel unit that can be subdivided further, down to 8×8 and 4×4, for prediction and transform.
The macroblock's fixed 16×16 starting point and its limited sub-partitioning (down to 4×4) are the forerunner of the HEVC recursive quadtree from Chapter 3 (from 64×64 down to arbitrary depth). H.264's structure was comparatively simple, able to split only one more level at a time, and that limitation was the direct motivation for HEVC's CTUs and quadtree.
An H.264 bitstream is a sequence of pieces called NAL (Network Abstraction Layer) units. Each NAL unit carries either compressed video data or configuration information, like an envelope that may hold a letter (video data) or a contract (configuration).
Most problems like "the video plays but the first second is garbled" or "it won't play when I splice in from the middle of a stream" come from missing or mismatched SPS/PPS. In live streaming, the standard practice is to repeat the SPS/PPS at every keyframe, so a decoder can start playback whenever it joins (a midstream join). This matters especially for adaptive streaming such as HLS/DASH (Chapter 10).
H.264's basic processing unit. Starts at 16×16 pixels and can be subdivided.
The transport unit that makes up an H.264/HEVC bitstream. Carries either video data or configuration information.
Sequence-level and picture-level configuration. Required to initialize the decoder. The VUI (the three CICP values) lives inside the SPS.
Auxiliary information that has no bearing on compression but is needed for playback, such as static HDR metadata like MaxCLL/MaxFALL.
Why are the SPS/PPS repeated at every keyframe in live streaming?