<!--
{
  "availability" : [
    "iOS: 8.0.0 - 27.0.0",
    "iPadOS: 8.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.10.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetReaderOutputMetadataAdaptor/init(assetReaderTrackOutput:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetReaderOutputMetadataAdaptor(im)initWithAssetReaderTrackOutput:"
  },
  "title" : "init(assetReaderTrackOutput:)"
}
-->

# init(assetReaderTrackOutput:)

Creates an object that reads timed metadata groups from an asset reader output.

```
init(assetReaderTrackOutput trackOutput: AVAssetReaderTrackOutput)
```

## Parameters

`trackOutput`

A track output that vends sample buffers that contain metadata.

## Discussion

You can only create an adaptor with a track output that vends metadata, and that isn’t associated with another adaptor instance. Likewise, you can only create an adaptor with a track output whose asset reader hasn’t started reading.

> Important:
> Don’t call the ``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetReaderOutput/copyNextSampleBuffer()`` method on the track output after you use it to initialize a timed metadata adaptor. Calling the track output’s ``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetReaderOutput/copyNextSampleBuffer()`` method after this occurs results in the system throwing an exception.

---

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)