Skip to main content
Understanding is the first step in the retrieval pipeline.
An understanding run applies one or more analyzers to a video and creates reusable artifacts such as transcripts, object detections, OCR text, brand signals, activity/location signals, or VLM scene descriptions. You usually start with defaults, then add configuration only when you need more control.

Start simple

For most use cases, only provide analyzer types.
That is enough for a first run. VideoDB automatically chooses the output names, video chunking, frame selection, and default analyzer settings. Each analyzer type has a default artifact name: spoken_wordstranscript, object_detectionobjects, and vlmscene. That name is what you pass to get_analyzer(). Override it with name. See Analyzer type for the full list.

What should I use?

VideoDB includes built-in analyzers for common video and audio signals. Use the table below to choose an analyzer based on what you want to retrieve.
ocr, brand_detection, activity_recognition, and location_detection are VLM-backed analyzers with task-specific output shapes. Use the generic vlm analyzer when you want to provide your own prompt or schema.

The mental model

An analyzer produces one named artifact. Stored artifacts can be inspected and reused independently.

Inspect and manage runs

video.understand(...) returns an understanding run object with an id, status, and analyzer handles.
Use wait_until_complete() before fetching analyzer outputs or indexing artifacts. Run-level terminal statuses are done, failed, and partial.
You can also reopen or list previous runs for the same video:
Only delete an understanding run when you no longer need its stored artifacts.

How video.understand() is structured

video.understand() has two levels of configuration:
  1. run-level options apply to the whole understanding run
  2. analyzer options apply to one item inside analyzers

Run-level options

Run-level options belong directly on video.understand(...) and affect the whole understanding run.

segmentation: visual time ranges

segmentation controls how VideoDB splits the video into scenes, which are the timestamped ranges that visual analyzers run on and attach their outputs to. Use time for fixed-length ranges, or shot to split on the video’s own scene changes. Time-based segmentation:
Shot-based segmentation:

transform: media preparation

transform applies preprocessing to the media before analyzers run, such as resizing the frames to reduce cost. Example:

store: save outputs

Artifacts are stored by default. For ephemeral processing where you do not need to save the outputs for later reuse, set store=False; you can still read the outputs from the run itself:

Analyzer options

Each item in analyzers defines one analyzer and the artifact it should produce.

Analyzer type: choose the artifact

type chooses which analyzer runs and which artifact shape is produced.

Analyzer name: output keys

name controls the analyzer name used with get_analyzer(name) and inputs. It is optional. If you omit it, VideoDB uses the default artifact name for the analyzer type. You need name when you want to:
  1. choose a stable analyzer name for output lookup
  2. reference another analyzer through inputs
  3. run multiple analyzers of the same type
  4. create readable artifact names for downstream steps
Example with two VLM analyzers:

Analyzer inputs: reuse earlier artifacts

inputs declares which earlier artifacts a VLM analyzer can use. Reference those artifacts in the VLM prompt with {{inputs.<name>}}, where <name> is the analyzer name.
VideoDB injects compact, scene-aligned context for each referenced input. For example, {{inputs.transcript}} renders spoken text for the scene, while {{inputs.objects}} renders object labels/counts from the matching object artifact. Rules:
  • Input names must match earlier analyzer name values.
  • A placeholder such as {{inputs.transcript}} must reference an input listed in inputs.
  • If inputs are provided but the prompt has no {{inputs.*}} placeholders, VideoDB appends a compact input context block after the prompt.
  • Treat injected inputs as evidence/context; write the prompt so frames remain the primary visual source when needed.

Analyzer sampling: frame selection

Sampling is per analyzer. It mainly applies to visual and VLM-backed analyzers such as object_detection, vlm, ocr, brand_detection, activity_recognition, and location_detection. every is in seconds. {"strategy": "interval", "every": 1} samples one frame per second within each scene. frame_count is the total number of frames distributed evenly inside each scene. Use {"strategy": "uniform", "frame_count": 1} when you want one representative frame from the middle of every scene. How to choose sampling:

Analyzer config: models, prompts, and schemas

Use "default" or omit model unless you need a specific model. For understanding analyzers, model selection is primarily exposed for VLM-backed analyzers and object detection.

spoken_words

object_detection

The default object detection model supports the COCO 80-label vocabulary. Outputs use label strings such as person, car, cell phone, and laptop.person, bicycle, car, motorbike, aeroplane, bus, train, truck, boat, traffic light, fire hydrant, stop sign, parking meter, bench, bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe, backpack, umbrella, handbag, tie, suitcase, frisbee, skis, snowboard, sports ball, kite, baseball bat, baseball glove, skateboard, surfboard, tennis racket, bottle, wine glass, cup, fork, knife, spoon, bowl, banana, apple, sandwich, orange, broccoli, carrot, hot dog, pizza, donut, cake, chair, sofa, pottedplant, bed, diningtable, toilet, tvmonitor, laptop, mouse, remote, keyboard, cell phone, microwave, oven, toaster, sink, refrigerator, book, clock, vase, scissors, teddy bear, hair drier, toothbrush

vlm

Supported hosted tiers:

Sandbox VLM models

For open-weight VLM models, start a compatible sandbox first and pass sandbox_id inside the analyzer config. Hosted tiers such as default, mini, base, pro, and ultra do not need sandbox_id.
Sandbox setup, model tiers, and validation live in the dedicated Sandbox docs:

Sandbox Compute

Create and manage sandbox runtimes.

Sandbox Models

See supported models and minimum tiers.

Specialized VLM analyzers

These analyzers use the same VLM model family as vlm, with task-specific output shapes. Use the generic vlm analyzer instead if you want to control the prompt or schema directly.
Model availability can vary by workspace and deployment. If a model is omitted, VideoDB uses the current default for that analyzer.

Putting it together

This example shows run-level options and analyzer-level options in the same understanding run.

Cost and quality tips


Next steps

Analyzer Outputs

See sample output shapes for each analyzer.

Create an Index

Turn stored artifacts into retrieval-ready indexes.

Search and Retrieval

Retrieve moments after artifacts have been prepared for search.