<!--
{
  "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/AVAssetReaderTrackOutput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetReaderTrackOutput"
  },
  "title" : "AVAssetReaderTrackOutput"
}
-->

# AVAssetReaderTrackOutput

An object that reads media data from a single track of an asset.

```
class AVAssetReaderTrackOutput
```

## Overview

Read the media data of an asset track by adding a track output to an asset reader. You can read the media samples in their stored format, or you can convert them to an alternative format.

A track output produces uncompressed output. For audio output settings, this means that <doc://com.apple.documentation/documentation/AVFAudio/AVFormatIDKey> must be <doc://com.apple.documentation/documentation/CoreAudioTypes/kAudioFormatLinearPCM>. For video output settings, this means that the dictionary must contain values for uncompressed video output, as defined in `Video Settings`. A track output doesn’t support the <doc://com.apple.documentation/documentation/AVFAudio/AVSampleRateConverterAudioQualityKey> audio setting key or the following video settings keys: [`AVVideoCleanApertureKey`](/documentation/AVFoundation/AVVideoCleanApertureKey), [`AVVideoPixelAspectRatioKey`](/documentation/AVFoundation/AVVideoPixelAspectRatioKey), and [`AVVideoScalingModeKey`](/documentation/AVFoundation/AVVideoScalingModeKey).

When constructing video output settings, the choice of pixel format affects the performance and quality of the decompression. For optimal performance when decompressing video, the requested pixel format should be one that the decoder supports natively to avoid unnecessary conversions. Below are some recommendations:

- For H.264, use <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange> or <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_420YpCbCr8BiPlanarFullRange> when you know the video is full range.
- In iOS, use <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_420YpCbCr8BiPlanarFullRange> for JPEG output.
- In macOS, <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_422YpCbCr8> is the preferred pixel format for video and generally provides the best performance when decoding. If you need to work in the RGB domain, use <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32BGRA> in iOS, and <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32ARGB> in macOS.
- ProRes-encoded media can contain up to 12 bits per channel. For ProRes-encoded sources that you wish to preserve more than 8 bits per channel during decompression, use one of the following pixel formats: <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_4444AYpCbCr16>, <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_422YpCbCr16>, <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_422YpCbCr10>, or <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_64ARGB>. [`AVAssetReader`](/documentation/AVFoundation/AVAssetReader) doesn’t support scaling with any of these high-bit-depth pixel formats. If you use the above pixel formats, don’t specify <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferWidthKey> or <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferHeightKey> in the [`outputSettings`](/documentation/AVFoundation/AVAssetReaderTrackOutput/outputSettings) dictionary. Only ProRes encoders support these pixel formats.
- ProRes 4444-encoded media can contain a mathematically lossless alpha channel. To preserve the alpha channel during decompression, use a pixel format with an alpha component such as <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_4444AYpCbCr16> or <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_64ARGB>. To test whether your source contains an alpha channel, check that the track’s format description has a <doc://com.apple.documentation/documentation/CoreMedia/kCMFormatDescriptionExtension_Depth> key with a value of `32`.

## Topics

### Creating a track output

[`assetReaderTrackOutputWithTrack:outputSettings:`](/documentation/AVFoundation/AVAssetReaderTrackOutput/assetReaderTrackOutputWithTrack:outputSettings:)

Returns a new object that reads media data from an asset track.

[`init(track:outputSettings:)`](/documentation/AVFoundation/AVAssetReaderTrackOutput/init(track:outputSettings:))

Creates an object that reads media data from an asset track.

[Video settings](/documentation/AVFoundation/video-settings)

Configure video processing settings using standard key and value constants.

### Configuring audio settings

[`audioTimePitchAlgorithm`](/documentation/AVFoundation/AVAssetReaderTrackOutput/audioTimePitchAlgorithm)

The processing algorithm to use for scaled audio edits.

### Inspecting an output

[`outputSettings`](/documentation/AVFoundation/AVAssetReaderTrackOutput/outputSettings)

The output settings for this track output.

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

The track from which the output reads sample buffers.



---

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)