---
title: "preprocessAsset(configuration:subprogress:)"
framework: Cinematic
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+]
path: "cinematic/cnassetinfo-2ata2/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.

## Declaration

```swift
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

Return Value A CNAssetInfo for the preprocessed asset at the destination URL.

## Discussion

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. note: CNCinematicError on failure.
