<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVComposition",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVComposition"
  },
  "title" : "AVComposition"
}
-->

# AVComposition

An object that combines and arranges media from multiple assets into a single composite asset that you can play or process.

```
class AVComposition
```

## Overview

A composition is a container for one or more tracks of media. Its tracks are instances of [`AVCompositionTrack`](/documentation/AVFoundation/AVCompositionTrack) that present media of a uniform type like audio or video. A track itself is a container for one or more segments of media, which are instances of [`AVCompositionTrackSegment`](/documentation/AVFoundation/AVCompositionTrackSegment), a type that represents a region of media in the source track.

## Topics

### Loading tracks

[`tracks`](/documentation/AVFoundation/AVPartialAsyncProperty/tracks-9eows)

The tracks that a composition contains.

[`loadTrack(withTrackID:completionHandler:)`](/documentation/AVFoundation/AVComposition/loadTrack(withTrackID:completionHandler:))

Loads a track that contains the specified identifier.

[`loadTracks(withMediaType:completionHandler:)`](/documentation/AVFoundation/AVComposition/loadTracks(withMediaType:completionHandler:))

Loads tracks that contain media of a specified type.

[`loadTracks(withMediaCharacteristic:completionHandler:)`](/documentation/AVFoundation/AVComposition/loadTracks(withMediaCharacteristic:completionHandler:))

Loads tracks that contain media of a specified characteristic.

### Accessing tracks

Prefer loading tracks asynchronously using the methods in Loading Tracks.

[`tracks`](/documentation/AVFoundation/AVComposition/tracks)

The tracks that a composition contains.

[`track(withTrackID:)`](/documentation/AVFoundation/AVComposition/track(withTrackID:))

Returns a track that contains the specified identifier.

[`tracks(withMediaType:)`](/documentation/AVFoundation/AVComposition/tracks(withMediaType:))

Returns tracks that contain media of a specified type.

[`tracks(withMediaCharacteristic:)`](/documentation/AVFoundation/AVComposition/tracks(withMediaCharacteristic:))

Returns tracks that contain media of a specified characteristic.

[`unusedTrackID()`](/documentation/AVFoundation/AVComposition/unusedTrackID())

Returns an identifier that no other tracks in the asset use.

### Accessing track groups

[`trackGroups`](/documentation/AVFoundation/AVComposition/trackGroups)

The track groups an asset contains.

### Accessing duration and timing

[`duration`](/documentation/AVFoundation/AVComposition/duration)

A time value that indicates the asset’s duration.

[`providesPreciseDurationAndTiming`](/documentation/AVFoundation/AVComposition/providesPreciseDurationAndTiming)

A Boolean value that indicates whether the asset provides precise duration and timing.

[`minimumTimeOffsetFromLive`](/documentation/AVFoundation/AVComposition/minimumTimeOffsetFromLive)

A time value that indicates how closely playback follows the latest live stream content.

### Accessing metadata

[`metadata`](/documentation/AVFoundation/AVComposition/metadata)

An array of metadata items for all metadata identifiers for which a value is available.

[`commonMetadata`](/documentation/AVFoundation/AVComposition/commonMetadata)

The metadata items an asset contains for common metadata identifiers that provide a value.

[`availableMetadataFormats`](/documentation/AVFoundation/AVComposition/availableMetadataFormats)

The metadata formats this asset contains.

[`metadata(forFormat:)`](/documentation/AVFoundation/AVComposition/metadata(forFormat:))

Returns an array of metadata items from the container with the specified format.

[`creationDate`](/documentation/AVFoundation/AVComposition/creationDate)

A metadata item that indicates the asset’s creation date.

[`lyrics`](/documentation/AVFoundation/AVComposition/lyrics)

The lyrics of the asset in a language suitable for the current locale.

### Determining suitability

[`isPlayable`](/documentation/AVFoundation/AVComposition/isPlayable)

A Boolean value that indicates whether the asset has playable content.

[`isReadable`](/documentation/AVFoundation/AVComposition/isReadable)

A Boolean value that indicates whether you can extract the asset’s media data using an asset reader.

[`isExportable`](/documentation/AVFoundation/AVComposition/isExportable)

A Boolean value that indicates whether you can export this asset using an export session.

[`isComposable`](/documentation/AVFoundation/AVComposition/isComposable)

A Boolean value that indicates whether you can use the asset as a segment of a composition track.

[`isCompatibleWithAirPlayVideo`](/documentation/AVFoundation/AVComposition/isCompatibleWithAirPlayVideo)

A Boolean value that indicates whether the asset is compatible with AirPlay Video.

[`isCompatibleWithSavedPhotosAlbum`](/documentation/AVFoundation/AVComposition/isCompatibleWithSavedPhotosAlbum)

A Boolean value that indicates whether you can write the composition to the Saved Photos album.

### Inspecting preferences

[`preferredRate`](/documentation/AVFoundation/AVComposition/preferredRate)

The asset’s rate preference for playing its media.

[`preferredVolume`](/documentation/AVFoundation/AVComposition/preferredVolume)

The asset’s volume preference for playing its audible media.

[`preferredTransform`](/documentation/AVFoundation/AVComposition/preferredTransform)

The asset’s transform preference to apply to its visual content during presentation or processing.

[`preferredMediaSelection`](/documentation/AVFoundation/AVComposition/preferredMediaSelection)

The default media selections for this asset’s media selection groups.

[`preferredDisplayCriteria`](/documentation/AVFoundation/AVComposition/preferredDisplayCriteria)

The asset’s display mode preference for optimal playback of its content.

### Accessing media selections

[`allMediaSelections`](/documentation/AVFoundation/AVComposition/allMediaSelections)

The array of available media selections for this asset.

[`availableMediaCharacteristicsWithMediaSelectionOptions`](/documentation/AVFoundation/AVComposition/availableMediaCharacteristicsWithMediaSelectionOptions)

An array of media characteristics for which a media selection option is available.

[`mediaSelectionGroup(forMediaCharacteristic:)`](/documentation/AVFoundation/AVComposition/mediaSelectionGroup(forMediaCharacteristic:))

Returns a media selection group that contains one or more options with the specified media characteristic.

### Accessing chapter metadata

[`availableChapterLocales`](/documentation/AVFoundation/AVComposition/availableChapterLocales)

The locales of the asset’s chapter metadata.

[`chapterMetadataGroups(bestMatchingPreferredLanguages:)`](/documentation/AVFoundation/AVComposition/chapterMetadataGroups(bestMatchingPreferredLanguages:))

Returns an array of chapters with a locale that best matches the list of preferred languages.

[`chapterMetadataGroups(withTitleLocale:containingItemsWithCommonKeys:)`](/documentation/AVFoundation/AVComposition/chapterMetadataGroups(withTitleLocale:containingItemsWithCommonKeys:))

Returns an array of chapters that contain the specified title locale and common keys.

### Accessing visual dimensions

[`naturalSize`](/documentation/AVFoundation/AVComposition/naturalSize)

The authored size of the visual portion of the composition.

### Accessing initialization options

[`urlAssetInitializationOptions`](/documentation/AVFoundation/AVComposition/urlAssetInitializationOptions)

The options you used to create a composition.

### Determining content protections

[`hasProtectedContent`](/documentation/AVFoundation/AVComposition/hasProtectedContent)

A Boolean value that indicates whether the asset contains protected content.

### Determining fragment support

[`canContainFragments`](/documentation/AVFoundation/AVComposition/canContainFragments)

A Boolean value that indicates whether you can extend the asset by fragments.

[`containsFragments`](/documentation/AVFoundation/AVComposition/containsFragments)

A Boolean value that indicates whether at least one movie fragment extends the asset.

[`overallDurationHint`](/documentation/AVFoundation/AVComposition/overallDurationHint)

The total duration of fragments that currently exist, or may exist in the future.



---

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)