<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetExportSession/estimateOutputFileLength(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetExportSession(im)estimateOutputFileLengthWithCompletionHandler:"
  },
  "title" : "estimateOutputFileLength(completionHandler:)"
}
-->

# estimateOutputFileLength(completionHandler:)

Starts estimating the output file length of the export while considering the asset, preset, and time range configuration of the export session.

```
func estimateOutputFileLength(completionHandler handler: @escaping @Sendable (Int64, (any Error)?) -> Void)
```

## Parameters

`handler`

A callback the system invokes when it finishes its estimation. It passes the callback the following parameters:

- `estimatedOutputFileLength`: The system’s estimation of the output file length.
- `error`: An error object if the request fails; otherwise, `nil`.

## Discussion

---

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)