Class AVMutable Composition
A mutable object used to create a new composition from existing assets.
iOS 4.0+ macOS 10.7+ Mac Catalyst 13.0+ tvOS 9.0+ watchOS 2.0+ Overview
This class provides the ability to add and remove tracks, and you can add, remove, and scale time ranges. You can make an immutable snapshot of a mutable composition for playback or inspection as follows:
AVMutableComposition *myMutableComposition =
<#a mutable composition you want to inspect or play in its current state#>;
AVComposition *immutableSnapshotOfMyComposition = [myMutableComposition copy];
// Create a player to inspect and play the composition.
AVPlayerItem *playerItemForSnapshottedComposition =
[[AVPlayerItem alloc] initWithAsset:immutableSnapshotOfMyComposition];
Topics Creating a Mutable Composition Managing Tracks tracks
An array of mutable composition tracks contained by the composition.
Configuring Video Size natural Size
The encoded or authored size of the visual portion of the asset.
See Also Media Composition AVComposition
An object that combines media data from multiple file-based sources to present or process media data from multiple sources.
A track in a composition object, consisting of a media type, a track identifier, and track segments.
AVComposition Track Segment
A segment of a track, consisting of a URL, a track identifier, and a time mapping from the source track to the composition track.
AVMutable Composition Track
A mutable track in a composition object that you use to insert, remove, and scale track segments without affecting their low-level representation.