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

# AVAssetReaderSampleReferenceOutput

An object that reads sample references from an asset track.

```
class AVAssetReaderSampleReferenceOutput
```

## 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 <doc://com.apple.documentation/documentation/CoreMedia/kCMSampleBufferAttachmentKey_SampleReferenceURL> and <doc://com.apple.documentation/documentation/CoreMedia/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`](/documentation/AVFoundation/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`](/documentation/AVFoundation/AVAssetWriter) that you configure to write files of type [`mov`](/documentation/AVFoundation/AVFileType/mov).

Because this output doesn’t return sample data, it ignores the value of the [`alwaysCopiesSampleData`](/documentation/AVFoundation/AVAssetReaderOutput/alwaysCopiesSampleData) property.

## Topics

### Creating a sample reference output

[`assetReaderSampleReferenceOutputWithTrack:`](/documentation/AVFoundation/AVAssetReaderSampleReferenceOutput/assetReaderSampleReferenceOutputWithTrack:)

Returns a new object that supplies sample references.

[`init(track:)`](/documentation/AVFoundation/AVAssetReaderSampleReferenceOutput/init(track:))

Creates an object that supplies sample references.

### Inspecting the track

[`track`](/documentation/AVFoundation/AVAssetReaderSampleReferenceOutput/track)

The track from which the output reads sample references.



---

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)