Function analyzeVideo

  • Analyses a video and returns structured understanding results.

    Creates a VideoAnalyzer (backed by auto-detected VisionPipeline + STT when available), dispatches the analysis request, and returns a normalised AnalyzeVideoResult.

    Parameters

    Returns Promise<AnalyzeVideoResult>

    A promise resolving to the analysis result with description, scenes, objects, text, and optional RAG indexing metadata.

    Example

    const analysis = await analyzeVideo({
    videoUrl: 'https://example.com/demo.mp4',
    prompt: 'What products are shown in this video?',
    transcribeAudio: true,
    descriptionDetail: 'detailed',
    });
    console.log(analysis.description);
    for (const scene of analysis.scenes ?? []) {
    console.log(`[${scene.startSec}s] ${scene.description}`);
    }