Class

AVAssetReaderVideoCompositionOutput

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

Declaration

class AVAssetReaderVideoCompositionOutput : AVAssetReaderOutput

Overview

AVAssetReaderVideoCompositionOutput is a subclass of AVAssetReaderOutput. Composit the video frames together from the frames in one or more tracks of an AVAssetReader object's asset.

You can read the composited video frames from one or more asset tracks by adding an instance of AVAssetReaderVideoCompositionOutput to an AVAssetReader object with the add(_:) method.

AVAssetReaderVideoCompositionOutput can only produce uncompressed output.  This means that the videoSettings dictionary must follow the rules for uncompressed video output.  In addition, the following keys are not supported: AVVideoCleanApertureKey, AVVideoPixelAspectRatioKey, AVVideoScalingModeKey, and AVVideoColorPropertiesKey.

Topics

Creating a Video Composition Output

init(videoTracks: [AVAssetTrack], videoSettings: [String : Any]?)

Creates an instance of a video composition output for reading composited video from the specified video tracks, using optional video settings.

Setting Video Properties

var videoComposition: AVVideoComposition?

The video composition to use for the output.

var customVideoCompositor: AVVideoCompositing?

Returns the custom video compositor instance used by the receiver, if any.

var videoSettings: [String : Any]?

The video settings used by the output.

var videoTracks: [AVAssetTrack]

The tracks from which the output reads composited video.

Relationships

Inherits From

Conforms To

See Also

File Import

class 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.

class AVAssetReaderAudioMixOutput

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

class AVAssetReaderTrackOutput

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

class AVAssetReaderSampleReferenceOutput

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

class 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.

class AVAssetReaderOutputMetadataAdaptor

An object that defines an interface for reading metadata.

class AVAssetImageGenerator

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