One Logo Pool Ball
AVFoundation · IOS API REFERENCE

AVVideoComposition

class · iOS 4.0+ · SDK 27.1

class AVVideoComposition

Members (23)

get · iOS 15.0+

sourceSampleDataTrackIDs

TypeScript
get sourceSampleDataTrackIDs(): Array<number>
Swift declaration
@objc(_sourceSampleDataTrackIDs) dynamic var sourceSampleDataTrackIDs: [CMPersistentTrackID] { get }
init · iOS 9.0+ · Deprecated in iOS 18.0

init

TypeScript
static initAssetApplyingCIFiltersWithHandler(asset: AVAsset, applier: ((arg0: AVAsynchronousCIImageFilteringRequest) => void)): AVVideoComposition
Swift declaration
init(asset: AVAsset, applyingCIFiltersWithHandler applier: @escaping @Sendable (AVAsynchronousCIImageFilteringRequest) -> Void)
static · iOS 16.0+ · Deprecated in iOS 27.0

videoComposition

TypeScript
static videoCompositionWithApplyingCIFiltersWithHandlerCompletionHandler(asset: AVAsset, applier: ((arg0: AVAsynchronousCIImageFilteringRequest) => void), completionHandler: ((arg0: (AVVideoComposition) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
class func videoComposition(with asset: AVAsset, applyingCIFiltersWithHandler applier: @escaping @Sendable (AVAsynchronousCIImageFilteringRequest) -> Void) async throws -> AVVideoComposition
init · iOS 6.0+ · Deprecated in iOS 18.0

init

TypeScript
static initPropertiesOf(asset: AVAsset): AVVideoComposition
Swift declaration
init(propertiesOf asset: AVAsset)
static · iOS 16.0+

videoComposition

TypeScript
static videoCompositionWithPropertiesOfCompletionHandler(asset: AVAsset, completionHandler: ((arg0: (AVVideoComposition) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
class func videoComposition(withPropertiesOf asset: AVAsset) async throws -> AVVideoComposition
method · iOS 16.0+ · Deprecated in iOS 18.0

determineValidity

TypeScript
determineValidity(asset: (AVAsset) | null, timeRange: _CoreMedia_CMTimeRange, validationDelegate: (Implements<AVVideoCompositionValidationHandling> | SDKHandle) | null, completionHandler: ((arg0: boolean, arg1: (NativeError) | null) => void)): void
Swift declaration
func isValid(for asset: AVAsset?, timeRange: CMTimeRange, validationDelegate: (any AVVideoCompositionValidationHandling)?) async throws -> Bool
method · iOS 5.0+ · Deprecated in iOS 18.0

isValid

TypeScript
isValidForTimeRangeValidationDelegate(asset: (AVAsset) | null, timeRange: _CoreMedia_CMTimeRange, validationDelegate?: (Implements<AVVideoCompositionValidationHandling> | SDKHandle) | null): boolean
Swift declaration
func isValid(for asset: AVAsset?, timeRange: CMTimeRange, validationDelegate: (any AVVideoCompositionValidationHandling)?) -> Bool
method · iOS 18.0+

isValid

TypeScript
isValidForAssetDurationTimeRangeValidationDelegate(tracks: Array<AVAssetTrack>, duration: _CoreMedia_CMTime, timeRange: _CoreMedia_CMTimeRange, validationDelegate?: (Implements<AVVideoCompositionValidationHandling> | SDKHandle) | null): boolean
Swift declaration
func isValid(for tracks: [AVAssetTrack], assetDuration duration: CMTime, timeRange: CMTimeRange, validationDelegate: (any AVVideoCompositionValidationHandling)?) -> Bool
get · iOS 4.0+

animationTool

TypeScript
get animationTool(): (AVVideoCompositionCoreAnimationTool) | null
Swift declaration
var animationTool: AVVideoCompositionCoreAnimationTool? { get }
get · iOS 10.0+

colorPrimaries

TypeScript
get colorPrimaries(): (string) | null
Swift declaration
var colorPrimaries: String? { get }
get · iOS 10.0+

colorTransferFunction

TypeScript
get colorTransferFunction(): (string) | null
Swift declaration
var colorTransferFunction: String? { get }
get · iOS 10.0+

colorYCbCrMatrix

TypeScript
get colorYCbCrMatrix(): (string) | null
Swift declaration
var colorYCbCrMatrix: String? { get }
get · iOS 7.0+

customVideoCompositorClass

TypeScript
get customVideoCompositorClass(): (string) | null
Swift declaration
var customVideoCompositorClass: (any AVVideoCompositing.Type)? { get }
get · iOS 4.0+

frameDuration

TypeScript
get frameDuration(): _CoreMedia_CMTime
Swift declaration
var frameDuration: CMTime { get }
get · iOS 4.0+

instructions

TypeScript
get instructions(): Array<SDKHandle>
Swift declaration
var instructions: [any AVVideoCompositionInstructionProtocol] { get }
get · iOS 17.0+

perFrameHDRDisplayMetadataPolicy

TypeScript
get perFrameHDRDisplayMetadataPolicy(): AVVideoComposition_PerFrameHDRDisplayMetadataPolicy
Swift declaration
var perFrameHDRDisplayMetadataPolicy: AVVideoComposition.PerFrameHDRDisplayMetadataPolicy { get }
get · iOS 4.0+

renderScale

TypeScript
get renderScale(): number
Swift declaration
var renderScale: Float { get }
get · iOS 4.0+

renderSize

TypeScript
get renderSize(): { width: number; height: number }
Swift declaration
var renderSize: CGSize { get }
get · iOS 11.0+

sourceTrackIDForFrameTiming

TypeScript
get sourceTrackIDForFrameTiming(): number
Swift declaration
var sourceTrackIDForFrameTiming: CMPersistentTrackID { get }
init · iOS 26.0+

init

TypeScript
static initConfiguration(configuration: AVVideoComposition_Configuration): AVVideoComposition
Swift declaration
convenience init(configuration: AVVideoComposition.Configuration)

Initialize an AVVideoComposition with a configuration. - Parameter configuration: contains the property values for a new AVVideoComposition.

init · iOS 26.0+

init

TypeScript
static initApplyingFiltersToApplier(asset: AVAsset, applier: ((arg0: AVCIImageFilteringParameters) => Promise<AVCIImageFilteringResult>)): Promise<AVVideoComposition>
Swift declaration
nonisolated(nonsending) convenience init(applyingFiltersTo asset: AVAsset, applier: @escaping @Sendable (AVCIImageFilteringParameters) async throws -> AVCIImageFilteringResult) async throws

Creates a video composition configured to apply Core Image filters to each video frame of the specified asset. - Parameter asset: The asset whose configuration matches the intended use of the video composition. - Parameter applier: A closure that AVFoundation calls when processing each video frame. - Returns: A new AVVideoComposition instance configured for Core Image filtering.

get · iOS 26.0+

outputBufferDescription

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

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+

spatialVideoConfigurations

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

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.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AVVideoComposition.init()

inherited init: cannot prove legal (class declares 5 custom initializers)

All AVFoundation types →