One Logo Pool Ball
AVFoundation · IOS API REFERENCE

AVVideoComposition.Configuration

struct · iOS 26.0+ · SDK 27.1

struct Configuration

Configurable properties for initializing a new AVVideoComposition instance.

Members (30)

get · iOS 26.0+

renderSize

TypeScript
get renderSize(): { width: number; height: number }
Swift declaration
var renderSize: CGSize { get set }

The size at which the video composition should render.

set · iOS 26.0+

renderSize

TypeScript
set renderSize(value: { width: number; height: number })
Swift declaration
var renderSize: CGSize { get set }

The size at which the video composition should render.

get · iOS 26.0+

renderScale

TypeScript
get renderScale(): number
Swift declaration
var renderScale: Float { get set }

The scale at which the video composition should render.

set · iOS 26.0+

renderScale

TypeScript
set renderScale(value: number)
Swift declaration
var renderScale: Float { get set }

The scale at which the video composition should render.

get · iOS 26.0+

instructions

TypeScript
get instructions(): Array<SDKHandle>
Swift declaration
var instructions: [any AVVideoCompositionInstructionProtocol] { get set }

The video composition instructions.

set · iOS 26.0+

instructions

TypeScript
set instructions(value: Array<SDKHandle>)
Swift declaration
var instructions: [any AVVideoCompositionInstructionProtocol] { get set }

The video composition instructions.

init · iOS 26.0+

init

TypeScript
static initAnimationToolColorPrimariesColorTransferFunctionColorYCbCrMatrixCustomVideoCompositorClassFrameDurationInstructionsOutputBufferDescriptionPerFrameHDRDisplayMetadataPolicyRenderScaleRenderSizeSourceSampleDataTrackIDsSourceTrackIDForFrameTimingSpatialVideoConfigurations(animationTool?: (AVVideoCompositionCoreAnimationTool) | null, colorPrimaries?: (string) | null, colorTransferFunction?: (string) | null, colorYCbCrMatrix?: (string) | null, customVideoCompositorClass?: (string) | null, frameDuration?: _CoreMedia_CMTime, instructions?: Array<SDKHandle>, outputBufferDescription?: (Array<Array<_CoreMedia_CMTag>>) | null, perFrameHDRDisplayMetadataPolicy?: AVVideoComposition_PerFrameHDRDisplayMetadataPolicy, renderScale?: number, renderSize?: { width: number; height: number }, sourceSampleDataTrackIDs?: Array<number>, sourceTrackIDForFrameTiming?: number, spatialVideoConfigurations?: Array<AVSpatialVideoConfiguration>): AVVideoComposition_Configuration
Swift declaration
init(animationTool: AVVideoCompositionCoreAnimationTool? = nil, colorPrimaries: String? = nil, colorTransferFunction: String? = nil, colorYCbCrMatrix: String? = nil, customVideoCompositorClass: (any AVVideoCompositing.Type)? = nil, frameDuration: CMTime = CMTime.zero, instructions: [any AVVideoCompositionInstructionProtocol] = [any AVVideoCompositionInstructionProtocol](), outputBufferDescription: [[CMTag]]? = nil, perFrameHDRDisplayMetadataPolicy: AVVideoComposition.PerFrameHDRDisplayMetadataPolicy = .propagate, renderScale: Float = 1.0, renderSize: CGSize = .zero, sourceSampleDataTrackIDs: [CMPersistentTrackID] = [CMPersistentTrackID](), sourceTrackIDForFrameTiming: Int32 = CMPersistentTrackID.zero, spatialVideoConfigurations: [AVSpatialVideoConfiguration] = [])
get · iOS 26.0+

animationTool

TypeScript
get animationTool(): (AVVideoCompositionCoreAnimationTool) | null
Swift declaration
var animationTool: AVVideoCompositionCoreAnimationTool? { get set }

A video composition tool to use with Core Animation in offline rendering.

set · iOS 26.0+

animationTool

TypeScript
set animationTool(value: (AVVideoCompositionCoreAnimationTool) | null)
Swift declaration
var animationTool: AVVideoCompositionCoreAnimationTool? { get set }

A video composition tool to use with Core Animation in offline rendering.

get · iOS 26.0+

frameDuration

TypeScript
get frameDuration(): _CoreMedia_CMTime
Swift declaration
var frameDuration: CMTime { get set }

A time interval for which the video composition should render composed video frames.

set · iOS 26.0+

frameDuration

TypeScript
set frameDuration(value: _CoreMedia_CMTime)
Swift declaration
var frameDuration: CMTime { get set }

A time interval for which the video composition should render composed video frames.

get · iOS 26.0+

colorPrimaries

TypeScript
get colorPrimaries(): (string) | null
Swift declaration
var colorPrimaries: String? { get set }

The color primaries used for video composition.

set · iOS 26.0+

colorPrimaries

TypeScript
set colorPrimaries(value: (string) | null)
Swift declaration
var colorPrimaries: String? { get set }

The color primaries used for video composition.

get · iOS 26.0+

colorYCbCrMatrix

TypeScript
get colorYCbCrMatrix(): (string) | null
Swift declaration
var colorYCbCrMatrix: String? { get set }

The YCbCr matrix used for video composition.

set · iOS 26.0+

colorYCbCrMatrix

TypeScript
set colorYCbCrMatrix(value: (string) | null)
Swift declaration
var colorYCbCrMatrix: String? { get set }

The YCbCr matrix used for video composition.

get · iOS 26.0+

colorTransferFunction

TypeScript
get colorTransferFunction(): (string) | null
Swift declaration
var colorTransferFunction: String? { get set }

The transfer function used for video composition.

set · iOS 26.0+

colorTransferFunction

TypeScript
set colorTransferFunction(value: (string) | null)
Swift declaration
var colorTransferFunction: String? { get set }

The transfer function used for video composition.

get · iOS 26.0+

outputBufferDescription

TypeScript
get outputBufferDescription(): (Array<Array<_CoreMedia_CMTag>>) | null
Swift declaration
var outputBufferDescription: [[CMTag]]? { get set }

The output buffers of the video composition can be specified with the outputBufferDescription. The value is an array of an array of CMTag objects that describes the output buffers. If the video composition will output tagged buffers, the details of those buffers should be specified with CMTags. Specifically, the StereoView (eyes) and ProjectionKind must be specified. The behavior is undefined if the output buffers do not match the outputBufferDescription. The default is nil, which means monoscopic output. Note that an empty array is not valid. Note that tagged buffers are only supported for custom compositors.

set · iOS 26.0+

outputBufferDescription

TypeScript
set outputBufferDescription(value: (Array<Array<_CoreMedia_CMTag>>) | null)
Swift declaration
var outputBufferDescription: [[CMTag]]? { get set }

The output buffers of the video composition can be specified with the outputBufferDescription. The value is an array of an array of CMTag objects that describes the output buffers. If the video composition will output tagged buffers, the details of those buffers should be specified with CMTags. Specifically, the StereoView (eyes) and ProjectionKind must be specified. The behavior is undefined if the output buffers do not match the outputBufferDescription. The default is nil, which means monoscopic output. Note that an empty array is not valid. Note that tagged buffers are only supported for custom compositors.

get · iOS 26.0+

sourceSampleDataTrackIDs

TypeScript
get sourceSampleDataTrackIDs(): Array<number>
Swift declaration
var sourceSampleDataTrackIDs: [CMPersistentTrackID] { get set }

The identifiers of source sample data tracks in the composition that the object requires to compose frames.

set · iOS 26.0+

sourceSampleDataTrackIDs

TypeScript
set sourceSampleDataTrackIDs(value: Array<number>)
Swift declaration
var sourceSampleDataTrackIDs: [CMPersistentTrackID] { get set }

The identifiers of source sample data tracks in the composition that the object requires to compose frames.

get · iOS 26.0+

customVideoCompositorClass

TypeScript
get customVideoCompositorClass(): (string) | null
Swift declaration
var customVideoCompositorClass: (any AVVideoCompositing.Type)? { get set }

A custom compositor class to use.

set · iOS 26.0+

customVideoCompositorClass

TypeScript
set customVideoCompositorClass(value: (string) | null)
Swift declaration
var customVideoCompositorClass: (any AVVideoCompositing.Type)? { get set }

A custom compositor class to use.

get · iOS 26.0+

spatialVideoConfigurations

TypeScript
get spatialVideoConfigurations(): Array<AVSpatialVideoConfiguration>
Swift declaration
var spatialVideoConfigurations: [AVSpatialVideoConfiguration] { get set }

Indicates the spatial configurations that are available to associate with the output of the video composition. A custom compositor can output spatial video by specifying one of these spatial configurations. A spatial configuration with all nil values indicates the video is not spatial. A nil spatial configuration also indicates the video is not spatial. The value can be nil, which indicates the output will not be spatial. NOTE: If this property is not empty, then the client must attach one of the spatial configurations in this array to all of the pixel buffers, otherwise an exception will be thrown.

set · iOS 26.0+

spatialVideoConfigurations

TypeScript
set spatialVideoConfigurations(value: Array<AVSpatialVideoConfiguration>)
Swift declaration
var spatialVideoConfigurations: [AVSpatialVideoConfiguration] { get set }

Indicates the spatial configurations that are available to associate with the output of the video composition. A custom compositor can output spatial video by specifying one of these spatial configurations. A spatial configuration with all nil values indicates the video is not spatial. A nil spatial configuration also indicates the video is not spatial. The value can be nil, which indicates the output will not be spatial. NOTE: If this property is not empty, then the client must attach one of the spatial configurations in this array to all of the pixel buffers, otherwise an exception will be thrown.

get · iOS 26.0+

sourceTrackIDForFrameTiming

TypeScript
get sourceTrackIDForFrameTiming(): number
Swift declaration
var sourceTrackIDForFrameTiming: CMPersistentTrackID { get set }

An identifier of the source track from which the video composition derives frame timing.

set · iOS 26.0+

sourceTrackIDForFrameTiming

TypeScript
set sourceTrackIDForFrameTiming(value: number)
Swift declaration
var sourceTrackIDForFrameTiming: CMPersistentTrackID { get set }

An identifier of the source track from which the video composition derives frame timing.

get · iOS 26.0+

perFrameHDRDisplayMetadataPolicy

TypeScript
get perFrameHDRDisplayMetadataPolicy(): AVVideoComposition_PerFrameHDRDisplayMetadataPolicy
Swift declaration
var perFrameHDRDisplayMetadataPolicy: AVVideoComposition.PerFrameHDRDisplayMetadataPolicy { get set }

The policy for display of HDR display metadata on the rendered frame.

set · iOS 26.0+

perFrameHDRDisplayMetadataPolicy

TypeScript
set perFrameHDRDisplayMetadataPolicy(value: AVVideoComposition_PerFrameHDRDisplayMetadataPolicy)
Swift declaration
var perFrameHDRDisplayMetadataPolicy: AVVideoComposition.PerFrameHDRDisplayMetadataPolicy { get set }

The policy for display of HDR display metadata on the rendered frame.

init · iOS 26.0+

init

TypeScript
static initForPrototypeInstruction(asset: AVAsset, prototypeInstruction?: (AVVideoCompositionInstruction) | null): Promise<AVVideoComposition_Configuration>
Swift declaration
nonisolated(nonsending) init(for asset: AVAsset, prototypeInstruction: AVVideoCompositionInstruction? = nil) async throws

Initializes a video composition configuration with the specified asset properties and optional prototype video composition instruction. - Parameter asset: asset to use with the video composition - Parameter prototypeInstruction: a video composition instruction to use as a prototype.

Skipped declarations

No declarations were skipped in this snapshot.

All AVFoundation types →