from videodb.scene import Scene
# Create scenes with custom descriptions
scenes = [
Scene(
video_id=video.id,
start=0,
end=60,
description="Opening credits with cityscape aerial shot"
),
Scene(
video_id=video.id,
start=60,
end=180,
description="Interview with CEO discussing Q4 results"
),
Scene(
video_id=video.id,
start=180,
end=300,
description="Product demo showing new features"
)
]
# Index custom scenes
custom_index = video.index_scenes(scenes=scenes, name="manual_chapters")
# Search the custom index
results = video.search(
query="product demo",
index_type=IndexType.scene,
index_id=custom_index
)