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

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

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

# VideoProcessor

[common]\
class [VideoProcessor](index.md)

A configuration-driven video preprocessor: temporal frame sampling over the per-frame image pipeline, to a `[sampled, H, W, C]` Float32 clip. It takes decoded frames (`[T, H, W, C]` UInt8), or a file or payload it decodes through the ffmpeg command the host provides ([Io.videoCapability](../Io/videoCapability.md)). `AutoCloseable`: [close](close.md) releases it.

## Types

| Name | Summary |
|---|---|
| [Companion](Companion/index.md) | [common]<br>object [Companion](Companion/index.md) |

## Functions

| Name | Summary |
|---|---|
| [close](close.md) | [common]<br>open fun [close](close.md)() |
| [process](process.md) | [common]<br>fun [process](process.md)(bytes: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)<br>Decode an encoded video payload and sample and preprocess its frames.<br>[common]<br>fun [process](process.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)<br>Decode a video file and sample and preprocess its frames.<br>[common]<br>fun [process](process.md)(frames: [Tensor](../Tensor/index.md), meta: [VideoMetadata](../VideoMetadata/index.md) = VideoMetadata(), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)<br>Sample and preprocess decoded frames; [meta](process.md) carries the clip's timing for fps-based sampling. |
| [processWithIndices](processWithIndices.md) | [common]<br>fun [processWithIndices](processWithIndices.md)(bytes: [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [ProcessedVideo](../ProcessedVideo/index.md)<br>The clip plus the sampling facts, from an encoded video payload.<br>[common]<br>fun [processWithIndices](processWithIndices.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [ProcessedVideo](../ProcessedVideo/index.md)<br>The clip plus which frames were sampled and when, from a video file.<br>[common]<br>fun [processWithIndices](processWithIndices.md)(frames: [Tensor](../Tensor/index.md), meta: [VideoMetadata](../VideoMetadata/index.md) = VideoMetadata(), options: [VideoProcessOptions](../VideoProcessOptions/index.md)? = null, where: [Placement](../Placement/index.md)? = null): [ProcessedVideo](../ProcessedVideo/index.md)<br>The clip plus the sampling facts, from decoded frames you already hold. |