Framework

VideoToolbox

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 should not need to use VideoToolbox directly.

Topics

Data Compression

VTCompressionSession

A session object that manages the compression of incoming video data.

Data Decompression

VTDecompressionSession

A session object that manages the decompression of incoming video data.

Data Conversion

VTPixelTransferSession

A session object used to copy and/or convert video data from source pixel buffers to destination pixel buffers.

Session Configuration

VTSession

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

Multipass Compression

VTMultiPassStorage

An object used for the storage of multipass video encoding metadata.

VTFrameSilo

An object that stores a large number of sample buffers, as produced by a multipass compression session.

Utilities

func VTCreateCGImageFromCVPixelBuffer(CVPixelBuffer, CFDictionary?, UnsafeMutablePointer<CGImage?>)

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

func VTRegisterProfessionalVideoWorkflowVideoDecoders()

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

func VTRegisterProfessionalVideoWorkflowVideoEncoders()

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

Errors

Error Code Constants

Constants for Video Toolbox operation error codes.