Class

AVCaptureVideoDataOutput

A capture output that records video and provides access to video frames for processing.

Overview

You can use a video data output to process uncompressed frames from the video being captured or to access compressed frames.

An instance of AVCaptureVideoDataOutput produces video frames you can process using other media APIs. You can access the frames with the captureOutput(_:didOutput:from:) delegate method.

Topics

Configuring Video Capture

var videoSettings: [String : Any]!

The compression settings for the output.

Video Settings Dictionaries

Key and value constants for defining output image and video formats.

var alwaysDiscardsLateVideoFrames: Bool

Indicates whether video frames are dropped if they arrive late.

func recommendedVideoSettings(forVideoCodecType: AVVideoCodecType, assetWriterOutputFileType: AVFileType)

Returns a video settings dictionary appropriate for capturing video to be recorded to a file with the specified codec and type.

Beta
func recommendedVideoSettingsForAssetWriter(writingTo: AVFileType)

Specifies the recommended settings for use with an AVAssetWriterInput.

Retrieving Supported Video Types

var availableVideoCodecTypes: [AVVideoCodecType]

Indicates the supported video codec formats that can be specified in videoSettings.

struct AVVideoCodecType

Constants that describe video codecs for capture.

Beta

Receiving Captured Video Data

func setSampleBufferDelegate(AVCaptureVideoDataOutputSampleBufferDelegate?, queue: DispatchQueue?)

Sets the sample buffer delegate and the queue on which callbacks should be invoked.

var sampleBufferCallbackQueue: DispatchQueue?

The queue on which delegate callbacks should be invoked

protocol AVCaptureVideoDataOutputSampleBufferDelegate

Methods for receiving sample buffers from and monitoring the status of a video data output.

Initializers

init()Beta

Relationships

Inherits From

Conforms To

See Also

Video Capture

class AVCaptureMovieFileOutput

A capture output that records video and audio to a QuickTime movie file.

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