AVMutableMovie
A mutable object that represents an audiovisual container that conforms to the QuickTime movie file format or a related format like MPEG-4.
Declaration
class AVMutableMovieOverview
This class is a mutable subclass of AVMovie that provides methods that support movie editing. For example, you can use a mutable movie to copy media data from one track and paste it into another. You can also use this object to create track references from one track to another (for example, to set one track as a chapter track of another track). To perform editing operations on individual tracks, use the associated classes AVMovieTrack and AVMutableMovieTrack.
You use movie objects only when operating on format-specific features of a QuickTime or ISO base media file. You typically don’t use these classes to open and play QuickTime movie files or ISO base media files. Instead, you use AVURLAsset and AVPlayerItem.
When performing media insertions, a movie interleaves media data from tracks in the source asset to optimize the movie file for playback. However, performing a series of media insertions may result in a movie file that’s not optimally interleaved. You can optimize a movie file for playback by exporting it with an AVAssetExportSession object using the export preset AVAssetExportPresetPassthrough, and setting the shouldOptimizeForNetworkUse property value to true.
Topics
Creating a movie
Configuring a movie
Loading tracks
tracksloadTrack(withTrackID:completionHandler:)loadTracks(withMediaType:completionHandler:)loadTracks(withMediaCharacteristic:completionHandler:)
Accessing tracks
Accessing track groups
Managing tracks
mutableTrack(compatibleWith:)addMutableTrack(withMediaType:copySettingsFrom:options:)addMutableTracksCopyingSettings(from:options:)removeTrack(_:)
Managing time ranges
insertEmptyTimeRange(_:)insertTimeRange(_:of:at:copySampleData:)scale(_:toDuration:)removeTimeRange(_:)
Accessing duration and timing
Accessing metadata
Determining suitability
isPlayableisReadableisExportableisComposableisCompatibleWithAirPlayVideoisCompatibleWithSavedPhotosAlbum
Inspecting preferences
Accessing media selections
allMediaSelectionsavailableMediaCharacteristicsWithMediaSelectionOptionsmediaSelectionGroup(forMediaCharacteristic:)
Accessing chapter metadata
availableChapterLocaleschapterMetadataGroups(bestMatchingPreferredLanguages:)chapterMetadataGroups(withTitleLocale:containingItemsWithCommonKeys:)