Contents

kVTCompressionPropertyKey_MaxKeyFrameInterval

The maximum interval between key frames, also known as the key frame rate.

Declaration

let kVTCompressionPropertyKey_MaxKeyFrameInterval: CFString

Discussion

Key frames, also known as sync frames, reset inter-frame dependencies; decoding a key frame is sufficient to prepare a decoder for correctly decoding the difference frames that follow. Video encoders are allowed to generate key frames more frequently if doing so results in more efficient compression. The default key frame interval is 0, which indicates that the video encoder should choose where to place all key frames. A key frame interval of 1 indicates that every frame must be a keyframe, 2 indicates that at least every other frame must be a keyframe, and so on.

This key can be set in conjunction with kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration, which requires a keyframe every X frames or every Y seconds, whichever comes first.

See Also

Frame Dependency