Contents

AVAssetReaderTrackOutput

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

Declaration

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 AVFormatIDKey must be 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 AVSampleRateConverterAudioQualityKey audio setting key or the following video settings keys: AVVideoCleanApertureKey, AVVideoPixelAspectRatioKey, and 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:

Topics

Creating a track output

Configuring audio settings

Inspecting an output

See Also

Media reading