---
title: "analyze(with:)"
framework: vision
role: symbol
role_heading: Instance Method
path: "vision/vnvideoprocessor/analyze(with:)"
---

# analyze(with:)

Analyzes the specifed time range of the video content.

## Declaration

```swift
func analyze(with timeRange: CMTimeRange) throws
```

## Parameters

- `timeRange`: The time range to analyze. The value specified must be within the time range of the video asset.

## Discussion

Discussion The system executes this method synchronously, so you should typically call it from a separate dispatch queue. It returns when the video processor finishes analyzing the specified time range, or if an error prevented the processing.

## See Also

### Performing Requests

- [addRequest(_:processingOptions:)](vision/vnvideoprocessor/addrequest(_:processingoptions:).md)
- [VNVideoProcessor.RequestProcessingOptions](vision/vnvideoprocessor/requestprocessingoptions.md)
- [removeRequest(_:)](vision/vnvideoprocessor/removerequest(_:).md)
- [analyze(_:)](vision/vnvideoprocessor/analyze(_:).md)
- [cancel()](vision/vnvideoprocessor/cancel().md)
- [add(_:withProcessingOptions:)](vision/vnvideoprocessor/add(_:withprocessingoptions:).md)
