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

# AVAssetReader

An object that reads media data from an asset.

```
class AVAssetReader
```

## Overview

Use an asset reader to read media data from instances of [`AVAsset`](/documentation/AVFoundation/AVAsset). The assets you read may represent file-based media like QuickTime movies or MPEG-4 files, or media that you compose from multiple sources using [`AVComposition`](/documentation/AVFoundation/AVComposition).

## Topics

### Creating an asset reader

[`init(asset:)`](/documentation/AVFoundation/AVAssetReader/init(asset:))

Creates an object to read media data from an asset.

[`assetReaderWithAsset:error:`](/documentation/AVFoundation/AVAssetReader/assetReaderWithAsset:error:)

Returns a new object to read media data from an asset.

### Managing outputs

[`canAdd(_:)`](/documentation/AVFoundation/AVAssetReader/canAdd(_:))

Determines whether you can add the output to the asset reader.

[`add(_:)`](/documentation/AVFoundation/AVAssetReader/add(_:))

Adds an output to the reader.

[`outputs`](/documentation/AVFoundation/AVAssetReader/outputs)

The outputs from which you read media data.

### Accessing output providers

[`outputProvider(for:)`](/documentation/AVFoundation/AVAssetReader/outputProvider(for:))

Attaches the output to the reader and returns an output provider for reading sample buffers.

[`outputProviderWithRandomAccess(for:)`](/documentation/AVFoundation/AVAssetReader/outputProviderWithRandomAccess(for:))

Attaches the output to the reader and returns a tuple with an output provider for reading sample buffers, and an associated random access controller.

[`outputCaptionProvider(for:validationDelegate:)`](/documentation/AVFoundation/AVAssetReader/outputCaptionProvider(for:validationDelegate:))

Attaches the output to the reader and returns an output provider for reading caption groups.

[`outputCaptionProviderWithRandomAccess(for:validationDelegate:)`](/documentation/AVFoundation/AVAssetReader/outputCaptionProviderWithRandomAccess(for:validationDelegate:))

Attaches the output to the reader and returns a tuple with an output provider for reading caption groups, and an associated random access controller.

[`outputMetadataProvider(for:)`](/documentation/AVFoundation/AVAssetReader/outputMetadataProvider(for:))

Attaches the output to the reader and returns an output provider for reading timed metadata groups.

[`outputMetadataProviderWithRandomAccess(for:)`](/documentation/AVFoundation/AVAssetReader/outputMetadataProviderWithRandomAccess(for:))

Attaches the output to the reader and returns a tuple with an output provider for timed metadata groups buffers, and an associated random access controller.

### Configuring reading

[`timeRange`](/documentation/AVFoundation/AVAssetReader/timeRange)

The time range within the asset to read.

[`status`](/documentation/AVFoundation/AVAssetReader/status-swift.property)

The status of reading sample buffers from the asset.

[`AVAssetReader.Status`](/documentation/AVFoundation/AVAssetReader/Status-swift.enum)

Values that represent the possible states of an asset reader.

[`error`](/documentation/AVFoundation/AVAssetReader/error)

An error that describes the reason for a failure.

### Controlling reading

[`start()`](/documentation/AVFoundation/AVAssetReader/start())

Prepares the reader to read media data from the asset.

[`startReading()`](/documentation/AVFoundation/AVAssetReader/startReading())

Prepares the asset reader to start reading sample buffers from the asset.

[`cancelReading()`](/documentation/AVFoundation/AVAssetReader/cancelReading())

Cancels any background work and stops the reader’s outputs from reading more samples.

### Inspecting the asset

[`asset`](/documentation/AVFoundation/AVAssetReader/asset)

The asset from which to read media data.



---

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)