<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "VideoToolbox"
  },
  "title" : "Video Toolbox"
}
-->

# Video Toolbox

Work directly with hardware-accelerated video encoding and decoding capabilities.

## Overview

VideoToolbox is a low-level framework that provides direct access to hardware encoders and decoders. It provides services for video compression and decompression, and for conversion between raster image formats stored in CoreVideo pixel buffers. These services are provided in the form of session objects (compression, decompression, and pixel transfer), which are vended as Core Foundation (CF) types. Apps that don’t need direct access to hardware encoders and decoders shouldn’t need to use VideoToolbox directly.

## Topics

### Frame Processing

[Frame processing](/documentation/VideoToolbox/frame-processing)

An interface for accessing a range of different video-processing features.

### Motion Estimation

[VTMotionEstimationSession](/documentation/VideoToolbox/VTMotionEstimationSession-api-collection)

### Motion Estimation

[`class VTMotionEstimationSession`](/documentation/VideoToolbox/VTMotionEstimationSession)

### Compression

[Encoding video for low-latency conferencing](/documentation/VideoToolbox/encoding-video-for-low-latency-conferencing)

Configure a compression session to optimize encoding for video-conferencing apps.

[Encoding video for live streaming](/documentation/VideoToolbox/encoding-video-for-live-streaming)

Configure a compression session to encode video for live streaming.

[Encoding video for offline transcoding](/documentation/VideoToolbox/encoding-video-for-offline-transcoding)

Configure a compression session to transcode video in offline workflows.

[VTCompressionSession](/documentation/VideoToolbox/VTCompressionSession-api-collection)

An object that compresses video data.

[VTDecompressionSession](/documentation/VideoToolbox/VTDecompressionSession-api-collection)

An object that decompresses video data.

[VTFrameSilo](/documentation/VideoToolbox/VTFrameSilo-api-collection)

An object that stores sample buffers from a multipass encoding session.

[VTMultiPassStorage](/documentation/VideoToolbox/VTMultiPassStorage-api-collection)

An object that stores video encoding metadata from a multipass encoding session.

### Transformation

[VTPixelTransferSession](/documentation/VideoToolbox/VTPixelTransferSession-api-collection)

An object converts video data from source pixel buffers to destination pixel buffers.

[VTPixelRotationSession](/documentation/VideoToolbox/VTPixelRotationSession-api-collection)

An object that rotates source pixel buffers to destination pixel buffers.

### RAW Processing

[VTRAWProcessingSession](/documentation/VideoToolbox/VTRAWProcessingSession-api-collection)

An object that processes frames in camera native formats such as RAW or Bayer.

### RAW Processing

[`class VTRAWProcessingSession`](/documentation/VideoToolbox/VTRAWProcessingSession)

An object that processes frames in camera native formats such as RAW or Bayer.

### Media Extension

[`struct VTExtensionPropertiesKey`](/documentation/VideoToolbox/VTExtensionPropertiesKey)

A key in a Media Extension extension properties dictionary.

[`extern OSStatus VTCopyVideoDecoderExtensionProperties(CMFormatDescriptionRef formatDesc, CFDictionaryRef*mediaExtensionPropertiesOut);`](/documentation/VideoToolbox/VTCopyVideoDecoderExtensionProperties)

Returns information about the Media Extension video decoder required to decode the specified format.

### HDR Metadata

[VTHDRPerFrameMetadataGenerationSession](/documentation/VideoToolbox/VTHDRPerFrameMetadataGenerationSession-api-collection)

An object that generates per-frame HDR metadata.

### HDR Metadata

[`class VTHDRPerFrameMetadataGenerationSession`](/documentation/VideoToolbox/VTHDRPerFrameMetadataGenerationSession)

An object that generates per-frame HDR metadata.

### Codec Support

[`func VTIsHardwareDecodeSupported(CMVideoCodecType) -> Bool`](/documentation/VideoToolbox/VTIsHardwareDecodeSupported(_:))

Returns a Boolean value that indicates whether the current system supports hardware decode for the specified codec.

[`func VTRegisterProfessionalVideoWorkflowVideoEncoders()`](/documentation/VideoToolbox/VTRegisterProfessionalVideoWorkflowVideoEncoders())

Loads encoders appropriate for the client’s professional video workflows.

[`func VTRegisterProfessionalVideoWorkflowVideoDecoders()`](/documentation/VideoToolbox/VTRegisterProfessionalVideoWorkflowVideoDecoders())

Loads decoders appropriate for the client’s professional video workflows.

[`func VTRegisterSupplementalVideoDecoderIfAvailable(CMVideoCodecType)`](/documentation/VideoToolbox/VTRegisterSupplementalVideoDecoderIfAvailable(_:))

Registers a video decoder for the specified codec type, if one exists on the current system.

[`func VTCopySupportedPropertyDictionaryForEncoder(width: Int32, height: Int32, codecType: CMVideoCodecType, encoderSpecification: CFDictionary?, encoderIDOut: UnsafeMutablePointer<CFString?>?, supportedPropertiesOut: UnsafeMutablePointer<CFDictionary?>?) -> OSStatus`](/documentation/VideoToolbox/VTCopySupportedPropertyDictionaryForEncoder(width:height:codecType:encoderSpecification:encoderIDOut:supportedPropertiesOut:))

Builds a list of supported properties and encoder ID for an encoder.

[`func VTCopyVideoEncoderList(CFDictionary?, UnsafeMutablePointer<CFArray?>) -> OSStatus`](/documentation/VideoToolbox/VTCopyVideoEncoderList(_:_:))

Builds a list of available video encoders.

[Video Encoder List Keys](/documentation/VideoToolbox/video-encoder-list-keys)

Dictionary key constants to use to retrieve video encoder information.

### Utilities

[`func VTCreateCGImageFromCVPixelBuffer(CVPixelBuffer, options: CFDictionary?, imageOut: UnsafeMutablePointer<CGImage?>) -> OSStatus`](/documentation/VideoToolbox/VTCreateCGImageFromCVPixelBuffer(_:options:imageOut:))

Creates a Core Graphics bitmap image or image mask using the provided pixel buffer.

### Data Types

[VTSession](/documentation/VideoToolbox/VTSession-api-collection)

An abstract object that provides the common interface to configure VideoToolbox session objects.

[`struct VTInt32Point`](/documentation/VideoToolbox/VTInt32Point)

A structure that represents a 32-bit integer point value.

[`struct VTInt32Size`](/documentation/VideoToolbox/VTInt32Size)

A structure that represents a 32-bit integer size value.

### Errors

[Error Code Constants](/documentation/VideoToolbox/1490398-error-code-constants)

Constants for Video Toolbox operation error codes.

### Reference

[VideoToolbox Reference](/documentation/VideoToolbox/VideoToolbox-reference)

### Variables

[`let kVTCompressionPreset_ConsistentQuality: CFString`](/documentation/VideoToolbox/kVTCompressionPreset_ConsistentQuality)

[`let kVTCompressionPropertyKey_ConstantQualityFactor: CFString`](/documentation/VideoToolbox/kVTCompressionPropertyKey_ConstantQualityFactor)

[`let kVTCompressionPropertyKey_LogTransferFunction: CFString`](/documentation/VideoToolbox/kVTCompressionPropertyKey_LogTransferFunction)

Indicates that the transfer function or gamma of the content is a log format and identifies the specific log curve.
Log curve identifiers include `kCVImageBufferLogTransferFunction_AppleLog` (“com.apple.rec2020.apple-log”)
and `kCVImageBufferLogTransferFunction_AppleLog2` (“com.apple.apple-wide-gamut.apple-log”).
When the LogTransferFunction is specified for a VTCompressionSession, if source image buffers do not have exactly that LogTransferFunction, encoding will fail.

[`var kVTLogTransferFunctionMismatchErr: OSStatus`](/documentation/VideoToolbox/kVTLogTransferFunctionMismatchErr)

[`let kVTProjectionKind_AppleImmersiveVideo: CFString`](/documentation/VideoToolbox/kVTProjectionKind_AppleImmersiveVideo)

---

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)