<!--
{
  "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 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableCompositionTrack",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableCompositionTrack"
  },
  "title" : "AVMutableCompositionTrack"
}
-->

# AVMutableCompositionTrack

A mutable track in a composition that you use to insert, remove, and scale track segments without affecting their low-level representation.

```
class AVMutableCompositionTrack
```

## Overview

Use this object to define constraints for the temporal arrangement of the track segments. If you set the composition’s track segments, you can test whether they meet the constraints by calling the [`validateSegments(_:)`](/documentation/AVFoundation/AVMutableCompositionTrack/validateSegments(_:)) method.

## Topics

### Configuring track properties

[`isEnabled`](/documentation/AVFoundation/AVMutableCompositionTrack/isEnabled)

A Boolean value that indicates whether the tracks is in an enabled state.

[`naturalTimeScale`](/documentation/AVFoundation/AVMutableCompositionTrack/naturalTimeScale)

The time scale in which you can perform time-based operations without extra numerical conversion.

[`languageCode`](/documentation/AVFoundation/AVMutableCompositionTrack/languageCode)

The language associated with the track, as an ISO 639-2/T language code.

[`extendedLanguageTag`](/documentation/AVFoundation/AVMutableCompositionTrack/extendedLanguageTag)

The language tag associated with the track, as an RFC 4646 language tag.

[`preferredTransform`](/documentation/AVFoundation/AVMutableCompositionTrack/preferredTransform)

The preferred transformation of the visual media data for display purposes.

[`preferredVolume`](/documentation/AVFoundation/AVMutableCompositionTrack/preferredVolume)

The volume the track prefers for its audible media data.

### Managing time ranges

[`segments`](/documentation/AVFoundation/AVMutableCompositionTrack/segments)

The track segments that a composition track contains.

[`insertEmptyTimeRange(_:)`](/documentation/AVFoundation/AVMutableCompositionTrack/insertEmptyTimeRange(_:))

Adds or extends an empty time range within the track.

[`insertTimeRange(_:of:at:)`](/documentation/AVFoundation/AVMutableCompositionTrack/insertTimeRange(_:of:at:))

Inserts a time range of media from a source track into a composition track.

[`insertTimeRanges(_:of:at:)`](/documentation/AVFoundation/AVMutableCompositionTrack/insertTimeRanges(_:of:at:))

Inserts the time ranges of multiple source tracks into a track of a composition.

[`removeTimeRange(_:)`](/documentation/AVFoundation/AVMutableCompositionTrack/removeTimeRange(_:))

Removes a time range of media from a composition track.

[`scaleTimeRange(_:toDuration:)`](/documentation/AVFoundation/AVMutableCompositionTrack/scaleTimeRange(_:toDuration:))

Changes the duration of a time range of the track.

### Associating tracks

[`addTrackAssociation(to:type:)`](/documentation/AVFoundation/AVMutableCompositionTrack/addTrackAssociation(to:type:))

Establishes a track association of a specific type between two tracks.

[`removeTrackAssociation(to:type:)`](/documentation/AVFoundation/AVMutableCompositionTrack/removeTrackAssociation(to:type:))

Removes an association from a composition track.

### Replacing format descriptions

[`replaceFormatDescription(_:with:)`](/documentation/AVFoundation/AVMutableCompositionTrack/replaceFormatDescription(_:with:))

Replaces a format description with another or cancels a previous replacement.

### Validating segments

[`validateSegments(_:)`](/documentation/AVFoundation/AVMutableCompositionTrack/validateSegments(_:))

Returns a Boolean value that indicates whether a given array of track segments conform to the timing rules for a composition track.



---

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)