AVCaptureVideoDataOutput
A capture output that records video and provides access to video frames for processing.
Declaration
class AVCaptureVideoDataOutputMentioned in
Overview
Use this output to process compressed or uncompressed frames from the captured video. You can access the frames with the captureOutput(_:didOutput:from:) delegate method.
This object supports compressed video data output for macOS only. It can output pixel buffers in several pixel formats. Consider the usability and performance characteristics of these formats and choose the best format for your app.
Topics
Configuring video capture
videoSettingsVideo settingsalwaysDiscardsLateVideoFramesautomaticallyConfiguresOutputBufferDimensionsdeliversPreviewSizedOutputBufferspreparesCellularRadioForNetworkConnectionpreservesDynamicHDRMetadatarecommendedMediaTimeScaleForAssetWriterrecommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:)recommendedVideoSettingsForAssetWriter(writingTo:)
Retrieving supported video types
availableVideoPixelFormatTypesavailableVideoCodecTypesavailableVideoCodecTypesForAssetWriter(writingTo:)AVVideoCodecType
Receiving captured video data
setSampleBufferDelegate(_:queue:)sampleBufferDelegatesampleBufferCallbackQueueAVCaptureVideoDataOutputSampleBufferDelegate