Platforms to show: All Mac Windows Linux Cross-Platform

AVAssetImageGeneratorMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An AVAssetImageGenerator object provides thumbnail or preview images of assets independently of playback.

AVAssetImageGenerator uses the default enabled video track(s) to generate images. Generating a single image in isolation can require the decoding of a large number of video frames with complex interdependencies. If you require a series of images, you can achieve far greater efficiency using the asynchronous method, CGImageAtTime, which employs decoding efficiencies similar to those used during playback.

You create an asset generator using initWithAsset: or assetImageGeneratorWithAsset. These methods may succeed even if the asset possesses no visual tracks at the time of initialization. You can test whether an asset has any tracks with the visual characteristic using tracksWithMediaCharacteristic (AVAsset).

The actual time of a generated image is within the range [requestedTime-requestedTimeToleranceBefore, requestedTime+requestedTimeToleranceAfter] and may differ from the requested time for efficiency.

Assets that represent mutable compositions or mutable movies may gain visual tracks after initialization of an associated image generator.

Result Constants

Constant Value Description
AVAssetImageGeneratorCancelled 2 Indicates that generation was cancelled.
AVAssetImageGeneratorFailed 1 Indicates that generation failed.
AVAssetImageGeneratorSucceeded 0 Indicates that generation succeeded.

This class has no sub classes.

Some events using this class:

Some examples using this class:

Xojo Developer Magazine


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


AVAssetExportSessionMBS   -   AVAssetMBS


The biggest plugin in space...