---
title: AVAssetReaderSampleReferenceOutput
framework: avfoundation
role: symbol
role_heading: Class
path: avfoundation/avassetreadersamplereferenceoutput
---

# AVAssetReaderSampleReferenceOutput

An object that reads sample references from an asset track.

## Declaration

```swift
class AVAssetReaderSampleReferenceOutput
```

## Overview

Overview Apps can extract information about the location of samples in a track — the file URL and offset — by adding an instance of this class to an asset reader. Read the kCMSampleBufferAttachmentKey_SampleReferenceURL and kCMSampleBufferAttachmentKey_SampleReferenceByteOffset attachments on the extracted sample buffers to get the location of the sample data. You can also append sample buffers that you extract using this class to an AVAssetWriterInput instance to create movie tracks that aren’t self-contained and reference data in the original file instead. To write tracks that aren’t self-contained, use instances of AVAssetWriter that you configure to write files of type mov. Because this output doesn’t return sample data, it ignores the value of the alwaysCopiesSampleData property.

## Topics

### Creating a sample reference output

- [init(track:)](avfoundation/avassetreadersamplereferenceoutput/init(track:).md)

### Inspecting the track

- [track](avfoundation/avassetreadersamplereferenceoutput/track.md)

## Relationships

### Inherits From

- [AVAssetReaderOutput](avfoundation/avassetreaderoutput.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Media reading

- [Reading multiview 3D video files](avfoundation/reading-multiview-3d-video-files.md)
- [AVAssetReader](avfoundation/avassetreader.md)
- [AVAssetReaderOutput](avfoundation/avassetreaderoutput.md)
- [AVAssetReaderTrackOutput](avfoundation/avassetreadertrackoutput.md)
- [AVAssetReaderAudioMixOutput](avfoundation/avassetreaderaudiomixoutput.md)
- [AVAssetReaderVideoCompositionOutput](avfoundation/avassetreadervideocompositionoutput.md)
- [AVAssetReaderOutputMetadataAdaptor](avfoundation/avassetreaderoutputmetadataadaptor.md)
