Keyframes, GOP size, and alignment

Keyframe interval, also known as keyframe rate or GOP (group of pictures) size, should be selected based on how the content is to be delivered. To ensure compatibility with multiple delivery protocols, we suggest you use keyframes every two seconds. This ensures that they fit evenly into delivered segments for streaming protocols that are generally six or ten seconds long. Using alternative keyframe rates might be warranted based on the content type (such as, slow-motion talking heads or high-motion sports). In these situations it is worth evaluating your keyframe rate in conjunction with the selected delivery protocols to ensure compatibility. In addition, all keyframes must be of type IDR to ensure frames in one segment do not require data from another segment to display properly.

Keyframe interval must be identical across different renditions of the same video to allow mid-stream switching, allowing the best possible renditions to be delivered at any given moment

Some encoders have an option to enable scene change detection that allows keyframes to be inserted when a scene change occurs. This improves visual quality by allowing the entire frame to be redrawn when necessary. Due to the extra keyframes possible with this setting, you can raise the overall bitrate of the video.

Keep in mind that adaptive bitrate streaming still requires consistent keyframes within each rendition and is shared across the rendition set. Therefore, you should only enable scene change detection when it can be in conjunction with a minimum keyframe internal option. This enables the encoder to insert keyframes even when a scene change is not detected.