<!--
{
  "availability" : [
    "iOS: 4.0.0 - 26.0.0",
    "iPadOS: 4.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.7.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableVideoCompositionLayerInstruction"
  },
  "title" : "AVMutableVideoCompositionLayerInstruction"
}
-->

# AVMutableVideoCompositionLayerInstruction

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

```
class AVMutableVideoCompositionLayerInstruction
```

## Topics

### Creating an instruction

[`videoCompositionLayerInstruction`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/videoCompositionLayerInstruction)

Returns a new mutable video composition layer instruction.

[`init(assetTrack:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/init(assetTrack:))

Creates a new mutable video composition layer instruction for the given track.

### Configuring a track ID

[`trackID`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/trackID)

The track identifier of the source track to which the compositor applies the instruction.

### Managing properties

[`setOpacity(_:at:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setOpacity(_:at:))

Sets the opacity value at a specific time within the time range of the instruction.

[`setOpacityRamp(fromStartOpacity:toEndOpacity:timeRange:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setOpacityRamp(fromStartOpacity:toEndOpacity:timeRange:))

Sets an opacity ramp to apply during a specified time range.

[`setTransform(_:at:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setTransform(_:at:))

Sets the transform value at a time within the time range of the instruction.

[`setTransformRamp(fromStart:toEnd:timeRange:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setTransformRamp(fromStart:toEnd:timeRange:))

Sets a transform ramp to apply during a given time range.

### Setting crop rectangle values

[`setCropRectangle(_:at:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setCropRectangle(_:at:))

Sets the crop rectangle  value at a time within the time range of the instruction.

[`setCropRectangleRamp(fromStartCropRectangle:toEndCropRectangle:timeRange:)`](/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setCropRectangleRamp(fromStartCropRectangle:toEndCropRectangle:timeRange:))

Sets a crop rectangle ramp to apply during the specified time range.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)