---
title: "ClikaRT::io::FrameBatch"
sidebar_label: "FrameBatch"
description: "A decoded batch of frames plus the alignment metadata a video model needs: the packed [K, H, W, 3] UInt8 frames, the source frame indices they were taken from, and per-frame pts_seconds / duration_sec…"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/io/io.h`

A decoded batch of frames plus the alignment metadata a video model needs: the packed `[K, H, W, 3]` UInt8 frames, the source frame [`indices`](./FrameBatch.md#indices) they were taken from, and per-frame [`pts_seconds`](./FrameBatch.md#pts_seconds) / [`duration_seconds`](./FrameBatch.md#duration_seconds). Indexable / iterable: `operator[]` yields a single-frame view, and `begin()`/`end()` iterate single-frame views in order.

## Member functions

### size() {#size}

<div class="api-signature">

`std::size_t` **`size`**() `const noexcept`

</div>

Number of frames in the batch.

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 345

</div>

### empty() {#empty}

<div class="api-signature">

`bool` **`empty`**() `const noexcept`

</div>

True when the batch holds no frames.

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 347

</div>

## Data members

### frames {#frames}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`frames`**

</div>

`[K, H, W, 3]` UInt8 (host)

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 336

</div>

### indices {#indices}

<div class="api-signature">

`std::vector<std::int64_t>` **`indices`**

</div>

the source frame indices, in order

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 337

</div>

### pts\_seconds {#pts_seconds}

<div class="api-signature">

`std::vector<double>` **`pts_seconds`**

</div>

The container's presentation timestamp of each frame, in seconds: the clip's own timeline, offsets and uneven spacing included, not the frame index divided by the frame rate.

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 341

</div>

### duration\_seconds {#duration_seconds}

<div class="api-signature">

`std::vector<double>` **`duration_seconds`**

</div>

display duration of each frame

<div class="api-declared">

Declared in `ClikaRT/io/io.h`, line 342

</div>
