<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/MEVideoDecoderExtension/makeVideoDecoder(codecType:videoFormatDescription:videoDecoderSpecifications:pixelBufferManager:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(pl)MEVideoDecoderExtension(im)videoDecoderWithCodecType:videoFormatDescription:videoDecoderSpecifications:extensionDecoderPixelBufferManager:error:"
  },
  "title" : "makeVideoDecoder(codecType:videoFormatDescription:videoDecoderSpecifications:pixelBufferManager:)"
}
-->

# makeVideoDecoder(codecType:videoFormatDescription:videoDecoderSpecifications:pixelBufferManager:)

Creates a new video decoder that matches the codec type, format description, decoder specifications, and pixel buffer manager that you specify.

```
func makeVideoDecoder(codecType: CMVideoCodecType, videoFormatDescription: CMVideoFormatDescription, videoDecoderSpecifications: [String : Any], pixelBufferManager extensionDecoderPixelBufferManager: MEVideoDecoderPixelBufferManager) throws -> any MEVideoDecoder
```

## Parameters

`codecType`

The codec type for the requested decoder.

`videoFormatDescription`

An object that describes the video data.

`videoDecoderSpecifications`

A dictionary that contains video decoder specification values, which may be empty. See <doc://com.apple.documentation/documentation/VideoToolbox/decompression-properties> for a list of keys to use.

`extensionDecoderPixelBufferManager`

A pixel buffer manager.

## Return Value

A new [`MEVideoDecoder`](/documentation/MediaExtension/MEVideoDecoder).

## Discussion

The `videoDecoderSpecifications` parameter accepts the following keys:

- <doc://com.apple.documentation/documentation/VideoToolbox/kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder>
- <doc://com.apple.documentation/documentation/VideoToolbox/kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder>
- <doc://com.apple.documentation/documentation/VideoToolbox/kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID>
- <doc://com.apple.documentation/documentation/VideoToolbox/kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID>

If the parameter values aren’t compatible with the video decoder, this method fails with the error [`MEError.Code.unsupportedFeature`](/documentation/MediaExtension/MEError-swift.struct/Code/unsupportedFeature).

The video decoder needs to retain the pixel buffer manager and use it to allocate and configure output pixel buffers.

---

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)