Platforms to show: All Mac Windows Linux Cross-Platform
SDAVAssetExportSessionMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AVFoundation | MBS AVFoundation Plugin | 20.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Based on open source SDAVAssetExportSession class:
https://github.com/rs/SDAVAssetExportSession
AVAssetExportSessionMBS drop-in replacement with customizable audio & video settings.
An SDAVAssetExportSessionMBS object transcodes the contents of an AVAsset source object to create an output of the form described by a specified audio and video settings.
After you have initialized an export session with the asset that contains the source media, and the output file type (outputFileType), and various other settings you can start the export running by invoking exportAsynchronously. Because the export is performed asynchronously, this method returns immediately—you can use progress to check on the progress. Depending on the capabilities of the device, some exports may be queued when multiple exports are attempted. When this happens, the status of a queued export will indicate that it's waiting (StatusWaiting).
The exportAsynchronouslyCompleted event is called whether the export fails, completes, or is cancelled. Upon completion, the status property indicates whether the export has completed successfully. If it has failed, the value of the error property supplies additional information about the reason for the failure.
Available in OS X v10.9 and later in 64-bit.
- event exportAsynchronouslyCompleted
- 15 properties
- property asset as AVAssetMBS
- property audioMix as AVAudioMixMBS
- property audioSettings as Dictionary
- property error as NSErrorMBS
- property Handle as Integer
- property outputFile as FolderItem
- property outputFileType as String
- property outputURL as String
- property progress as Double
- property shouldOptimizeForNetworkUse as Boolean
- property Status as Integer
- property timeRange as CMTimeRangeMBS
- property videoComposition as AVVideoCompositionMBS
- property videoInputSettings as Dictionary
- property videoSettings as Dictionary
- 6 methods
- method cancelExport
- method Constructor(asset as AVAssetMBS)
- method exportAsynchronously
- method exportMT
- method metadata as AVMetadataItemMBS()
- method setMetadata(items() as AVMetadataItemMBS)
- 2 shared methods
- shared method available as Boolean
- shared method exportSessionWithAsset(asset as AVAssetMBS) as AVAssetExportSessionMBS
- 6 constants
Status Constants
Constant | Value | Description |
---|---|---|
StatusCancelled | 5 |
Indicates that the export session was cancelled. |
StatusCompleted | 3 |
Indicates that the export session completed successfully. |
StatusExporting | 2 |
Indicates that the export session is in progress. |
StatusFailed | 4 |
Indicates that the export session failed. |
StatusUnknown | 0 |
Indicates that the status is unknown. |
StatusWaiting | 1 |
Indicates that the session is waiting to export more data. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 20.3
- MBS Xojo Plugins, version 20.3pr5
Release notes
- Version 20.3
- Added SDAVAssetExportSessionMBS class.
The items on this page are in the following plugins: MBS AVFoundation Plugin.