---
title: "addMutableTrack(withMediaType:copySettingsFrom:options:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablemovie/addmutabletrack(withmediatype:copysettingsfrom:options:)"
---

# addMutableTrack(withMediaType:copySettingsFrom:options:)

Adds an empty track to the target movie.

## Declaration

```swift
func addMutableTrack(withMediaType mediaType: AVMediaType, copySettingsFrom track: AVAssetTrack?, options: [String : Any]? = nil) -> AVMutableMovieTrack?
```

## Parameters

- `mediaType`: The media type for the new track.
- `track`: An doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetTrack containing the desired track settings to be transferred. Set to nil to create a track with default settings.
- `options`: A dictionary that contains key for specifying the movie object initialization. Currently, no keys are defined.

## Return Value

Return Value An AVMutableMovieTrack object.

## See Also

### Managing tracks

- [mutableTrack(compatibleWith:)](avfoundation/avmutablemovie/mutabletrack(compatiblewith:).md)
- [addMutableTracksCopyingSettings(from:options:)](avfoundation/avmutablemovie/addmutabletrackscopyingsettings(from:options:).md)
- [removeTrack(_:)](avfoundation/avmutablemovie/removetrack(_:).md)
