<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder"
  },
  "title" : "kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder"
}
-->

# kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder

A Boolean value indicating whether hardware-accelerated encoding is required.

```
let kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder: CFString
```

## Discussion

This key is set in the `encoderSpecification` passed in to [`VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:)`](/documentation/VideoToolbox/VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:)).  Set it to <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanTrue> to require hardware-accelerated encoding.  If hardware acceleration is not possible, the [`VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:)`](/documentation/VideoToolbox/VTCompressionSessionCreate(allocator:width:height:codecType:encoderSpecification:imageBufferAttributes:compressedDataAllocator:outputCallback:refcon:compressionSessionOut:)) call fails. Setting this key automatically implies that [`kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder`](/documentation/VideoToolbox/kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder) is enabled; there is no need to set both.

This key is useful for clients that have their own software encoding implementation or those that may need to configure software and hardware encode sessions differently. Hardware acceleration may be unavailable for a number of reasons:

- The machine does not have hardware acceleration capabilities.
- The requested encoding format or encoding configuration is not supported.
- The hardware encoding resources on the machine are busy.

---

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)