Skip to main content

Interface: DetectScenesOptions

Defined in: packages/agentos/src/api/detectScenes.ts:32

Options for a detectScenes call.

At minimum, a frames async iterable must be provided. All other options are optional and map to SceneDetectorConfig fields.

Properties

clipProvider?

optional clipProvider: "openai" | "local"

Defined in: packages/agentos/src/api/detectScenes.ts:74

CLIP embedding provider for semantic scene detection. Only used when methods includes 'clip'.

Default

'local'

frames

frames: AsyncIterable<Frame>

Defined in: packages/agentos/src/api/detectScenes.ts:38

Async iterable of decoded video frames in time order. Each frame must contain a raw RGB pixel buffer, a timestamp, and a sequential index.


gradualThreshold?

optional gradualThreshold: number

Defined in: packages/agentos/src/api/detectScenes.ts:60

Diff score threshold for gradual transitions (dissolves, fades). Transitions with scores between this and hardCutThreshold are classified as gradual cuts.

Default

0.15

hardCutThreshold?

optional hardCutThreshold: number

Defined in: packages/agentos/src/api/detectScenes.ts:52

Diff score threshold above which a frame transition is classified as a hard cut. Applied to histogram chi-squared distance (0-1).

Default

0.3

methods?

optional methods: SceneDetectionMethod[]

Defined in: packages/agentos/src/api/detectScenes.ts:45

Detection methods to use. Multiple methods are combined by taking the maximum diff score across all methods.

Default

['histogram', 'ssim']

minSceneDurationSec?

optional minSceneDurationSec: number

Defined in: packages/agentos/src/api/detectScenes.ts:67

Minimum scene duration in seconds. Scene boundaries that would create scenes shorter than this are suppressed.

Default

1.0