<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableComposition/mutableTrack(compatibleWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableComposition(im)mutableTrackCompatibleWithTrack:"
  },
  "title" : "mutableTrack(compatibleWith:)"
}
-->

# mutableTrack(compatibleWith:)

Returns a composition track into which you can insert any time range of the specified asset track.

```
func mutableTrack(compatibleWith track: AVAssetTrack) -> AVMutableCompositionTrack?
```

## Parameters

`track`

The asset track to find a composition track for.

## Return Value

A mutable composition track, of `nil` if a compatible track isn’t available.

## Discussion

To optimize performance, limit the number of tracks to only what you need to present media data in parallel. To present media data of the same type serially, even from multiple assets, use a single track of that media type. You use this method to identify a suitable existing target track for an insertion.

If there’s no compatible track available, you can create a new track of the same media type as `track` using [`addMutableTrack(withMediaType:preferredTrackID:)`](/documentation/AVFoundation/AVMutableComposition/addMutableTrack(withMediaType:preferredTrackID:)).

This method is the counterpart to [`compatibleTrack(for:)`](/documentation/AVFoundation/AVURLAsset/compatibleTrack(for:)) on [`AVAsset`](/documentation/AVFoundation/AVAsset).

---

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)