<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/kVTCompressionPropertyKey_MaxKeyFrameInterval",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@kVTCompressionPropertyKey_MaxKeyFrameInterval"
  },
  "title" : "kVTCompressionPropertyKey_MaxKeyFrameInterval"
}
-->

# kVTCompressionPropertyKey_MaxKeyFrameInterval

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

```
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`](/documentation/VideoToolbox/kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration), which requires a keyframe every *X* frames or every *Y* seconds, whichever comes first.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)