<!--
{
  "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.

[`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.

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

[`-  getCropRectangleRampForTime: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.

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

[`-  getOpacityRampForTime: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.

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

[`-  getTransformRampForTime:startTransform:endTransform:timeRange:`](/documentation/AVFoundation/AVVideoCompositionLayerInstruction/getTransformRamp(for:start:end:timeRange:))

Obtains the transform ramp that includes a specified time.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSMutableCopying`](/documentation/Foundation/NSMutableCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Sendable`](/documentation/Swift/Sendable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Inherited By

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

---

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)