<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Cinematic",
  "identifier" : "/documentation/Cinematic/CNAssetInfo-2ata2/preprocessAsset(configuration:subprogress:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Cinematic"
    ],
    "preciseIdentifier" : "s:9Cinematic11CNAssetInfoC15preprocessAsset13configuration11subprogressAcA0B23PreprocessConfigurationC_10Foundation11SubprogressVSgntYaKF"
  },
  "title" : "preprocessAsset(configuration:subprogress:)"
}
-->

# preprocessAsset(configuration:subprogress:)

Preprocesses the asset by generating a disparity track, writing the result to the
URL specified in `configuration`. Required for assets whose `cinematicCapability`
is `.needsPreprocessing`; on success the returned `CNAssetInfo` will be `.renderable`.

```
func preprocessAsset(configuration: CNAssetPreprocessConfiguration, subprogress: consuming Subprogress? = nil) async throws -> CNAssetInfo
```

## Parameters

`configuration`

Destination URL and whether to embed or reference source tracks.

`subprogress`

Optional `Subprogress` for integrating into a `ProgressManager` tree.

## Return Value

A `CNAssetInfo` for the preprocessed asset at the destination URL.

## Discussion

Ensure `resourceStatus` is `.ready` before calling — download resources first if needed.

Cancellation: this method responds to Swift Task cancellation. If the calling task is
cancelled, the preprocessing stops; any partially processed destination asset is discarded.

> Throws: `CNCinematicError` on failure.

---

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)