---
title: "init(frameAnalysisSpacing:completionHandler:)"
framework: vision
role: symbol
role_heading: Initializer
path: "vision/vnstatefulrequest/init(frameanalysisspacing:completionhandler:)"
---

# init(frameAnalysisSpacing:completionHandler:)

Initializes a video-based request.

## Declaration

```swift
init(frameAnalysisSpacing: CMTime, completionHandler: VNRequestCompletionHandler? = nil)
```

## Parameters

- `frameAnalysisSpacing`: A doc://com.apple.documentation/documentation/CoreMedia/CMTime value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to doc://com.apple.documentation/documentation/CoreMedia/CMTime/zero to analyze all frames.
- `completionHandler`: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
