init(propertiesOf:)
Creates a mutable video composition with the specified asset properties.
Declaration
init(propertiesOf asset: AVAsset)Parameters
- asset:
An instance of Avasset. Ensure that the duration and tracks properties of the asset are already loaded before invoking this method.
Discussion
The returned AVMutableVideoComposition has instructions that respect the spatial properties and time ranges of the specified asset’s video tracks.
It also has the following values for its properties:
A value for frameDuration short enough to accommodate the greatest nominalFrameRate among the asset’s video tracks. If the nominalFrameRate of all of the asset’s video tracks is 0, a default frame rate of 30fps is used.
If the specified asset is an instance of AVComposition, the renderSize is set to the naturalSize of the AVComposition; otherwise the renderSize will be set to a value that encompasses all of the asset’s video tracks.
A renderScale of 1.0.
The animationTool property set to
nil.