<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayer/preferredVideoDecoderGPURegistryID",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayer(py)preferredVideoDecoderGPURegistryID"
  },
  "title" : "preferredVideoDecoderGPURegistryID"
}
-->

# preferredVideoDecoderGPURegistryID

The registry identifier for the GPU used for video decoding.

```
nonisolated var preferredVideoDecoderGPURegistryID: UInt64 { get set }
```

## Discussion

By default, whenever possible, the GPU associated with the display presenting the <doc://com.apple.documentation/documentation/QuartzCore/CALayer> performs the video decoding. Decode transitions to a new GPU, if appropriate, when the <doc://com.apple.documentation/documentation/QuartzCore/CALayer> moves to a new display. This property overrides this default behavior, forcing decode to prefer an affinity to the GPU specified regardless of which GPU displays the associated <doc://com.apple.documentation/documentation/QuartzCore/CALayer>. Obtain the GPU registry ID from the GPU <doc://com.apple.documentation/documentation/Metal/MTLDevice> using <doc://com.apple.documentation/documentation/Metal/MTLDevice/registryID> or from OpenGL or OpenCL.

> Important:
> You must specify an external GPU (or a slotted GPU in Mac Pro) with this property. You can’t switch decoding between the integrated graphics and the built-in discrete graphics.

---

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)