Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVAssetWriterInputPixelBufferAdaptorMBS class.

AVAssetWriterInputPixelBufferAdaptorMBS.assetWriterInputPixelBufferAdaptorWithAssetWriterInput(input as AVAssetWriterInputMBS, sourcePixelBufferAttributes as dictionary) as AVAssetWriterInputPixelBufferAdaptorMBS

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 pixel buffer adaptor to receive pixel buffers for writing to the output file.

input: The asset writer input to which the receiver should append pixel buffers.
Currently, only asset writer inputs that accept media data of type AVMediaTypeVideo can be used to initialize a pixel buffer adaptor.
It is an error to pass a sample buffer input that is already attached to another instance of AVAssetWriterInputPixelBufferAdaptor.

sourcePixelBufferAttributes: The attributes of pixel buffers that will be vended by the input's CVPixelBufferPool.
Pixel buffer attributes keys for the pixel buffer pool are defined in <CoreVideo/CVPixelBuffer.h>. To take advantage of the improved efficiency of appending buffers created from the adaptor's pixel buffer pool, you should specify pixel buffer attributes that most closely accommodate the source format of the video frames being appended.
Pass nil if you do not need a pixel buffer pool for allocating buffers.

Returns a new pixel buffer adaptor to receive pixel buffers for writing to the output file.

To specify the pixel format type, the pixelBufferAttributes dictionary should contain a value for kCVPixelBufferPixelFormatTypeKey. For example, use kCVPixelFormatType_32BGRA as Integer for 8-bit-per-channel BGRA, or use kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange as Integer for 2-plane YCbCr.

Some examples using this method:

AVAssetWriterInputPixelBufferAdaptorMBS.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...