VideoDB Documentation
VideoDB Documentation
Scene Index Documentation

icon picker
Custom Annotations

Enhance your understanding of videos by using our simple annotation and tagging pipeline. To enable this, you can create a new Scene object. Then, pass your annotations in the description field and index them using index_scenes() function.
Screenshot 2024-07-04 at 12.23.02 PM.jpg

VideoDB allows multiple indexes on video objects. This is advantageous as it allows you to attach additional context to each scene, enhancing the search functionality.


A Scene object describes a unique event in the video. From a timeline perspective it’s a timestamp range.
video_id : id of the video object
start : seconds
end : seconds
description : string description
Each scene object has another attribute, frames, which contains a list of objects. However, we don't need them here for custom annotation pipelines because we are bringing the description from outside.

Create a new Scene

Create new Scene objects and add your custom annotation as description.
from videodb.scene import Scene

# create scene object and patch your description
scene1 = Scene(,
description="Detective Martin is being interviewed by the police.",)

scene2 = Scene(,
description="A religious gathering. People are praying and singing")

# create a list of scene objects
scenes = [scene1, scene2]

Index and search scenes

Index using the list of scene objects and use the index_id for search
from videodb import IndexType

#create new index and assign it a name
index_id = video.index_scenes(scenes=scenes, name="My Custom Annotations#1")

# search using the index_id
res ="religious gathering", index_type=IndexType.scene, index_id=index_id)

Custom annotations unlock additional features
Adding application context into the search pipeline.
Generate unique descriptions from your own custom vision model.
Index manual annotations.
Read more about Scene object in

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.