Platforms to show: All Mac Windows Linux Cross-Platform
AVAssetExportSessionMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
An AVAssetExportSession object transcodes the contents of an AVAsset source object to create an output of the form described by a specified export preset.
Prior to initializing an instance of AVAssetExportSession, you can use allExportPresets to get the complete list of presets available. Use exportPresetsCompatibleWithAsset to get a list of presets that are compatible with a specific asset.
After you have initialized an export session with the asset that contains the source media, the export preset name (presetName), and the output file type (outputFileType), 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 (AVAssetExportSessionStatusWaiting).
The exportAsynchronouslyCompleted event on AVFoundationMBS 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.7 and later.
- 20 properties
- property asset as AVAssetMBS
- property audioMix as AVAudioMixMBS
- property audioTimePitchAlgorithm as String
- property canPerformMultiplePassesOverSourceMediaData as Boolean
- property customVideoCompositor as AVVideoCompositingMBS
- property directoryForTemporaryFiles as FolderItem
- property directoryForTemporaryFilesURL as String
- property error as NSErrorMBS
- property estimatedOutputFileLength as Int64
- property Handle as Integer
- property metadataItemFilter as AVMetadataItemFilterMBS
- property OutputFile as folderitem
- property outputFileType as string
- property outputURL as string
- property presetName as string
- property progress as Double
- property shouldOptimizeForNetworkUse as boolean
- property status as Integer
- property videoComposition as AVVideoCompositionMBS
- property timeRange as CMTimeRangeMBS
- 9 methods
- method cancelExport
- method Constructor(asset as AVAssetMBS, presetName as string)
- method determineCompatibleFileTypes(tag as Variant = nil)
- method exportAsynchronously(tag as Variant = nil)
- method exportMT
- method metadata as AVMetadataItemMBS()
- method outputFileExtension as string
- method setMetadata(items() as AVMetadataItemMBS)
- method supportedFileTypes as string()
- 26 shared methods
- shared method allExportPresets as string()
- shared method available as boolean
- shared method AVAssetExportPreset1280x720 as string
- shared method AVAssetExportPreset1920x1080 as string
- shared method AVAssetExportPreset3840x2160 as string
- shared method AVAssetExportPreset640x480 as string
- shared method AVAssetExportPreset960x540 as string
- shared method AVAssetExportPresetAppleM4A as string
- shared method AVAssetExportPresetAppleM4V1080pHD as string
- shared method AVAssetExportPresetAppleM4V480pSD as string
- shared method AVAssetExportPresetAppleM4V720pHD as string
- shared method AVAssetExportPresetAppleM4VAppleTV as string
- shared method AVAssetExportPresetAppleM4VCellular as string
- shared method AVAssetExportPresetAppleM4ViPod as string
- shared method AVAssetExportPresetAppleM4VWiFi as string
- shared method AVAssetExportPresetAppleProRes422LPCM as string
- shared method AVAssetExportPresetHEVC1920x1080 as string
- shared method AVAssetExportPresetHEVC3840x2160 as string
- shared method AVAssetExportPresetHEVCHighestQuality as string
- shared method AVAssetExportPresetHighestQuality as string
- shared method AVAssetExportPresetLowQuality as string
- shared method AVAssetExportPresetMediumQuality as string
- shared method AVAssetExportPresetPassthrough as string
- shared method determineCompatibilityOfExportPreset(presetName as string, asset as AVAssetMBS, outputFileType as string, tag as Variant = nil)
- shared method exportPresetsCompatibleWithAsset(asset as AVAssetMBS) as string()
- shared method exportSessionWithAsset(asset as AVAssetMBS, presetName as string) as AVAssetExportSessionMBS
- 6 constants
Status Constants
Constant | Value | Description |
---|---|---|
AVAssetExportSessionStatusCancelled | 5 |
Indicates that the export session was cancelled. |
AVAssetExportSessionStatusCompleted | 3 |
Indicates that the export session completed successfully. |
AVAssetExportSessionStatusExporting | 2 |
Indicates that the export session is in progress. |
AVAssetExportSessionStatusFailed | 4 |
Indicates that the export session failed. |
AVAssetExportSessionStatusUnknown | 0 |
Indicates that the status is unknown. |
AVAssetExportSessionStatusWaiting | 1 |
Indicates that the session is waiting to export more data. |
This class has no sub classes.
Some methods using this class:
- SDAVAssetExportSessionMBS.exportSessionWithAsset(asset as AVAssetMBS) as AVAssetExportSessionMBS
Some events using this class:
- AVFoundationMBS.determineCompatibleFileTypesCompleted(exportsession as AVAssetExportSessionMBS, compatibleFileTypes() as string, tag as Variant)
- AVFoundationMBS.exportAsynchronouslyCompleted(ExportSession as AVAssetExportSessionMBS, tag as Variant)
Some examples using this class:
- /AVFoundation/AVAssetExportSessionMBS test
- /AVFoundation/AVVideoWall
- /AVFoundation/Donut Video Player
- /AVFoundation/Generate Thumbnails
- /AVFoundation/Merge and Crop Videos
- /AVFoundation/Merge Audio and Video
- /AVFoundation/Simple Player
- /AVFoundation/Transcode
- /AVFoundation/Transcode batch
- /AVFoundation/Transparent Player
Blog Entries
- Multithreaded plugin functions can increase speed of Xojo application
- MBS Xojo Plugins, version 18.4pr1
- MBS Xojo Plugins, version 18.2pr5
- Automated video editing with Xojo
- MBS Xojo / Real Studio Plugins, version 15.1pr1
Release notes
- Version 18.4
- Added more presets for AVAssetExportSessionMBS class.
- Version 18.2
- Added exportMT method to AVAssetExportSessionMBS class.
The items on this page are in the following plugins: MBS AVFoundation Plugin.
AvahiTypeBrowserMBS - AVAssetImageGeneratorMBS