Start simple
For most use cases, only provide analyzer types.spoken_words → transcript, object_detection → objects, and vlm → scene. 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.
wait_until_complete() before fetching analyzer outputs or indexing artifacts. Run-level terminal statuses are done, failed, and partial.
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:
- run-level options apply to the whole understanding run
- analyzer options apply to one item inside
analyzers
Run-level options
Run-level options belong directly onvideo.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 inanalyzers 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:
- choose a stable analyzer name for output lookup
- reference another analyzer through
inputs - run multiple analyzers of the same type
- create readable artifact names for downstream steps
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.
{{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
namevalues. - A placeholder such as
{{inputs.transcript}}must reference an input listed ininputs. - If
inputsare 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
Supported object labels
Supported object labels
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, toothbrushvlm
Supported hosted tiers:
Sandbox VLM models
For open-weight VLM models, start a compatible sandbox first and passsandbox_id inside the analyzer config. Hosted tiers such as default, mini, base, pro, and ultra do not need sandbox_id.
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 asvlm, 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.