<!--
{
  "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/AVAsset",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAsset"
  },
  "title" : "AVAsset"
}
-->

# AVAsset

An object that models timed audiovisual media.

```
class AVAsset
```

## Overview

An asset models file-based media like a QuickTime movie or an MP3 audio file, and also media streamed using HTTP Live Streaming (HLS). An asset is a container object for one or more instances of [`AVAssetTrack`](/documentation/AVFoundation/AVAssetTrack) that model the uniformly typed tracks of media. The most commonly used track types are audio and video, but assets may also contain supplementary tracks, like closed captions, subtitles, and timed metadata.

![A diagram of four rectangular items. The rectangle on the left represents AVAsset. A line connects it to three stacked rectangles on the right that represent AVAssetTrack (Video), AVAssetTrack (Audio), and AVAssetTrack (Subtitles) from top to bottom.](images/com.apple.avfoundation/media-3845943@2x.png)

You load the tracks for an asset by asynchronously loading its [`tracks`](/documentation/AVFoundation/AVPartialAsyncProperty/tracks-48zyw) property. In some cases, you may want to perform operations on a subset of an asset’s tracks rather than on its complete collection. For those situations, an asset provides methods to retrieve subsets of tracks according to particular criteria, such as identifier, media type, or characteristic.

## Topics

### Creating an asset

[`init(url:)`](/documentation/AVFoundation/AVAsset/init(url:)-42gl8)

Creates an asset that models the media at the specified URL.

### Loading duration and timing

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

A time value that represents the duration of the asset.

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

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

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

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

### Loading tracks

[`tracks`](/documentation/AVFoundation/AVPartialAsyncProperty/tracks-48zyw)

The tracks of media that an asset contains.

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

Loads a track that contains the specified identifier.

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

Loads tracks that contain media of a specified type.

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

Loads tracks that contain media of a specified characteristic.

[`findUnusedTrackID(completionHandler:)`](/documentation/AVFoundation/AVAsset/findUnusedTrackID(completionHandler:))

Loads an identifier that no other track in the asset uses.

### Loading track groups

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

The track groups an asset contains.

### Loading metadata

[`metadata`](/documentation/AVFoundation/AVPartialAsyncProperty/metadata-16qej)

The metadata items that an asset contains for all metadata identifiers.

[`commonMetadata`](/documentation/AVFoundation/AVPartialAsyncProperty/commonMetadata-3j3n4)

The metadata items that an asset contains for common metadata identifiers.

[`availableMetadataFormats`](/documentation/AVFoundation/AVPartialAsyncProperty/availableMetadataFormats-4yiq8)

The formats of metadata that an asset contains.

[`loadMetadata(for:completionHandler:)`](/documentation/AVFoundation/AVAsset/loadMetadata(for:completionHandler:))

Loads an array of metadata items that the asset contains for the specified format.

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

A metadata item that indicates the creation date of an asset.

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

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

### Loading suitability

Query the suitability properties to determine an asset’s support for various purposes, even if only under a specific set of conditions.

[`isPlayable`](/documentation/AVFoundation/AVPartialAsyncProperty/isPlayable-45h5v)

A Boolean value that indicates whether an asset contains playable content.

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

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

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

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

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

A Boolean value that indicates whether you can use the asset in a media composition.

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

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

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

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

### Loading asset preferences

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

The asset’s rate preference for playing its media.

[`preferredVolume`](/documentation/AVFoundation/AVPartialAsyncProperty/preferredVolume-20mb3)

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

[`preferredTransform`](/documentation/AVFoundation/AVPartialAsyncProperty/preferredTransform-80d13)

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

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

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

[`AVDisplayCriteria`](/documentation/AVFoundation/AVDisplayCriteria)

An object the system uses to guide the selection of a display mode in tvOS.

### Loading media selections

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

The available media selections for an asset.

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

The default media selections for the media selection groups of an asset.

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

The media characteristics that provide media selection options.

[`loadMediaSelectionGroup(for:completionHandler:)`](/documentation/AVFoundation/AVAsset/loadMediaSelectionGroup(for:completionHandler:))

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

### Loading chapter metadata

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

The locales of an asset’s chapter metadata.

[`loadChapterMetadataGroups(withTitleLocale:containingItemsWithCommonKeys:)`](/documentation/AVFoundation/AVAsset/loadChapterMetadataGroups(withTitleLocale:containingItemsWithCommonKeys:))

Loads chapter metadata that contains the specified title locale and common keys.

[`loadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler:`](/documentation/AVFoundation/AVAsset/loadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler:)

Loads chapter metadata that contains the specified title locale and common keys.

[`loadChapterMetadataGroups(bestMatchingPreferredLanguages:completionHandler:)`](/documentation/AVFoundation/AVAsset/loadChapterMetadataGroups(bestMatchingPreferredLanguages:completionHandler:))

Loads chapter metadata with a locale that best matches the list of preferred languages.

### Loading content protections

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

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

### Loading fragment support

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

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

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

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

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

A hint to the total duration of fragments that currently exist or may exist in the future.

### Canceling property loading

[`cancelLoading()`](/documentation/AVFoundation/AVAsset/cancelLoading())

Cancels all pending requests to asynchronously load property values.

### Retrieving reference restrictions

[`referenceRestrictions`](/documentation/AVFoundation/AVAsset/referenceRestrictions)

The restrictions that an asset places on how it resolves references to external media.

[`AVAssetReferenceRestrictions`](/documentation/AVFoundation/AVAssetReferenceRestrictions)

Restrictions to use when resolving references to external media data.

### Deprecated

[Deprecated symbols](/documentation/AVFoundation/avasset-deprecated-symbols)

Review unsupported symbols and their replacements.

### Accessing duration and timing

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

A time value that indicates the asset’s duration.

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

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

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

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

### Accessing tracks

Prefer loading tracks asynchronously using the symbols in Loading Tracks.

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

The tracks an asset contains.

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

Returns a track that contains the specified identifier.

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

Returns tracks that contain media of a specified type.

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

Returns an array of asset tracks matching the specified media characteristic.

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

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

### Accessing track groups

Prefer loading track groups asynchronously using the properties in Loading Track Groups.

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

The track groups an asset contains.

### Accessing metadata

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

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

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

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

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

The metadata formats this asset contains.

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

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

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

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

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

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

### Accessing suitability

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

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

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

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

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

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

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

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

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

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

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

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

### Accessing asset preferences

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

The asset’s rate preference for playing its media.

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

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

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

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

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

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

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

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

[`AVDisplayCriteria`](/documentation/AVFoundation/AVDisplayCriteria)

An object the system uses to guide the selection of a display mode in tvOS.

### Accessing media selections

Prefer loading media selections asynchronously using the properties and methods in Loading Media Selections.

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

The array of available media selections for this asset.

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

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

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

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

### Accessing chapter metadata

Prefer loading chapter metadata asynchronously using the symbols in Loading Chapter Metadata.

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

The locales of the asset’s chapter metadata.

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

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

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

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

### Accessing content protections

Prefer loading content protections asynchronously using the properties in Loading Content Protections.

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

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

### Accessing fragment support

Prefer determining fragment support asynchronously using the properties in Loading Fragment Support.

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

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

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

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

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

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

### Inspecting visual attributes

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

The encoded or authored size of the visual portion of the asset.



---

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)