Class

AVAssetReaderTrackOutput

An object that defines an interface for reading media data from a single track of an asset reader's asset.

Declaration

@interface AVAssetReaderTrackOutput : AVAssetReaderOutput

Overview

You can read the media data of an asset track by adding an instance of AVAssetReaderTrackOutput to an asset reader using the AVAssetReader method addOutput:. You can read the samples in the track in their stored format, or you can convert them to a different format.

The AVAssetReaderTrackOutput class can only produce 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.  AVAssetReaderTrackOutput does not support the AVSampleRateConverterAudioQualityKey key or the following Video_Settings keys: AVVideoCleanApertureKey, AVVideoPixelAspectRatioKey, AVVideoScalingModeKey, or the AVVideoColorPropertiesKey key.

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

+ assetReaderTrackOutputWithTrack:outputSettings:

Returns an asset reader that wraps a specific track, with optional output settings.

- initWithTrack:outputSettings:

Initializes an asset reader to wrap a specific track, with optional output settings.

Video Settings Dictionaries

Define output image and video formats by using the key and value constants.

Retrieving Output Properties

outputSettings

The settings used by the output.

track

The track from which the receiver reads sample buffers.

audioTimePitchAlgorithm

The processing algorithm used to manage audio pitch for scaled audio edits.

Relationships

Inherits From

See Also

File Import

AVAssetReader

A reader object used to obtain the media data of an asset, either file-based or consisting of an assemblage of media data from multiple sources.

AVAssetReaderAudioMixOutput

An object that defines an interface for reading audio samples that result from mixing the audio from one or more tracks.

AVAssetReaderSampleReferenceOutput

An object that defines an interface for reading sample references from a single asset track.

AVAssetReaderVideoCompositionOutput

An object that reads video frames composited from the frames in one or more tracks of a reader's assets.

AVAssetReaderOutput

An abstract class that defines an interface for reading a single collection of samples of a common media type from an asset reader object.

AVAssetReaderOutputMetadataAdaptor

An object that defines an interface for reading metadata.

AVAssetImageGenerator

An object that provides thumbnail or preview images of assets independently of playback.