The abstract superclass for objects that output the media recorded in a capture session.


AVCaptureOutput is an abstract base class describing an output destination of an AVCaptureSession object.

AVCaptureOutput provides an abstract interface for connecting capture output destinations, such as files and video previews, to an capture session (an instance of AVCaptureSession). A capture output can have multiple connections represented by AVCaptureConnection objects, one for each stream of media that it receives from a capture input (an instance of AVCaptureInput). A capture output does not have any connections when it is first created. When you add an output to a capture session, connections are created that map media data from that session’s inputs to its outputs.

You can add concrete AVCaptureOutput instances to an capture session using addOutput(_:).


Accessing Connections

var connections: [AVCaptureConnection]

The capture output object’s connections.

func connection(with: AVMediaType)

Returns the first connection in the connections array with an input port of a specified media type.

Converting Between Coordinate Systems

func metadataOutputRectConverted(fromOutputRect: CGRect)

Converts a rectangle in the capture output object’s coordinate system to one in the coordinate system used for metadata outputs.

func outputRectConverted(fromMetadataOutputRect: CGRect)

Converts a rectangle in the coordinate system used for metadata outputs to one in the capture output object’s coordinate system.


enum AVCaptureOutput.DataDroppedReason

Information about why capture data was not delivered.



Inherits From

Conforms To

See Also

Session Configuration

class AVCaptureInput

The abstract superclass for objects that provide input data to a capture session.

class AVCaptureConnection

A connection between a specific pair of capture input and capture output objects in a capture session.

class AVCaptureDeviceInput

A capture input that provides media from a capture device to a capture session.

class AVCaptureAudioChannel

An object that monitors average and peak power levels for an audio channel in a capture connection.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software