---
title: AVMutableVideoCompositionLayerInstruction
framework: avfoundation
role: symbol
role_heading: Class
path: avfoundation/avmutablevideocompositionlayerinstruction
---

# AVMutableVideoCompositionLayerInstruction

An object used to modify the transform, cropping, and opacity ramps applied to a given track in a mutable composition.

## Declaration

```swift
class AVMutableVideoCompositionLayerInstruction
```

## Topics

### Creating an instruction

- [init(assetTrack:)](avfoundation/avmutablevideocompositionlayerinstruction/init(assettrack:).md)

### Configuring a track ID

- [trackID](avfoundation/avmutablevideocompositionlayerinstruction/trackid.md)

### Managing properties

- [setOpacity(_:at:)](avfoundation/avmutablevideocompositionlayerinstruction/setopacity(_:at:).md)
- [setOpacityRamp(fromStartOpacity:toEndOpacity:timeRange:)](avfoundation/avmutablevideocompositionlayerinstruction/setopacityramp(fromstartopacity:toendopacity:timerange:).md)
- [setTransform(_:at:)](avfoundation/avmutablevideocompositionlayerinstruction/settransform(_:at:).md)
- [setTransformRamp(fromStart:toEnd:timeRange:)](avfoundation/avmutablevideocompositionlayerinstruction/settransformramp(fromstart:toend:timerange:).md)

### Setting crop rectangle values

- [setCropRectangle(_:at:)](avfoundation/avmutablevideocompositionlayerinstruction/setcroprectangle(_:at:).md)
- [setCropRectangleRamp(fromStartCropRectangle:toEndCropRectangle:timeRange:)](avfoundation/avmutablevideocompositionlayerinstruction/setcroprectangleramp(fromstartcroprectangle:toendcroprectangle:timerange:).md)

## Relationships

### Inherits From

- [AVVideoCompositionLayerInstruction](avfoundation/avvideocompositionlayerinstruction.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSMutableCopying](foundation/nsmutablecopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Built-in video compositing

- [Editing and playing HDR video](avfoundation/editing-and-playing-hdr-video.md)
- [Debugging AVFoundation audio mixes, compositions, and video compositions](avfoundation/debugging-avfoundation-audio-mixes-compositions-and-video-compositions.md)
- [AVVideoComposition](avfoundation/avvideocomposition.md)
- [AVVideoCompositionInstruction](avfoundation/avvideocompositioninstruction-swift.class.md)
- [AVVideoCompositionLayerInstruction](avfoundation/avvideocompositionlayerinstruction.md)
- [AVMutableVideoComposition](avfoundation/avmutablevideocomposition.md)
- [AVMutableVideoCompositionInstruction](avfoundation/avmutablevideocompositioninstruction.md)
