<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/kCMSampleBufferAttachmentKey_ForceKeyFrame",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@kCMSampleBufferAttachmentKey_ForceKeyFrame"
  },
  "title" : "kCMSampleBufferAttachmentKey_ForceKeyFrame"
}
-->

# kCMSampleBufferAttachmentKey_ForceKeyFrame

Indicates that the current or next video sample buffer should be forced to be encoded as a key frame.

```
let kCMSampleBufferAttachmentKey_ForceKeyFrame: CFString
```

## Discussion

If this attachment is present and `kCFBooleanTrue` on a sample buffer with a video frame, that video frame will be forced to become a key frame.  If the sample buffer for which this is present and `kCFBooleanTrue` does not have a valid video frame, the next sample buffer processed that contains a valid video frame will be encoded as a key frame.

---

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)