Instance Method


Adds one or more empty tracks to the target movie and copies the track settings from the source tracks.


func addMutableTracksCopyingSettings(from existingTracks: [AVAssetTrack], options: [String : Any]? = nil) -> [AVMutableMovieTrack]



An array of asset tracks to be added.


A dictionary that contains key for specifying the movie object initialization. Currently, no keys are defined.

Return Value

An array of AVMutableMovieTrack objects. The index of a track in this array is the same as the index of its source track in the existingTracks array.


Properties involving pairs of tracks,such as track references, are copied from the source tracks to the target tracks.

See Also

Modifying Tracks

func removeTrack(AVMovieTrack)

Removes the specified track from the target movie.

var tracks: [AVMutableMovieTrack]

An array of tracks in a mutable movie.

func track(withTrackID: CMPersistentTrackID) -> AVMutableMovieTrack?

A mutable movie track representing the track with the specified track identifier.

func tracks(withMediaCharacteristic: AVMediaCharacteristic) -> [AVMutableMovieTrack]

An array of mutable movie tracks that match the specified media characteristic.

func tracks(withMediaType: AVMediaType) -> [AVMutableMovieTrack]

An array of mutable movie tracks that match the specified media type.

func mutableTrack(compatibleWith: AVAssetTrack) -> AVMutableMovieTrack?

Provides a reference to a track from a mutable movie into which any time range can be inserted.