---
title: "mutableTrack(compatibleWith:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablemovie/mutabletrack(compatiblewith:)"
---

# mutableTrack(compatibleWith:)

Provides a reference to a track from a mutable movie into which you can insert any time range.

## Declaration

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

## Parameters

- `track`: The doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetTrack containing the desired time range.

## Return Value

Return Value An AVMutableMovieTrack object that can accommodate the time range insertion. Returns nil when no track is available.

## Discussion

Discussion Keep the number of tracks in a movie to a minimum, corresponding to the number of tracks for which media data must be presented in parallel. If media data of the same type is presented serially, even from multiple assets, a single track of that media type should be used. This method can help the client to identify an existing target track for an insertion.

## See Also

### Managing tracks

- [addMutableTrack(withMediaType:copySettingsFrom:options:)](avfoundation/avmutablemovie/addmutabletrack(withmediatype:copysettingsfrom:options:).md)
- [addMutableTracksCopyingSettings(from:options:)](avfoundation/avmutablemovie/addmutabletrackscopyingsettings(from:options:).md)
- [removeTrack(_:)](avfoundation/avmutablemovie/removetrack(_:).md)
