Instance Method


Sets the options dictionary used to reencode media from the given connection as it's being recorded.


func setOutputSettings(_ outputSettings: [String : Any]?, for connection: AVCaptureConnection)



A dictionary of output settings. Pass an empty dictionary to specify that the format of the media from the connection shouldn't be changed before being written to the file. Pass nil to specify that the output format should be determined by the session preset.


The connection delivering the media to be reencoded.


For details on output settings, see Audio Settings and Formats for audio connections or Video Settings Dictionaries for video connections.

See Also

Managing Output Settings

func supportedOutputSettingsKeys(for: AVCaptureConnection) -> [String]

The list of supported keys for the output settings dictionary.

func outputSettings(for: AVCaptureConnection) -> [String : Any]

Returns the options used to reencode media from a given connection as it's being recorded.

var availableVideoCodecTypes: [AVVideoCodecType]

The video codec types currently supported for recording movie files.

Video Settings Dictionaries

Define output image and video formats by using the key and value constants.

struct AVVideoCodecType

A set of constants used to describe codecs for video capture.

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