---
title: "init(assetReaderTrackOutput:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avassetreaderoutputmetadataadaptor/init(assetreadertrackoutput:)"
---

# init(assetReaderTrackOutput:)

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

## Declaration

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

## Parameters

- `trackOutput`: A track output that vends sample buffers that contain metadata.

## Discussion

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 copyNextSampleBuffer() method on the track output after you use it to initialize a timed metadata adaptor. Calling the track output’s copyNextSampleBuffer() method after this occurs results in the system throwing an exception.
