Skip to main content

Interface: VideoAnalyzeRequestRich

Defined in: packages/agentos/src/io/media/video/types.ts:420

Rich video analysis request with scene detection, transcription, and RAG indexing support.

Extends the simpler VideoAnalyzeRequest pattern with fine-grained control over scene detection thresholds, description detail, and optional RAG indexing of analysis results.

Example​

const request: VideoAnalyzeRequestRich = {
video: 'https://example.com/demo.mp4',
sceneThreshold: 0.3,
transcribeAudio: true,
descriptionDetail: 'detailed',
onProgress: (evt) => console.log(`${evt.phase}: ${evt.progress}%`),
};

Properties​

descriptionDetail?​

optional descriptionDetail: DescriptionDetail

Defined in: packages/agentos/src/io/media/video/types.ts:454

How detailed scene descriptions should be.

Default​

'detailed'

indexForRAG?​

optional indexForRAG: boolean

Defined in: packages/agentos/src/io/media/video/types.ts:475

Whether to index scene descriptions and transcripts into the RAG vector store for later retrieval.

Default​

false

maxFrames?​

optional maxFrames: number

Defined in: packages/agentos/src/io/media/video/types.ts:461

Maximum number of frames to sample from the extracted frame set. When the extracted frame count exceeds this value, frames are evenly downsampled before scene detection and description.


maxScenes?​

optional maxScenes: number

Defined in: packages/agentos/src/io/media/video/types.ts:468

Maximum number of scenes to detect. Prevents runaway analysis on very long videos with many cuts.

Default​

100

onProgress()?​

optional onProgress: (event) => void

Defined in: packages/agentos/src/io/media/video/types.ts:482

Optional callback invoked as analysis progresses through phases. Called with a VideoAnalysisProgressEvent at each phase transition and when per-scene progress updates are available.

Parameters​

event​

VideoAnalysisProgressEvent

Returns​

void


prompt?​

optional prompt: string

Defined in: packages/agentos/src/io/media/video/types.ts:432

Optional analysis prompt or question that should guide the final answer. When omitted, the analyzer produces a general-purpose summary.


sceneThreshold?​

optional sceneThreshold: number

Defined in: packages/agentos/src/io/media/video/types.ts:440

Threshold for scene change detection (0-1). Lower values detect more scene boundaries (more sensitive); higher values only detect dramatic cuts.

Default​

0.3

transcribeAudio?​

optional transcribeAudio: boolean

Defined in: packages/agentos/src/io/media/video/types.ts:448

Whether to transcribe the audio track using Whisper. When enabled, each scene's transcript is populated and a full transcript is included in the analysis.

Default​

true

video​

video: string | Buffer

Defined in: packages/agentos/src/io/media/video/types.ts:426

Video to analyze — either a URL string or a raw Buffer. When a URL is provided, the pipeline downloads the video to a temporary file before processing.