---
title: "videoComposition(withPropertiesOf:prototypeInstruction:completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Type Method
path: "avfoundation/avmutablevideocomposition/videocomposition(withpropertiesof:prototypeinstruction:completionhandler:)"
---

# videoComposition(withPropertiesOf:prototypeInstruction:completionHandler:)

Returns a new mutable video composition with the specified asset properties and a prototype video composition instruction.

## Declaration

```swift
class func videoComposition(withPropertiesOf asset: AVAsset, prototypeInstruction: AVVideoCompositionInstruction, completionHandler: @escaping @Sendable (AVMutableVideoComposition?, (any Error)?) -> Void)
```

```swift
class func videoComposition(withPropertiesOf asset: AVAsset, prototypeInstruction: AVVideoCompositionInstruction) async throws -> AVMutableVideoComposition
```

## Parameters

- `asset`: The asset for which to create a video composition. Load the asset’s doc://com.apple.avfoundation/documentation/AVFoundation/AVAsset/duration and doc://com.apple.avfoundation/documentation/AVFoundation/AVAsset/tracks properties before invoking this method.
- `prototypeInstruction`: A video composition instruction to use as a prototype.
- `completionHandler`: A block the system calls when it finishes creating the new video composition.

## See Also

### Creating a video composition

- [videoComposition(withPropertiesOf:completionHandler:)](avfoundation/avmutablevideocomposition/videocomposition(withpropertiesof:completionhandler:).md)
- [videoComposition(with:applyingCIFiltersWithHandler:completionHandler:)](avfoundation/avmutablevideocomposition/videocomposition(with:applyingcifilterswithhandler:completionhandler:).md)
- [init(propertiesOf:)](avfoundation/avmutablevideocomposition/init(propertiesof:).md)
- [init(propertiesOf:prototypeInstruction:)](avfoundation/avmutablevideocomposition/init(propertiesof:prototypeinstruction:).md)
- [init(asset:applyingCIFiltersWithHandler:)](avfoundation/avmutablevideocomposition/init(asset:applyingcifilterswithhandler:).md)
