<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureVideoDataOutput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureVideoDataOutput"
  },
  "title" : "AVCaptureVideoDataOutput"
}
-->

# AVCaptureVideoDataOutput

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

```
class AVCaptureVideoDataOutput
```

## Overview

Use this output to process compressed or uncompressed frames from the captured video. You can access the frames with the [`captureOutput(_:didOutput:from:)`](/documentation/AVFoundation/AVCaptureVideoDataOutputSampleBufferDelegate/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.

> Important:
> Avoid defaulting to a BGRA format, because BGRA formats aren’t native and require conversion. Additionally, BGRA formats requires significantly more memory than many of the native formats. For more information, see <doc://com.apple.documentation/documentation/Technotes/tn3121-selecting-a-pixel-format-for-an-avcapturevideodataoutput>.

## Topics

### Configuring video capture

[`videoSettings`](/documentation/AVFoundation/AVCaptureVideoDataOutput/videoSettings)

A dictionary that contains the compression settings for the output.

[Video settings](/documentation/AVFoundation/video-settings)

Configure video processing settings using standard key and value constants.

[`alwaysDiscardsLateVideoFrames`](/documentation/AVFoundation/AVCaptureVideoDataOutput/alwaysDiscardsLateVideoFrames)

Indicates whether to drop video frames if they arrive late.

[`automaticallyConfiguresOutputBufferDimensions`](/documentation/AVFoundation/AVCaptureVideoDataOutput/automaticallyConfiguresOutputBufferDimensions)

A Boolean value that indicates whether the output automatically configures the size of output buffers.

[`deliversPreviewSizedOutputBuffers`](/documentation/AVFoundation/AVCaptureVideoDataOutput/deliversPreviewSizedOutputBuffers)

A Boolean value that indicates whether the output is configured to deliver preview-sized buffers.

[`minFrameDuration`](/documentation/AVFoundation/AVCaptureVideoDataOutput/minFrameDuration)

The minimum frame duration.

[`preparesCellularRadioForNetworkConnection`](/documentation/AVFoundation/AVCaptureVideoDataOutput/preparesCellularRadioForNetworkConnection)

Indicates whether the receiver should prepare the cellular radio for imminent network activity.

[`preservesDynamicHDRMetadata`](/documentation/AVFoundation/AVCaptureVideoDataOutput/preservesDynamicHDRMetadata)

Indicates whether the receiver should preserve dynamic HDR metadata as an attachment on the output sample buffer’s underlying pixel buffer.

[`recommendedMediaTimeScaleForAssetWriter`](/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedMediaTimeScaleForAssetWriter)

Indicates the recommended media timescale for the video track.

[`recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedMovieMetadata(forVideoCodecType:assetWriterOutputFileType:))

Recommends movie-level metadata for a particular video codec type and output file type, to be used with an asset writer input.

[`recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:))

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

[`recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedVideoSettings(forVideoCodecType:assetWriterOutputFileType:outputFileURL:))

Returns a dictionary of recommended output settings for writing the specified code, file type, and output URL.

[`recommendedVideoSettingsForAssetWriter(writingTo:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/recommendedVideoSettingsForAssetWriter(writingTo:))

Specifies the recommended settings for use with an AVAssetWriterInput.

### Retrieving supported video types

[`availableVideoPixelFormatTypes`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoPixelFormatTypes)

The video pixel formats the output supports.

[`availableVideoCVPixelFormatTypes`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoCVPixelFormatTypes)

The video pixel formats the output supports.

[`availableVideoCodecTypes`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoCodecTypes)

The video codecs that the output supports.

[`availableVideoCodecTypesForAssetWriter(writingTo:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/availableVideoCodecTypesForAssetWriter(writingTo:))

The video codecs that the output supports for writing video to the output file.

[`AVVideoCodecType`](/documentation/AVFoundation/AVVideoCodecType)

A set of constants that describe the codecs the system supports for video capture.

### Receiving captured video data

[`setSampleBufferDelegate(_:queue:)`](/documentation/AVFoundation/AVCaptureVideoDataOutput/setSampleBufferDelegate(_:queue:))

Sets the sample buffer delegate and the queue for invoking callbacks.

[`sampleBufferDelegate`](/documentation/AVFoundation/AVCaptureVideoDataOutput/sampleBufferDelegate)

The capture object’s delegate.

[`sampleBufferCallbackQueue`](/documentation/AVFoundation/AVCaptureVideoDataOutput/sampleBufferCallbackQueue)

The queue on which the system invokes delegate callbacks.

[`AVCaptureVideoDataOutputSampleBufferDelegate`](/documentation/AVFoundation/AVCaptureVideoDataOutputSampleBufferDelegate)

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

### Creating video capture output

[`init()`](/documentation/AVFoundation/AVCaptureVideoDataOutput/init())

Creates a new video file output.

[`new`](/documentation/AVFoundation/AVCaptureVideoDataOutput/new)

Creates a new video file output.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)