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

# AVVideoCompositionLayerInstruction

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

```
class AVVideoCompositionLayerInstruction
```

## Topics

### Creating a layer instruction

[`init(configuration:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/init(configuration:))

Initialize an AVVideoCompositionLayerInstruction with a configuration.

[`AVVideoCompositionLayerInstruction.Configuration`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/Configuration)

Configurable properties for initializing a new AVVideoCompositionLayerInstruction instance.

[`videoCompositionLayerInstructionWithLayerInstruction:`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/videoCompositionLayerInstructionWithLayerInstruction:)

Pass-through initializer, for internal use in AVFoundation only

### Getting the track ID

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

The track identifier of the source track to which the compositor will apply the instruction.

### Getting opacity, transform, and cropping ramps

[`cropRectangleRamp(at:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/cropRectangleRamp(at:))

Obtains the crop rectangle ramp that includes the specified time.

[`AVVideoCompositionLayerInstruction.CropRectangleRamp`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/CropRectangleRamp)

[`getCropRectangleRamp(for:startCropRectangle:endCropRectangle:timeRange:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/getCropRectangleRamp(for:startCropRectangle:endCropRectangle:timeRange:))

Obtains the crop rectangle ramp that includes the specified time.

[`opacityRamp(at:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/opacityRamp(at:))

Obtains the opacity ramp that includes a specified time.

[`AVVideoCompositionLayerInstruction.OpacityRamp`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/OpacityRamp)

[`getOpacityRamp(for:startOpacity:endOpacity:timeRange:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/getOpacityRamp(for:startOpacity:endOpacity:timeRange:))

Obtains the opacity ramp that includes a specified time.

[`transformRamp(at:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/transformRamp(at:))

Obtains the transform ramp that includes a specified time.

[`AVVideoCompositionLayerInstruction.TransformRamp`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/TransformRamp)

[`getTransformRamp(for:start:end:timeRange:)`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/getTransformRamp(for:start:end:timeRange:))

Obtains the transform ramp that includes a specified time.



---

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)