Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVAssetWriterInputMBS class.

AVAssetWriterInputMBS.assetWriterInputWithMediaType(MediaType as string, outputSettings as dictionary = nil) as AVAssetWriterInputMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new input of the specified media type to receive sample buffers for writing to the output file.

mediaType: The media type of samples that will be accepted by the input.
Media types are defined in AVMediaFormat.h.
outputSettings: The settings used for encoding the media appended to the output. Pass nil to specify that appended samples should not be re-encoded.
Audio output settings keys are defined in AVAudioSettings.h. Video output settings keys are defined in AVVideoSettings.h. Video output settings with keys from <CoreVideo/CVPixelBuffer.h> are not currently supported.

Returns a new input of the specified media type to receive sample buffers for writing to the output file.

Each new input accepts data for a new track of the asset writer's output file. You add an input to an asset writer using the AVAssetWriter method addInput:.

Passing nil for outputSettings instructs the input to pass through appended samples, doing no processing before they are written to the output file. This is useful if, for example, you are appending buffers that are already in a desirable compressed format. However, passthrough is currently supported only when writing to QuickTime Movie files (i.e. the AVAssetWriter was initialized with AVFileTypeQuickTimeMovie). For other file types, you must specify non-nil output settings.

See also:

Some examples using this method:

AVAssetWriterInputMBS.assetWriterInputWithMediaType(MediaType as string, outputSettings as dictionary, sourceFormatHint as CMFormatDescriptionMBS) as AVAssetWriterInputMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new input of the specified media type to receive sample buffers for writing to the output file.

See also:

AVAssetWriterInputMBS.available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this class is available.

Returns true on Mac OS X 10.7 and newer.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...