---
title: "estimateMaximumDuration(completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassetexportsession/estimatemaximumduration(completionhandler:)"
---

# estimateMaximumDuration(completionHandler:)

Starts estimating the maximum duration of the export while considering the asset, preset, and time range configuration of the export session.

## Declaration

```swift
func estimateMaximumDuration(completionHandler handler: @escaping @Sendable (CMTime, (any Error)?) -> Void)
```

```swift
var estimatedMaximumDuration: CMTime { get async throws }
```

## Parameters

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

## See Also

### Estimating duration

- [maxDuration](avfoundation/avassetexportsession/maxduration.md)
