A set of media format and capture settings (such as video resolution and frame rate) that can be used to configure a capture device.


class Format : NSObject


An AVCaptureDevice.Format object provides information about a media capture format for use with an AVCaptureDevice instance, such as video frame rates and zoom factors.

You can find more information about a capture format using its associated Core Media format description (see CMFormatDescription), available using the formatDescription property. Instances of this class are immutable.


Determining Supported Media Formats

var mediaType: AVMediaType

A constant describing the media type of an AVCaptureDevice active or supported format.

var formatDescription: CMFormatDescription

An object describing the capture format.

var unsupportedCaptureOutputClasses: [AnyClass]

The list of AVCaptureOutput subclasses not allowed for capture with this format, if any.

var isVideoHDRSupported: Bool

A Boolean value that indicates whether the format supports high dynamic range streaming.

var highResolutionStillImageDimensions: CMVideoDimensions

The highest resolution still image that can be produced by this format.

Examining Focus and Exposure Attributes

var maxExposureDuration: CMTime

A CMTime indicating the maximum supported exposure duration.

var maxISO: Float

A floating point number indicating the maximum supported exposure ISO value.

var minExposureDuration: CMTime

A CMTime indicating the minimum supported exposure duration.

var minISO: Float

A floating point number indicating the minimum supported exposure ISO value.

enum AVCaptureDevice.Format.AutoFocusSystem

Constants that describe the autofocus system.

Examining Zoom Attributes

var videoFieldOfView: Float

Indicates the format’s horizontal field of view in degrees.

var videoMaxZoomFactor: CGFloat

Indicates the maximum zoom factor allowed for the format.

var videoZoomFactorUpscaleThreshold: CGFloat

Indicates the zoom factor at which pixel data is upscaled.

Examining Video Capture Attributes

class AVFrameRateRange

An AVFrameRateRange object expresses a range of valid frame rates as minimum and maximum rate and minimum and maximum duration.

var videoSupportedFrameRateRanges: [AVFrameRateRange]

Indicates the format’s supported frame rate ranges.

var isVideoBinned: Bool

Indicates whether video data is produced in a binned format.

func isVideoStabilizationModeSupported(AVCaptureVideoStabilizationMode) -> Bool

A Boolean value that indicates whether the format supports a given video stabilization mode.

enum AVCaptureVideoStabilizationMode

Constants that describe the modes of video stabilization supported by the device's format.

var isVideoStabilizationSupported: Bool

Indicates whether the device supports video stabilization.


Examining Depth Capture Attributes

var supportedDepthDataFormats: [AVCaptureDevice.Format]

The list of data formats compatible with this video format.

var activeDepthDataMinFrameDuration: CMTime

The minimum frame duration of depth data.

var videoMinZoomFactorForDepthDataDelivery: CGFloat

The minimum zoom factor supported when the device is configured for depth data delivery.

var videoMaxZoomFactorForDepthDataDelivery: CGFloat

The maximum zoom factor supported when the device is configured for depth data delivery.

var isPortraitEffectsMatteStillImageDeliverySupported: Bool

A Boolean indicating whether the device supports portrait matte effects in still-image capture.

enum AVCaptureDevice.LensStabilizationStatus

Constants that indicate the status of optical image stabilization hardware during a bracketed photo capture.

Exploring Supported Color Spaces

var supportedColorSpaces: [AVCaptureColorSpace]

The list of the device's supported color spaces.


Inherits From

Conforms To

See Also

Managing Formats

var formats: [AVCaptureDevice.Format]

The capture formats supported by the device.

var activeFormat: AVCaptureDevice.Format

The currently active media data format of the capture device.

var activeDepthDataFormat: AVCaptureDevice.Format?

The currently active depth data format of the capture device.