Video Keyframes and Random Access
A video random-access point lets decoding begin without reconstructing the whole preceding stream.
You seek to 11.3 seconds in a film, but the picture you want is predicted from earlier decoded pictures. Jumping directly to its compressed bytes would leave the decoder without those references.
A random-access point, commonly marked as a keyframe, provides a place from which the required state can be rebuilt.
Seeking to 11.3 seconds from a 10-second entry point
Assume a constant 24 fps stream with clean entry points every two seconds. For this example, the player selects the first picture at or after the requested time.
11.3 × 24 = 271.2, so that picture is frame 272, at 11.3333 seconds. The preceding entry point is frame 240, at 10 seconds.
| Stage | Work performed |
|---|---|
| Locate an entry | Find the coded access point at 10 seconds |
| Configure decoding | Supply the codec's required stream parameters |
| Rebuild pictures | Decode from frame 240 toward the target |
| Begin requested presentation | Show the selected picture at its assigned time |
For a deliberately simple I/P-only chain where each picture depends on its predecessor, frames 240 through 272 require 33 picture decodes, including both endpoints. The earlier output pictures are not necessarily shown; they supply reference state and are discarded from the requested presentation.
The selection policy and dependency chain are declared examples. Reordered structures can need additional anchors or different preroll handling.
The container index helps locate byte positions associated with access points. The codec determines whether the decoder can actually begin there. Both pieces are needed for a useful seek.
Supply the configuration
An independently reconstructable picture still needs its codec configuration. The decoder must know dimensions, sample format, and the applicable coding parameters. These can be supplied by the container or repeated in the stream, depending on its format.
For H.264, sequence and picture parameter sets are part of that configuration. A bare picture payload without the needed parameters is not a complete decoding starting package.
An I-picture answers a narrower question
An intra-coded picture reconstructs its own samples without temporal prediction from another picture. That says nothing by itself about dependencies of following or reordered pictures.
Consider a group that starts with an ordinary I-picture but also contains leading B-pictures using an older reference. Starting with an empty decoder at the I-picture cannot reconstruct those leading pictures just because the I-picture itself is independent.
H.264 IDR pictures establish a reference reset: subsequent prediction cannot rely on pictures preceding that reset. HEVC defines IDR and additional access types, including CRA, with specific handling for leading pictures when playback begins at the access point. These rules determine which pictures can validly be presented after a random start.
Access spacing changes the work
More frequent clean entries can reduce how far the decoder needs to work forward after a seek. In the example, starting at 10 seconds is much closer to the target than starting at the beginning of the film.
Encoders also spend data establishing new independently usable pictures. Access-point spacing is therefore a tradeoff between prediction efficiency and convenient starts, with scene changes sometimes creating additional entries.
In Emby, the same source reconstruction can precede transcoded output after seeking. Its delay can include storage reads, decoder work, and output initialization; the reference chain explains the part due to picture dependencies.
Changing an index flag does not rewrite those dependencies. If a byte location is incorrectly marked as an entry, uninterrupted playback can work because the decoder already has state, while seeking there fails. The useful repair is a correct access description or a newly encoded entry structure, rather than an unsupported “keyframe” label.