Mac Developer Library

Developer

AVFoundation Framework Reference AVAssetExportSession Class Reference

Options
Deployment Target:

On This Page
Language:

AVAssetExportSession

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 exportAsynchronouslyWithCompletionHandler:. 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 completion handler you supply to exportAsynchronouslyWithCompletionHandler: 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.

Inheritance


Conforms To


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in OS X v10.7 and later.
  • outputURL outputURL Property

    The URL of the export session’s output.

    Declaration

    Swift

    @NSCopying var outputURL: NSURL!

    Objective-C

    @property(nonatomic, copy) NSURL *outputURL

    Discussion

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

    See Also

    outputFileType

  • An array containing the types of files the session can write. (read-only)

    Declaration

    Swift

    var supportedFileTypes: [AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly) NSArray *supportedFileTypes

    Discussion

    The types of files the session can write are determined by the asset and and export preset with which the session was initialized. If you need to determine the compatible file formats before initiating the export operation, use the determineCompatibleFileTypesWithCompletionHandler: method.

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • The type of file to be written by the session.

    Declaration

    Swift

    var outputFileType: String!

    Objective-C

    @property(nonatomic, copy) NSString *outputFileType

    Discussion

    The value is a UTI string corresponding to the file type to use when writing the asset. For a list of constants specifying UTIs for standard file types, see AV Foundation Constants Reference.

    You can observe this property using Key-value observing.

    Special Considerations

    You must set a value for this property.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • timeRange timeRange Property

    The time range to be exported from the source.

    Declaration

    Swift

    var timeRange: CMTimeRange

    Objective-C

    @property(nonatomic) CMTimeRange timeRange

    Discussion

    The default time range of an export session is kCMTimeZero to kCMTimePositiveInfinity, meaning that (modulo a possible limit on file length) the full duration of the asset will be exported.

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • metadata metadata Property

    The metadata to be written to the output file by the export session.

    Declaration

    Swift

    var metadata: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *metadata

    Discussion

    The metadata is an array of AVMetadataItem objects.

    If the value of this key is nil, any existing metadata in the exported asset will be translated as accurately as possible into the appropriate metadata key space for the output file and written to the output.

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Specifies a filter object to be used during export to determine which metadata items should be transferred from the source asset.

    Declaration

    Swift

    var metadataItemFilter: AVMetadataItemFilter!

    Objective-C

    @property(nonatomic, retain) AVMetadataItemFilter *metadataItemFilter

    Discussion

    If the value of this key is nil, no filter will be applied. This is the default.

    The filter will not be applied to metadata set with via the metadata property. To apply the filter to metadata before it is set on the metadata property, see AVMetadataItem.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • audioMix audioMix Property

    Indicates whether non-default audio mixing is enabled for export, and supplies the parameters for audio mixing.

    Declaration

    Swift

    @NSCopying var audioMix: AVAudioMix!

    Objective-C

    @property(nonatomic, copy) AVAudioMix *audioMix

    Discussion

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Indicates the processing algorithm used to manage audio pitch for scaled audio edits.

    Declaration

    Swift

    var audioTimePitchAlgorithm: String!

    Objective-C

    @property(nonatomic, copy) NSString *audioTimePitchAlgorithm

    Discussion

    An exception (NSInvalidArgumentException) is raised if this property is set to a value other than the constants defined in Time Pitch Algorithm Settings.

    The default value is AVAudioTimePitchAlgorithmSpectral.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that indicates whether the movie should be optimized for network use.

    Declaration

    Swift

    var shouldOptimizeForNetworkUse: Bool

    Objective-C

    @property(nonatomic) BOOL shouldOptimizeForNetworkUse

    Discussion

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Indicates whether video composition is enabled for export, and supplies the instructions for video composition.

    Declaration

    Swift

    @NSCopying var videoComposition: AVVideoComposition!

    Objective-C

    @property(nonatomic, copy) AVVideoComposition *videoComposition

    Discussion

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Indicates the custom video compositor instance used, if any. (read-only)

    Declaration

    Swift

    var customVideoCompositor: AVVideoCompositing! { get }

    Objective-C

    @property(nonatomic, readonly) id< AVVideoCompositing > customVideoCompositor

    Discussion

    The custom video compositor instance that is used during image generation is accessible via this property after the value of videoComposition is set to an AVVideoComposition instance that specifies a custom video compositor class. Any additional communication between the application and that instance of the custom video compositor, if any is required for configuration or other purposes, can only occur once that has happened.

    If the value of videoComposition is changed from an AVVideoComposition that specifies a custom video compositor class to another instance of AVVideoComposition that specifies the same custom video compositor class, the instance of the custom video compositor that was previously created will receive the renderContextChanged: message and remain in use for subsequent image generation.

    This property is nil if there is no video compositor, or if the internal video compositor is in use.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • A Boolean value that determines if the export session can perform multiple passes over the source media to achieve better results.

    Declaration

    Swift

    var canPerformMultiplePassesOverSourceMediaData: Bool

    Objective-C

    @property(nonatomic) BOOL canPerformMultiplePassesOverSourceMediaData

    Discussion

    When the value for this property is YEStrue, the export session can produce higher quality results at the expense of longer export times. Setting this property to YEStrue may also require the export session to write temporary data to disk during the export. To control the location of temporary data, use the property directoryForTemporaryFiles.

    The default value is NOfalse. Not all export session configurations can benefit from performing multiple passes over the source media. In these cases, setting this property to YEStrue has no effect.

    This property cannot be set after the export has started.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.10 and later.

  • Specifies a directory that is suitable for containing temporary files generated during the export process.

    Declaration

    Swift

    @NSCopying var directoryForTemporaryFiles: NSURL!

    Objective-C

    @property(nonatomic, copy) NSURL *directoryForTemporaryFiles

    Discussion

    An asset export session may need to write temporary files, for example when canPerformMultiplePassesOverSourceMediaData is set to YEStrue. This property specifies where in the filesystem those temporary files are created. All temporary files will be deleted when the export is completed, is canceled, or fails.

    When the value of this property is nil, the export session will choose a suitable location when writing temporary files. The default value is nil.

    This property cannot be set after the export has started. The export will fail if the URL points to a location that is not a directory, does not exist, is not on the local file system, or if a file cannot be created in this directory (for example, due to insufficient permissions or sandboxing restrictions).

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.10 and later.

  • The name of the preset with which the session was initialized. (read-only)

    Declaration

    Swift

    var presetName: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *presetName

    Discussion

    For possible values, see Export Preset Names for Device-Appropriate QuickTime Files, Export Preset Names for QuickTime Files of a Given Size, AVAssetExportSessionStatusCancelled, Export Preset Name for iTunes Audio, and Export Preset Name for Pass-Through.

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Returns all available export preset names.

    Declaration

    Swift

    class func allExportPresets() -> [AnyObject]!

    Objective-C

    + (NSArray *)allExportPresets

    Return Value

    An array containing a string constant for each of the available preset names.

    For possible values, see Export Preset Names for Device-Appropriate QuickTime Files, Export Preset Names for QuickTime Files of a Given Size, AVAssetExportSessionStatusCancelled, Export Preset Name for iTunes Audio, and Export Preset Name for Pass-Through.

    Discussion

    Not all presets are compatible with all assets.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Returns the identifiers compatible with a given asset.

    Declaration

    Swift

    class func exportPresetsCompatibleWithAsset(_ asset: AVAsset!) -> [AnyObject]!

    Objective-C

    + (NSArray *)exportPresetsCompatibleWithAsset:(AVAsset *)asset

    Parameters

    asset

    An asset that is ready to be exported.

    Return Value

    An array of NSString objects representing the identifiers compatible with asset.

    The array is a complete list of the valid identifiers that can be used with exportSessionWithAsset:presetName: with the specified asset. For possible values, see Export Preset Names for Device-Appropriate QuickTime Files, Export Preset Names for QuickTime Files of a Given Size, AVAssetExportSessionStatusCancelled, Export Preset Name for iTunes Audio, and Export Preset Name for Pass-Through.

    Discussion

    Not all export presets are compatible with all assets. For example, a video-only asset is not compatible with an audio-only preset. This method returns only the identifiers for presets that are compatible with the given asset.

    In order to ensure that the setup and running of an export operation will succeed using a given preset, you should not make significant changes to the asset (such as adding or deleting tracks) between retrieving compatible identifiers and performing the export operation.

    If the asset’s tracks are not currently loaded, they may be loaded by this method before any checks are performed.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Reports the compatibility of an export present, asset, and output file type to the specified block.

    Declaration

    Swift

    class func determineCompatibilityOfExportPreset(_ presetName: String!, withAsset asset: AVAsset!, outputFileType outputFileType: String!, completionHandler handler: ((Bool) -> Void)!)

    Objective-C

    + (void)determineCompatibilityOfExportPreset:(NSString *)presetName withAsset:(AVAsset *)asset outputFileType:(NSString *)outputFileType completionHandler:(void (^)(BOOL compatible))handler

    Parameters

    presetName

    The name of the preset template for the export operation.

    For possible values, see Export Preset Names for Device-Appropriate QuickTime Files, Export Preset Names for QuickTime Files of a Given Size, AVAssetExportSessionStatusCancelled, Export Preset Name for iTunes Audio, and Export Preset Name for Pass-Through.

    asset

    The asset object that you are planning to export.

    outputFileType

    The UTI string corresponding to the file type. For example, to specify a QuickTime movie file format, you could specify the constant AVFileTypeQuickTimeMovie. For a list of constants specifying UTIs for standard file types, see AV Foundation Constants Reference.

    handler

    The block to execute with the results. This method makes a copy of the specified block. This parameter must not be nil.

    This block takes a single Boolean parameter and returns no result. The parameter contains the value YEStrue if the combination of options is compatible or NOfalse if they are not.

    Discussion

    Because not all export presets are compatible with all assets and file types, you can use this method to query the compatibility of specific combos before using them. To ensure that the export operation succeeds, you should not make any significant changes to the asset between the time of calling this method and performing the export operation.

    This method performs its checks asynchronously on a secondary thread and returns immediately. The results are similarly reported to the specified block on a secondary thread.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • Reports the compatible file types for the current export session to the specified block.

    Declaration

    Swift

    func determineCompatibleFileTypesWithCompletionHandler(_ handler: (([AnyObject]!) -> Void)!)

    Objective-C

    - (void)determineCompatibleFileTypesWithCompletionHandler:(void (^)(NSArray *compatibleFileTypes))handler

    Parameters

    handler

    The block to execute with the results. This method makes a copy of the specified block. This parameter must not be nil.

    This block takes an array parameter and returns no result. The array contains zero or more NSString objects with the UTIs of the compatible file types. The file types are in no particular order. For a list of constants specifying UTIs for standard file types, see AV Foundation Constants Reference.

    Discussion

    This method operates on the asset object and preset information that was used to initialize the export session. It uses this information to determine the file types that the export session can write.

    This method performs its checks asynchronously on a secondary thread and returns immediately. The results are similarly reported to the specified block on a secondary thread. Because this method actually inspects the asset’s tracks, the tracks are loaded if they have not been already.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • Starts the asynchronous execution of an export session.

    Declaration

    Swift

    func exportAsynchronouslyWithCompletionHandler(_ handler: (() -> Void)!)

    Objective-C

    - (void)exportAsynchronouslyWithCompletionHandler:(void (^)(void))handler

    Parameters

    handler

    A block that is invoked when writing is complete or in the event of writing failure.

    Discussion

    This method starts an asynchronous export operation and returns immediately. status signals the terminal state of the export session, and if a failure occurs, error describes the problem.

    If internal preparation for export fails, handler is invoked synchronously. The handler may also be called asynchronously, after the method returns, in the following cases:

    1. If a failure occurs during the export, including failures of loading, re-encoding, or writing media data to the output.

    2. If cancelExport is invoked.

    3. After the export session succeeds, having completely written its output to the outputURL.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Cancels the execution of an export session.

    Declaration

    Swift

    func cancelExport()

    Objective-C

    - (void)cancelExport

    Discussion

    You can invoke this method when the export is running.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • error error Property

    Describes the error that occurred if the export status is AVAssetExportSessionStatusFailed or AVAssetExportSessionStatusCancelled. (read-only)

    Declaration

    Swift

    var error: NSError! { get }

    Objective-C

    @property(nonatomic, readonly) NSError *error

    Discussion

    If there is no error to report, the value of this property is nil.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • Indicates the estimated size in bytes of the exported file. (read-only)

    Declaration

    Swift

    var estimatedOutputFileLength: Int64 { get }

    Objective-C

    @property(nonatomic, readonly) long long estimatedOutputFileLength

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.9 and later.

  • progress progress Property

    The progress of the export on a scale from 0 to 1. (read-only)

    Declaration

    Swift

    var progress: Float { get }

    Objective-C

    @property(nonatomic, readonly) float progress

    Discussion

    A value of 0 means the export has not yet begun, 1 means the export is complete.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • status status Property

    The status of the export session. (read-only)

    Declaration

    Swift

    var status: AVAssetExportSessionStatus { get }

    Objective-C

    @property(nonatomic, readonly) AVAssetExportSessionStatus status

    Discussion

    For possible values, see AVAssetExportSessionStatus.

    You can observe this property using Key-value observing.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • asset asset Property

    The asset with which the export session was initialized. (read-only)

    Declaration

    Swift

    var asset: AVAsset! { get }

    Objective-C

    @property(nonatomic, retain, readonly) AVAsset *asset

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.8 and later.

  • Constants to indicate the status of the session.

    Declaration

    Swift

    enum AVAssetExportSessionStatus : Int { case Unknown case Waiting case Exporting case Completed case Failed case Cancelled }

    Objective-C

    enum { AVAssetExportSessionStatusUnknown, AVAssetExportSessionStatusWaiting, AVAssetExportSessionStatusExporting, AVAssetExportSessionStatusCompleted, AVAssetExportSessionStatusFailed, AVAssetExportSessionStatusCancelled }; typedef NSInteger AVAssetExportSessionStatus;

    Constants

    • Unknown

      AVAssetExportSessionStatusUnknown

      Indicates that the status is unknown.

      Available in OS X v10.7 and later.

    • Waiting

      AVAssetExportSessionStatusWaiting

      Indicates that the session is waiting to export more data.

      Available in OS X v10.7 and later.

    • Exporting

      AVAssetExportSessionStatusExporting

      Indicates that the export session is in progress.

      Available in OS X v10.7 and later.

    • Completed

      AVAssetExportSessionStatusCompleted

      Indicates that the export session completed successfully.

      Available in OS X v10.7 and later.

    • Failed

      AVAssetExportSessionStatusFailed

      Indicates that the export session failed.

      Available in OS X v10.7 and later.

    • Cancelled

      AVAssetExportSessionStatusCancelled

      Indicates that the export session was cancelled.

      Available in OS X v10.7 and later.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in OS X v10.7 and later.

  • You use these export options to produce QuickTime .mov files with a specified video size.

    Declaration

    Swift

    let AVAssetExportPreset640x480: NSString! let AVAssetExportPreset960x540: NSString! let AVAssetExportPreset1280x720: NSString! let AVAssetExportPreset1920x1080: NSString! let AVAssetExportPreset3840x2160: NSString!

    Objective-C

    NSString *const AVAssetExportPreset640x480; NSString *const AVAssetExportPreset960x540; NSString *const AVAssetExportPreset1280x720; NSString *const AVAssetExportPreset1920x1080; NSString *const AVAssetExportPreset3840x2160;

    Constants

    • AVAssetExportPreset640x480

      AVAssetExportPreset640x480

      Specifies output at 640x480 pixels.

      Available in OS X v10.7 and later.

    • AVAssetExportPreset960x540

      AVAssetExportPreset960x540

      Specifies output at 960x540 pixels.

      Available in OS X v10.7 and later.

    • AVAssetExportPreset1280x720

      AVAssetExportPreset1280x720

      Specifies output at 1280x720 pixels.

      Available in OS X v10.7 and later.

    • AVAssetExportPreset1920x1080

      AVAssetExportPreset1920x1080

      Specifies output at 1920x1080 pixels.

      Available in OS X v10.7 and later.

    • AVAssetExportPreset3840x2160

      AVAssetExportPreset3840x2160

      Specifies output at 3840x2160 pixels.

      Available in OS X v10.10 and later.

    Discussion

    The export will not scale the video up from a smaller size. Video is compressed using H.264; audio is compressed using AAC. Some devices cannot support some sizes.

  • You use this export option to produce an audio-only .m4a file with appropriate iTunes gapless playback data.

    Declaration

    Swift

    let AVAssetExportPresetAppleM4A: NSString!

    Objective-C

    NSString *const AVAssetExportPresetAppleM4A;

    Constants

    • AVAssetExportPresetAppleM4A

      AVAssetExportPresetAppleM4A

      Specifies an audio-only .m4a file with appropriate iTunes gapless playback data.

      Available in OS X v10.7 and later.

  • You use these export options to produce files that can be played on the specific Apple devices.

    Declaration

    Swift

    let AVAssetExportPresetAppleM4VCellular: NSString! let AVAssetExportPresetAppleM4ViPod: NSString! let AVAssetExportPresetAppleM4V480pSD: NSString! let AVAssetExportPresetAppleM4VAppleTV: NSString! let AVAssetExportPresetAppleM4VWiFi: NSString! let AVAssetExportPresetAppleM4V720pHD: NSString! let AVAssetExportPresetAppleM4V1080pHD: NSString! let AVAssetExportPresetAppleProRes422LPCM: NSString!

    Objective-C

    NSString *const AVAssetExportPresetAppleM4VCellular; NSString *const AVAssetExportPresetAppleM4ViPod; NSString *const AVAssetExportPresetAppleM4V480pSD; NSString *const AVAssetExportPresetAppleM4VAppleTV; NSString *const AVAssetExportPresetAppleM4VWiFi; NSString *const AVAssetExportPresetAppleM4V720pHD; NSString *const AVAssetExportPresetAppleM4V1080pHD; NSString *const AVAssetExportPresetAppleProRes422LPCM;

    Constants

    • AVAssetExportPresetAppleM4VCellular

      AVAssetExportPresetAppleM4VCellular

      Specifies a format suitable for playing on Apple devices when streamed over a cellular network.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4ViPod

      AVAssetExportPresetAppleM4ViPod

      Specifies a format suitable for playing on an iPod.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4V480pSD

      AVAssetExportPresetAppleM4V480pSD

      Specifies a 480p Standard Definition format suitable for playing on Apple devices.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4VAppleTV

      AVAssetExportPresetAppleM4VAppleTV

      Specifies a format suitable for playing on AppleTV.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4VWiFi

      AVAssetExportPresetAppleM4VWiFi

      Specifies a format suitable for playing on Apple devices when streamed over a WiFi network.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4V720pHD

      AVAssetExportPresetAppleM4V720pHD

      Specifies a 720p High Definition format suitable for playing on Apple devices.

      Available in OS X v10.7 and later.

    • AVAssetExportPresetAppleM4V1080pHD

      AVAssetExportPresetAppleM4V1080pHD

      Specifies a 1080p High Definition format suitable for playing on Apple devices.

      Available in OS X v10.8 and later.

    • AVAssetExportPresetAppleProRes422LPCM

      AVAssetExportPresetAppleProRes422LPCM

      Specifies a QuickTime movie with Apple ProRes 422 video and LPCM audio.

      Available in OS X v10.7 and later.

    Discussion

    These presets are only available on OS X.

    The file name should have the extension .m4v (or .m4a for exports with audio only sources).

  • You use this export option to let all tracks pass through.

    Declaration

    Swift

    let AVAssetExportPresetPassthrough: NSString!

    Objective-C

    NSString *const AVAssetExportPresetPassthrough;

    Constants

    • AVAssetExportPresetPassthrough

      AVAssetExportPresetPassthrough

      Specifies that all tracks pass through, unless it is not possible.

      Available in OS X v10.7 and later.

    Discussion

    This option does not show up in the allExportPresets and exportPresetsCompatibleWithAsset: methods.