Class

AVOutputSettingsAssistant

An object that specifies a set of parameters for configuring objects that use output settings dictionaries.

Declaration

class AVOutputSettingsAssistant : NSObject

Overview

Often you create Instances of AVOutputSettingsAssistant using a string constant representing a specific preset configuration, such as preset1280x720. After configuring the instance, its properties can be a guide for creating and configuring an AVAssetWriter object and one or more AVAssetWriterInput objects so that the resulting media file conforms to a specific criteria. The preset configuration properties can be a “base” configuration, which you can customize to suit your individual needs.

The suggested output settings improve as more information is provided about the format of the source data. For example, by setting the sourceVideoFormat property, the videoSettings property value ensures that video frames don't scale up from a smaller size.

Topics

Creating an Output Settings Assistant

init?(preset: AVOutputSettingsPreset)

Creates and initializes an output setting assistant with the given preset.

class func availableOutputSettingsPresets() -> [AVOutputSettingsPreset]

Returns the array of presets to use when creating an output settings assistant.

struct AVOutputSettingsPreset

A preset configuration used to configure writers.

Configuring Output Settings

var outputFileType: AVFileType

A UTI indicating the type of file to write.

var audioSettings: [String : Any]?

A dictionary containing the values to use when creating an asset writer input.

var sourceAudioFormat: CMAudioFormatDescription?

The format of the audio data when determining the audio settings to use.

var sourceVideoAverageFrameDuration: CMTime

A time describing the average frame duration of the video data.

var sourceVideoFormat: CMVideoFormatDescription?

A core media video format description object that defines the video format.

var videoSettings: [String : Any]?

A dictionary containing the values to use when creating an asset writer input.

var sourceVideoMinFrameDuration: CMTime

A time describing the minimum frame duration of the video data.

Relationships

Inherits From

Conforms To

See Also

File Export

Exporting Video to Alternative Formats

Convert an existing movie file to a different format.

class AVAssetExportSession

An object that transcodes the contents of an asset source object to create an output of the form described by a specified export preset.

class AVAssetWriter

An object used to write media data to a new file of a specified audiovisual container type.

class AVAssetWriterInput

A writer used to append media samples to a single track of an asset writer's output file.

let AVVideoTransferFunction_ITU_R_2100_HLG: String

The transfer function for the ITU_R BT.2100 color space.

class AVAssetWriterInputGroup

A group of tracks in a mutually exclusive relationship.

class AVAssetWriterInputMetadataAdaptor

An object that defines an interface for writing metadata packaged as timed metadata groups into a single asset writer input.

class AVAssetWriterInputPassDescription

An object that defines an interface for querying about the requirements of the current pass.

class AVAssetWriterInputPixelBufferAdaptor

A buffer used to append video samples packaged as pixel buffers to a single asset writer input.

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