An object that represents a mutable video composition.
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
A video composition describes, for any time in the aggregate time range of its instructions, the number and IDs of video tracks that are to be used in order to produce a composed video frame corresponding to that time. When AVFoundation’s built-in video compositor is used, the instructions an
AVVideo comprises can specify a spatial transformation, an opacity value, and a cropping rectangle for each video source, and these can vary over time via simple linear ramping functions.
You can also implement your own custom video compositor by implementing the
AVVideo protocol; a custom video compositor is provided with pixel buffers for each of its video sources during playback and other operations and can perform arbitrary graphical operations on them in order to produce visual output.