//clika-runtime/io.clika.runtime/VideoProcessor
VideoProcessor
[common]
class VideoProcessor
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). AutoCloseable: close releases it.
Types
| Name | Summary |
|---|---|
| Companion | [common] object Companion |
Functions
| Name | Summary |
|---|---|
| close | [common] open fun close() |
| process | [common] fun process(bytes: ByteArray, options: VideoProcessOptions? = null, where: Placement? = null): Tensor Decode an encoded video payload and sample and preprocess its frames. [common] fun process(path: String, options: VideoProcessOptions? = null, where: Placement? = null): Tensor Decode a video file and sample and preprocess its frames. [common] fun process(frames: Tensor, meta: VideoMetadata = VideoMetadata(), options: VideoProcessOptions? = null, where: Placement? = null): Tensor Sample and preprocess decoded frames; meta carries the clip's timing for fps-based sampling. |
| processWithIndices | [common] fun processWithIndices(bytes: ByteArray, options: VideoProcessOptions? = null, where: Placement? = null): ProcessedVideo The clip plus the sampling facts, from an encoded video payload. [common] fun processWithIndices(path: String, options: VideoProcessOptions? = null, where: Placement? = null): ProcessedVideo The clip plus which frames were sampled and when, from a video file. [common] fun processWithIndices(frames: Tensor, meta: VideoMetadata = VideoMetadata(), options: VideoProcessOptions? = null, where: Placement? = null): ProcessedVideo The clip plus the sampling facts, from decoded frames you already hold. |