---
title: "FrameBatch"
sidebar_label: "FrameBatch"
description: "Kotlin binding reference: FrameBatch."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[FrameBatch](index.md)

# FrameBatch

[common]\
class [FrameBatch](index.md)(val frames: [Tensor](../Tensor/index.md), val indices: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html), val ptsSeconds: [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html), val durationSeconds: [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html))

A decoded batch of frames plus the alignment facts a video model needs: [frames](frames.md) packed `[K, H, W, 3]` UInt8 on the host, the source [indices](indices.md) they were taken from, each frame's presentation time in seconds (the clip's own timeline, offsets and uneven spacing included) and its display duration. Release [frames](frames.md) when done.

## Constructors

| | |
|---|---|
| [FrameBatch](FrameBatch.md) | [common]<br>constructor(frames: [Tensor](../Tensor/index.md), indices: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html), ptsSeconds: [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html), durationSeconds: [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html)) |

## Properties

| Name | Summary |
|---|---|
| [durationSeconds](durationSeconds.md) | [common]<br>val [durationSeconds](durationSeconds.md): [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html) |
| [frames](frames.md) | [common]<br>val [frames](frames.md): [Tensor](../Tensor/index.md) |
| [indices](indices.md) | [common]<br>val [indices](indices.md): [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) |
| [isEmpty](isEmpty.md) | [common]<br>val [isEmpty](isEmpty.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)<br>True when the batch holds no frames. |
| [ptsSeconds](ptsSeconds.md) | [common]<br>val [ptsSeconds](ptsSeconds.md): [DoubleArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html) |
| [size](size.md) | [common]<br>val [size](size.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>The number of frames in the batch. |