<!--
{
  "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/AVVideoCompositionInstruction-swift.class",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVVideoCompositionInstruction"
  },
  "title" : "AVVideoCompositionInstruction"
}
-->

# AVVideoCompositionInstruction

An operation that a compositor performs.

```
class AVVideoCompositionInstruction
```

## Overview

An [`AVVideoComposition`](/documentation/AVFoundation/AVVideoComposition) object maintains an array of [`instructions`](/documentation/AVFoundation/AVVideoComposition/instructions) to perform its composition.

## Topics

### Creating an instruction

[`init(configuration:)`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/init(configuration:))

Initialize an AVVideoCompositionInstruction with a configuration.

[`Configuration`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/Configuration)

Configurable properties for initializing a new AVVideoCompositionInstruction instance.

[`+  videoCompositionInstructionWithInstruction:`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/videoCompositionInstructionWithInstruction:)

Pass-through initializer, for internal use in AVFoundation only

### Inspecting the instruction

[`backgroundColor`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/backgroundColor)

The background color of the composition.

[`layerInstructions`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/layerInstructions)

Instructions that specify how to layer and compose video frames from source tracks.

[`timeRange`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/timeRange)

The time range to which the instruction applies.

[`enablePostProcessing`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/enablePostProcessing)

A Boolean value that indicates whether the instruction requires post processing.

### Identifying source tracks

[`requiredSourceTrackIDs`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/requiredSourceTrackIDs)

The identifiers of source video tracks that the compositor requires to compose frames for the instruction.

[`requiredSourceSampleDataTrackIDs`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/requiredSourceSampleDataTrackIDs)

The identifiers of source sample data tracks that the compositor requires to compose frames for the instruction.

[`passthroughTrackID`](/documentation/AVFoundation/AVVideoCompositionInstruction-swift.class/passthroughTrackID)

The track identifier from an instruction source frame.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

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

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

### Inherits From

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

### Inherited By

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

---

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)