<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/VideoReader/AsyncFrames",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components",
      "CreateMLComponents"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents11VideoReaderV11AsyncFramesV"
  },
  "title" : "VideoReader.AsyncFrames"
}
-->

# VideoReader.AsyncFrames

An async sequence of video frames.

```
struct AsyncFrames
```

## Overview

This sequence allows iterating through the file only once.

## Topics

### Getting the properties

[`var count: Int?`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/count)

The number of frames. For this sequence count is always nil.

[`let frameSize: CGSize`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/frameSize)

The frame size.

[`let nominalFrameRate: Float`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/nominalFrameRate)

The nominal frame rate.

[`let timescale: CMTimeScale`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/timescale)

The timescale of the video track.

[`let url: URL`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/url)

The video file URL, used when throwing an error.

[`let videoDuration: CMTime`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/videoDuration)

The video duration.

### Creating an iterator

[`func makeAsyncIterator() -> VideoReader.AsyncFrames.Iterator`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/makeAsyncIterator())

Constructs an iterator.

[`struct Iterator`](/documentation/CreateMLComponents/VideoReader/AsyncFrames/Iterator)

An async iterator of video frames.

## Relationships

### Conforms To

[`TemporalSequence`](/documentation/CreateMLComponents/TemporalSequence)

[`AsyncSequence`](/documentation/Swift/AsyncSequence)

---

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)