Contents

AVMutableComposition

An object that you use to create a new composition from existing assets.

Declaration

class AVMutableComposition

Overview

Use this object to add and remove composition tracks, and add, remove, and scale their time ranges. You can make an immutable snapshot of a mutable composition for playback and inspection as follows:

// Use a mutable composition object you create.
let mutableComposition = AVMutableComposition()
        
guard let composition = mutableComposition.copy() as? AVComposition else { return }
        
// Create a player item to inspect and play the composition.
let playerItem = AVPlayerItem(asset: composition)

Topics

Creating a composition

Loading tracks

Accessing tracks

Managing composition tracks

Managing Cinematic tracks

Managing time ranges

Configuring video size

Instance methods

Initializers

See Also

Mutable compositions