Skip to content
videodb
VideoDB Documentation
  • Pages
    • Welcome to VideoDB Docs
    • Quick Start Guide
      • Video Indexing Guide
      • Semantic Search
      • How Accurate is Your Search?
      • icon picker
        Collections
      • Public Collections
      • Callback Details
      • Ref: Subtitle Styles
      • Language Support
      • Guide: Subtitles
    • Examples and Tutorials
      • Dubbing - Replace Soundtrack with New Audio
      • VideoDB x TwelveLabs: Real-Time Video Understanding
      • Beep curse words in real-time
      • Remove Unwanted Content from videos
      • Instant Clips of Your Favorite Characters
      • Insert Dynamic Ads in real-time
      • Adding Brand Elements with VideoDB
      • Eleven Labs x VideoDB: Adding AI Generated voiceovers to silent footage
      • Elevating Trailers with Automated Narration
      • Add Intro/Outro to Videos
      • Audio overlay + Video + Timeline
      • Building Dynamic Video Streams with VideoDB: Integrating Custom Data and APIs
      • AI Generated Ad Films for Product Videography: Wellsaid, Open AI & VideoDB
      • Fun with Keyword Search
      • AWS Rekognition and VideoDB - Effortlessly Remove Inappropriate Content from Video
      • Overlay a Word-Counter on Video Stream
      • Generate Automated Video Outputs with Text Prompts | DALL-E + ElevenLabs + OpenAI + VideoDB
    • Visual Search and Indexing
      • Scene Extraction Algorithms
      • Custom Annotations
      • Scene-Level Metadata: Smarter Video Search & Retrieval
      • Advanced Visual Search Pipelines
      • Playground for Scene Extractions
      • Deep Dive into Prompt Engineering : Mastering Video Scene Indexing
    • Multimodal Search
      • Multimodal Search: Quickstart
      • Conference Slide Scraper with VideoDB
    • Real‑Time Video Pipeline
    • Meeting Recording SDK
    • Generative Media Quickstart
      • Generative Media Pricing
    • Realtime Video Editor SDK
      • Fit & Position: Aspect Ratio Control
      • Trimming vs Timing: Two Independent Timelines
      • Advanced Clip Control: The Composition Layer
      • Caption & Subtitles: Auto-Generated Speech Synchronization
      • Notebooks
    • Transcoding Quickstart
    • director-light
      Director - Video Agent Framework
      • Agent Creation Playbook
      • How I Built a CRM-integrated Sales Assistant Agent in 1 Hour
      • Make Your Video Sound Studio Quality with Voice Cloning
      • Setup Director Locally
    • github
      Open Source Tools
      • llama
        LlamaIndex VideoDB Retriever
      • PromptClip: Use Power of LLM to Create Clips
      • StreamRAG: Connect ChatGPT to VideoDB
    • zapier
      Zapier Integration
      • Auto-Dub Videos & Save to Google Drive
      • Create & Add Intelligent Video Highlights to Notion
      • Create GenAI Video Engine - Notion Ideas to Youtube
      • Automatically Detect Profanity in Videos with AI - Update on Slack
      • Generate and Store YouTube Video Summaries in Notion
      • Automate Subtitle Generation for Video Libraries
      • Solve customers queries with Video Answers
    • n8n
      N8N Workflows
      • AI-Powered Meeting Intelligence: Recording to Insights Automation
      • AI Powered Dubbing Workflow for Video Content
      • Automate Subtitle Generation for Video Libraries
      • Automate Interview Evaluations with AI
      • Turn Meeting Recordings into Actionable Summaries
      • Auto-Sync Sales Calls to HubSpot CRM with AI
      • Instant Notion Summaries for Your Youtube Playlist
    • mcp
      VideoDB MCP Server
    • Edge of Knowledge
      • Building Intelligent Machines
        • Part 1 - Define Intelligence
        • Part 2 - Observe and Respond
        • Part 3 - Training a Model
      • Society of Machines
        • Society of Machines
        • Autonomy - Do we have the choice?
        • Emergence - An Intelligence of the collective
      • From Language Models to World Models: The Next Frontier in AI
      • The Future Series
      • How VideoDB Solves Complex Visual Analysis Tasks
    • videodb
      Building World's First Video Database
      • Multimedia: From MP3/MP4 to the Future with VideoDB
      • Dynamic Video Streams
      • Why do we need a Video Database Now?
      • What's a Video Database ?
      • Enhancing AI-Driven Multimedia Applications
      • Misalignment of Today's Web
      • Beyond Traditional Video Infrastructure
      • Research Grants
    • Customer Love
    • Team
      • videodb
        Internship: Build the Future of AI-Powered Video Infrastructure
      • Ashutosh Trivedi
        • Playlists
        • Talks - Solving Logical Puzzles with Natural Language Processing - PyCon India 2015
      • Ashish
      • Shivani Desai
      • Gaurav Tyagi
      • Rohit Garg
      • VideoDB Acquires Devzery: Expanding Our AI Infra Stack with Developer-First Testing Automation

Collections

Collections are simple way to organize your uploads. Working with collections is straightforward. This helps in media organization and search efficiency.
Collection search would restrict the query to find information in only that collection, giving developers freedom to manage and organize videos for their RAG applications.

Create a new collection by calling create_collection function in the connection object.
conn.create_collection(name: str, description: str)

Each collection would have a unique id starting with “c-xxx-xxxx-xxx”. You can pass the name and description when you create one.
# create a new collection
new_collection = conn.create_collection(name =" test collection", description = "test description")
print(new_collection)

List all the collections you have created by calling the function get_collections
# list all collections
collections = conn.get_collections()
for c in collections:
print(c)

Get the collection by it’s unique id “c-xxx-xxxx-xxx”.
collection = conn.get_collection("c-bc849eee-dc5f-48c2-bd37-bb541c88c8ca")
print(collection)

You can update the name and description of the collection by update_collection function
# update a collection
collection = conn.update_collection("collection_id", "new_name", "new_desc")
print(collection)

Upload media to a Collection

When the collection is created you can use that to upload new video, audio, and images.
from videodb import MediaType

# create collection
new_collection = conn.create_collection("test collection", "test description")
print(new_collection)

# upload video
video = new_collection.upload(url="https://youtu.be/a9__D53WsUs?si=b1dmcLJbilNwC3H6")
print(video)

# upload audio
audio = new_collection.upload(url="https://youtu.be/MU0Yp0qmYEs?si=slWZ0HisObM14xjF", media_type=MediaType.audio)
print(audio)

# upload image
image = new_collection.upload(url="https://www.freepnglogos.com/uploads/logo-ig-png/logo-ig-instagram-new-logo-vector-download-13.png", media_type=MediaType.image)
print(image)

List all the media in a Collection (video/audio/image)

Use get methods to list audios, videos and images in the collection. We have provided individual get methods to make it simple and intuitive for you.
# list videos
videos = new_collection.get_videos()
for v in videos:
print(v)

# list audios
audios = new_collection.get_audios()
for a in audios:
print(a)

# list images
images = new_collection.get_images()
for img in images:
print(img)

Search inside a Collection

The most useful thing about collections is to restrict search to a specific set of videos. This can come really handy in building complex RAG applications.
from videodb import SearchType

# index spoken words
video.index_spoken_words()

# search inside a collection
result = new_collection.search("what is aws?", search_type=SearchType.semantic)
print(result)
stream_url = result.compile()
play_stream(stream_url)

More on Collection

Checkout to understand easy sharing of your collection with others.
Checkout for asynchronous upload and indexing opearations.

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