<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHImageManager/requestExportSession(forVideo:options:exportPreset:resultHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHImageManager(im)requestExportSessionForVideo:options:exportPreset:resultHandler:"
  },
  "title" : "requestExportSession(forVideo:options:exportPreset:resultHandler:)"
}
-->

# requestExportSession(forVideo:options:exportPreset:resultHandler:)

Requests an export session for writing the video asset’s data to a file, to be loaded asynchronously.

```
func requestExportSession(forVideo asset: PHAsset, options: PHVideoRequestOptions?, exportPreset: String, resultHandler: @escaping (AVAssetExportSession?, [AnyHashable : Any]?) -> Void) -> PHImageRequestID
```

## Parameters

`asset`

The video asset for which an export session is to be created.

`options`

Options specifying how Photos should handle the request and notify your app of progress or errors. For details, see [`PHVideoRequestOptions`](/documentation/Photos/PHVideoRequestOptions).

`exportPreset`

The export preset name for exporting the asset. For available presets, see <doc://com.apple.documentation/documentation/AVFoundation/AVAssetExportSession>.

`resultHandler`

A block that Photos calls after loading the asset’s data and preparing the export session.

    The block takes the following parameters:

- exportSession: An <doc://com.apple.documentation/documentation/AVFoundation/AVAssetExportSession> object that you can use for writing the video asset’s data to a file.
- info: A dictionary that provides information about the status of the request. See <doc://com.apple.photokit/documentation/PhotoKit/image-result-info-keys> for possible keys and values.

## Return Value

A numeric identifier for the request. If you need to cancel the request before it completes, pass this identifier to the [`cancelImageRequest(_:)`](/documentation/Photos/PHImageManager/cancelImageRequest(_:)) method.

## Discussion

When you call this method, Photos downloads the video data (if necessary) and creates an export session. It then calls your `resultHandler` block to provide the requested video.

For additional export options, use the [`requestAVAsset(forVideo:options:resultHandler:)`](/documentation/Photos/PHImageManager/requestAVAsset(forVideo:options:resultHandler:)) method and then create <doc://com.apple.documentation/documentation/AVFoundation/AVAssetReader> and <doc://com.apple.documentation/documentation/AVFoundation/AVAssetWriter> objects to transcode and output the video asset’s data.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)