Instance Method

setOutputSettings(_:for:)

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

Declaration

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

Parameters

outputSettings

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.

connection

The connection delivering the media to be reencoded.

Discussion

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 these key and value constants.

struct AVVideoCodecType

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