One Logo Pool Ball
AVFoundation · IOS API REFERENCE

AVAssetWriter

class · iOS 4.1+ · SDK 27.1

class AVAssetWriter

Members (61)

init · iOS 4.1+

init

TypeScript
static initUrlFileType(outputURL: string, outputFileType: AVFileType): AVAssetWriter
Swift declaration
convenience init(url outputURL: URL, fileType outputFileType: AVFileType) throws
method · iOS 4.1+ · Deprecated in iOS 27.0

add

TypeScript
add(input: AVAssetWriterInput): void
Swift declaration
func add(_ input: AVAssetWriterInput)
method · iOS 7.0+

add

TypeScript
add78932(inputGroup: AVAssetWriterInputGroup): void
Swift declaration
func add(_ inputGroup: AVAssetWriterInputGroup)
method · iOS 4.1+

canAdd

TypeScript
canAdd(input: AVAssetWriterInput): boolean
Swift declaration
func canAdd(_ input: AVAssetWriterInput) -> Bool
method · iOS 7.0+

canAdd

TypeScript
canAdd93102(inputGroup: AVAssetWriterInputGroup): boolean
Swift declaration
func canAdd(_ inputGroup: AVAssetWriterInputGroup) -> Bool
method · iOS 4.1+

canApply

TypeScript
canApply(outputSettings: (Record<string, unknown>) | null, mediaType: AVMediaType): boolean
Swift declaration
func canApply(outputSettings: [String : Any]?, forMediaType mediaType: AVMediaType) -> Bool
method · iOS 4.1+

cancelWriting

TypeScript
cancelWriting(): void
Swift declaration
func cancelWriting()
method · iOS 4.1+

endSession

TypeScript
endSession(endTime: _CoreMedia_CMTime): void
Swift declaration
func endSession(atSourceTime endTime: CMTime)
method · iOS 6.0+

finishWriting

TypeScript
finishWriting(handler: (() => void)): void
Swift declaration
func finishWriting() async
method · iOS 14.0+

flushSegment

TypeScript
flushSegment(): void
Swift declaration
func flushSegment()
init · iOS 14.0+

init

TypeScript
static initContentType(outputContentType: _UniformTypeIdentifiers_UTType): AVAssetWriter
Swift declaration
init(contentType outputContentType: UTType)
init · iOS 4.1+

init

TypeScript
static initOutputURLFileType(outputURL: string, outputFileType: AVFileType): AVAssetWriter
Swift declaration
init(outputURL: URL, fileType outputFileType: AVFileType) throws
method · iOS 4.1+

startSession

TypeScript
startSession(startTime: _CoreMedia_CMTime): void
Swift declaration
func startSession(atSourceTime startTime: CMTime)
method · iOS 4.1+ · Deprecated in iOS 27.0

startWriting

TypeScript
startWriting(): boolean
Swift declaration
func startWriting() -> Bool
get · iOS 4.1+

availableMediaTypes

TypeScript
get availableMediaTypes(): Array<AVMediaType>
Swift declaration
var availableMediaTypes: [AVMediaType] { get }
get · iOS 14.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any AVAssetWriterDelegate)? { get set }
set · iOS 14.0+

delegate

TypeScript
set delegate(value: (Implements<AVAssetWriterDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any AVAssetWriterDelegate)? { get set }
get · iOS 8.0+

directoryForTemporaryFiles

TypeScript
get directoryForTemporaryFiles(): (string) | null
Swift declaration
var directoryForTemporaryFiles: URL? { get set }
set · iOS 8.0+

directoryForTemporaryFiles

TypeScript
set directoryForTemporaryFiles(value: (string) | null)
Swift declaration
var directoryForTemporaryFiles: URL? { get set }
get · iOS 4.1+

error

TypeScript
get error(): (NativeError) | null
Swift declaration
var error: (any Error)? { get }
get · iOS 17.0+

initialMovieFragmentInterval

TypeScript
get initialMovieFragmentInterval(): _CoreMedia_CMTime
Swift declaration
var initialMovieFragmentInterval: CMTime { get set }
set · iOS 17.0+

initialMovieFragmentInterval

TypeScript
set initialMovieFragmentInterval(value: _CoreMedia_CMTime)
Swift declaration
var initialMovieFragmentInterval: CMTime { get set }
get · iOS 14.0+

initialMovieFragmentSequenceNumber

TypeScript
get initialMovieFragmentSequenceNumber(): number
Swift declaration
var initialMovieFragmentSequenceNumber: Int { get set }
set · iOS 14.0+

initialMovieFragmentSequenceNumber

TypeScript
set initialMovieFragmentSequenceNumber(value: number)
Swift declaration
var initialMovieFragmentSequenceNumber: Int { get set }
get · iOS 14.0+

initialSegmentStartTime

TypeScript
get initialSegmentStartTime(): _CoreMedia_CMTime
Swift declaration
var initialSegmentStartTime: CMTime { get set }
set · iOS 14.0+

initialSegmentStartTime

TypeScript
set initialSegmentStartTime(value: _CoreMedia_CMTime)
Swift declaration
var initialSegmentStartTime: CMTime { get set }
get · iOS 7.0+

inputGroups

TypeScript
get inputGroups(): Array<AVAssetWriterInputGroup>
Swift declaration
var inputGroups: [AVAssetWriterInputGroup] { get }
get · iOS 4.1+

inputs

TypeScript
get inputs(): Array<AVAssetWriterInput>
Swift declaration
var inputs: [AVAssetWriterInput] { get }
get · iOS 4.1+

metadata

TypeScript
get metadata(): Array<AVMetadataItem>
Swift declaration
var metadata: [AVMetadataItem] { get set }
set · iOS 4.1+

metadata

TypeScript
set metadata(value: Array<AVMetadataItem>)
Swift declaration
var metadata: [AVMetadataItem] { get set }
get · iOS 4.1+

movieFragmentInterval

TypeScript
get movieFragmentInterval(): _CoreMedia_CMTime
Swift declaration
var movieFragmentInterval: CMTime { get set }
set · iOS 4.1+

movieFragmentInterval

TypeScript
set movieFragmentInterval(value: _CoreMedia_CMTime)
Swift declaration
var movieFragmentInterval: CMTime { get set }
get · iOS 4.3+

movieTimeScale

TypeScript
get movieTimeScale(): number
Swift declaration
var movieTimeScale: CMTimeScale { get set }
set · iOS 4.3+

movieTimeScale

TypeScript
set movieTimeScale(value: number)
Swift declaration
var movieTimeScale: CMTimeScale { get set }
get · iOS 4.1+

outputFileType

TypeScript
get outputFileType(): AVFileType
Swift declaration
var outputFileType: AVFileType { get }
get · iOS 14.0+

outputFileTypeProfile

TypeScript
get outputFileTypeProfile(): (AVFileTypeProfile) | null
Swift declaration
var outputFileTypeProfile: AVFileTypeProfile? { get set }
set · iOS 14.0+

outputFileTypeProfile

TypeScript
set outputFileTypeProfile(value: (AVFileTypeProfile) | null)
Swift declaration
var outputFileTypeProfile: AVFileTypeProfile? { get set }
get · iOS 4.1+

outputURL

TypeScript
get outputURL(): string
Swift declaration
var outputURL: URL { get }
get · iOS 4.1+

overallDurationHint

TypeScript
get overallDurationHint(): _CoreMedia_CMTime
Swift declaration
var overallDurationHint: CMTime { get set }
set · iOS 4.1+

overallDurationHint

TypeScript
set overallDurationHint(value: _CoreMedia_CMTime)
Swift declaration
var overallDurationHint: CMTime { get set }
get · iOS 14.0+

preferredOutputSegmentInterval

TypeScript
get preferredOutputSegmentInterval(): _CoreMedia_CMTime
Swift declaration
var preferredOutputSegmentInterval: CMTime { get set }
set · iOS 14.0+

preferredOutputSegmentInterval

TypeScript
set preferredOutputSegmentInterval(value: _CoreMedia_CMTime)
Swift declaration
var preferredOutputSegmentInterval: CMTime { get set }
get · iOS 27.0+

isProVideoStorageSupported

TypeScript
get isProVideoStorageSupported(): boolean
Swift declaration
var isProVideoStorageSupported: Bool { get }
get · iOS 14.0+

producesCombinableFragments

TypeScript
get producesCombinableFragments(): boolean
Swift declaration
var producesCombinableFragments: Bool { get set }
set · iOS 14.0+

producesCombinableFragments

TypeScript
set producesCombinableFragments(value: boolean)
Swift declaration
var producesCombinableFragments: Bool { get set }
get · iOS 4.1+

shouldOptimizeForNetworkUse

TypeScript
get shouldOptimizeForNetworkUse(): boolean
Swift declaration
var shouldOptimizeForNetworkUse: Bool { get set }
set · iOS 4.1+

shouldOptimizeForNetworkUse

TypeScript
set shouldOptimizeForNetworkUse(value: boolean)
Swift declaration
var shouldOptimizeForNetworkUse: Bool { get set }
get · iOS 4.1+

status

TypeScript
get status(): AVAssetWriter_Status
Swift declaration
var status: AVAssetWriter.Status { get }
get · iOS 27.0+

usesProVideoStorage

TypeScript
get usesProVideoStorage(): boolean
Swift declaration
var usesProVideoStorage: Bool { get set }
set · iOS 27.0+

usesProVideoStorage

TypeScript
set usesProVideoStorage(value: boolean)
Swift declaration
var usesProVideoStorage: Bool { get set }
method · iOS 26.0+

inputReceiver

TypeScript
inputReceiver(input: AVAssetWriterInput): AVAssetWriterInput_SampleBufferReceiver
Swift declaration
func inputReceiver(for input: AVAssetWriterInput) -> sending AVAssetWriterInput.SampleBufferReceiver

Attaches the input to the writer and returns an input receiver for writing sample buffers. - Parameter input: The input to be attached to the writer. - Returns: A writer input receiver with an interface for writing sample buffers.

method · iOS 26.0+

inputCaptionReceiver

TypeScript
inputCaptionReceiver(input: AVAssetWriterInput): AVAssetWriterInput_CaptionReceiver
Swift declaration
func inputCaptionReceiver(for input: AVAssetWriterInput) -> sending AVAssetWriterInput.CaptionReceiver

Attaches the input to the writer and returns an input receiver for writing caption data. - Parameter input: The input to be attached to the writer. - Returns: A writer input receiver with an interface for writing caption data.

method · iOS 26.0+

inputMetadataReceiver

TypeScript
inputMetadataReceiver(input: AVAssetWriterInput): AVAssetWriterInput_MetadataReceiver
Swift declaration
func inputMetadataReceiver(for input: AVAssetWriterInput) -> sending AVAssetWriterInput.MetadataReceiver

Attaches the input to the writer and returns an input receiver for writing timed metadata group. - Parameter input: The input to be attached to the writer. - Returns: A writer input receiver with an interface for writing timed metadata group.

method · iOS 26.0+

inputPixelBufferReceiver

TypeScript
inputPixelBufferReceiver(input: AVAssetWriterInput, attributes?: (_CoreVideo_CVPixelBufferCreationAttributes) | null): AVAssetWriterInput_PixelBufferReceiver
Swift declaration
func inputPixelBufferReceiver(for input: AVAssetWriterInput, pixelBufferAttributes attributes: CVPixelBufferCreationAttributes?) -> sending AVAssetWriterInput.PixelBufferReceiver

Attaches the input to the writer and returns an input receiver for writing pixel buffers. - Parameter input: The input to be attached to the writer. - Parameter attributes: The attributes of pixel buffers that will be vended by the input provider's pixel buffer pool. - Returns: A writer input receiver with an interface for writing pixel buffers.

method · iOS 26.0+

inputReceiverRequestingMultiPass

TypeScript
inputReceiverRequestingMultiPass(input: AVAssetWriterInput): [AVAssetWriterInput_SampleBufferReceiver, AVAssetWriterInput_MultiPassController]
Swift declaration
func inputReceiverRequestingMultiPass(for input: AVAssetWriterInput) -> sending (AVAssetWriterInput.SampleBufferReceiver, AVAssetWriterInput.MultiPassController)

Attaches the input to the writer and returns a tuple with an input receiver for writing sample buffers, and an associated multi pass controller. - Parameter input: The input to be attached to the writer. - Returns: A tuple with an input receiver for writing sample buffers, and an associated multi pass controller.

method · iOS 26.0+

inputTaggedPixelBufferGroupReceiver

TypeScript
inputTaggedPixelBufferGroupReceiver(input: AVAssetWriterInput, attributes?: (_CoreVideo_CVPixelBufferCreationAttributes) | null): AVAssetWriterInput_TaggedPixelBufferGroupReceiver
Swift declaration
func inputTaggedPixelBufferGroupReceiver(for input: AVAssetWriterInput, pixelBufferAttributes attributes: CVPixelBufferCreationAttributes?) -> sending AVAssetWriterInput.TaggedPixelBufferGroupReceiver

Attaches the input to the writer and returns an input receiver for writing tagged pixel buffers. - Parameter input: The input to be attached to the writer. - Parameter attributes: The attributes of pixel buffers that will be vended by the input provider's pixel buffer pool. - Returns: A writer input receiver with an interface for writing pixel buffers.

method · iOS 26.0+

inputCaptionReceiverRequestingMultiPass

TypeScript
inputCaptionReceiverRequestingMultiPass(input: AVAssetWriterInput): [AVAssetWriterInput_CaptionReceiver, AVAssetWriterInput_MultiPassController]
Swift declaration
func inputCaptionReceiverRequestingMultiPass(for input: AVAssetWriterInput) -> sending (AVAssetWriterInput.CaptionReceiver, AVAssetWriterInput.MultiPassController)

Attaches the input to the writer and returns a tuple with an input receiver for writing caption data, and an associated multi pass controller. - Parameter input: The input to be attached to the writer. - Returns: A tuple with an input receiver for writing caption data, and an associated multi pass controller.

method · iOS 26.0+

inputMetadataReceiverRequestingMultiPass

TypeScript
inputMetadataReceiverRequestingMultiPass(input: AVAssetWriterInput): [AVAssetWriterInput_MetadataReceiver, AVAssetWriterInput_MultiPassController]
Swift declaration
func inputMetadataReceiverRequestingMultiPass(for input: AVAssetWriterInput) -> sending (AVAssetWriterInput.MetadataReceiver, AVAssetWriterInput.MultiPassController)

Attaches the input to the writer and returns a tuple with an input receiver for writing timed metadata group, and an associated multi pass controller. - Parameter input: The input to be attached to the writer. - Returns: A tuple with an input receiver for writing timed metadata group, and an associated multi pass controller.

method · iOS 26.0+

inputPixelBufferReceiverRequestingMultiPass

TypeScript
inputPixelBufferReceiverRequestingMultiPass(input: AVAssetWriterInput, attributes?: (_CoreVideo_CVPixelBufferCreationAttributes) | null): [AVAssetWriterInput_PixelBufferReceiver, AVAssetWriterInput_MultiPassController]
Swift declaration
func inputPixelBufferReceiverRequestingMultiPass(for input: AVAssetWriterInput, pixelBufferAttributes attributes: CVPixelBufferCreationAttributes?) -> sending (AVAssetWriterInput.PixelBufferReceiver, AVAssetWriterInput.MultiPassController)

Attaches the input to the writer and returns a tuple with an input receiver for writing pixel buffers, and an associated multi pass controller. - Parameter input: The input to be attached to the writer. - Parameter attributes: The attributes of pixel buffers that will be vended by the input provider's pixel buffer pool. - Returns: A tuple with an input receiver for writing pixel buffers, and an associated multi pass controller.

method · iOS 26.0+

inputTaggedPixelBufferGroupReceiverRequestingMultiPass

TypeScript
inputTaggedPixelBufferGroupReceiverRequestingMultiPass(input: AVAssetWriterInput, attributes?: (_CoreVideo_CVPixelBufferCreationAttributes) | null): [AVAssetWriterInput_TaggedPixelBufferGroupReceiver, AVAssetWriterInput_MultiPassController]
Swift declaration
func inputTaggedPixelBufferGroupReceiverRequestingMultiPass(for input: AVAssetWriterInput, pixelBufferAttributes attributes: CVPixelBufferCreationAttributes?) -> sending (AVAssetWriterInput.TaggedPixelBufferGroupReceiver, AVAssetWriterInput.MultiPassController)

Attaches the input to the writer and returns a tuple with an input receiver for writing tagged pixel buffers, and an associated multi pass controller. - Parameter input: The input to be attached to the writer. - Parameter attributes: The attributes of pixel buffers that will be vended by the input provider's pixel buffer pool. - Returns: A tuple with an input receiver for writing pixel buffers, and an associated multi pass controller.

method · iOS 26.0+

start

TypeScript
start(): void
Swift declaration
func start() throws

Prepares the writer to write media data to its output file. - Throws: An error if reading fails to start.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AVAssetWriter.init()

inherited init: cannot prove legal (class declares 5 custom initializers)

All AVFoundation types →