# Search spoken content across all videosresults = coll.search("discusses artificial intelligence")# Results include video IDsfor shot in results.get_shots(): print(f"Found in video {shot.video_id} at {shot.start}s")
from videodb import IndexType# Search scene indexes across collectionresults = coll.search( query="person speaking at podium", index_type=IndexType.scene)
# Tag videos by topicfor video in news_videos: video.index_scenes( prompt="Describe the news segment", metadata={"channel": "CNN", "category": "politics"} )# Search political news onlyresults = coll.search( query="election coverage", filter=[{"category": "politics"}], index_type=IndexType.scene)
# Tag by camera locationcamera_footage.index_scenes( prompt="Identify people and vehicles", metadata={"location": "entrance", "camera_id": "cam_01"})# Search specific cameraresults = coll.search( query="person in red jacket", filter=[{"location": "entrance"}], index_type=IndexType.scene)
Collection search only finds content that has been indexed:
# Index all videos firstfor video in coll.get_videos(): video.index_spoken_words() video.index_scenes(prompt="Describe the scene")# Now search across allresults = coll.search("quarterly results")