This notebook is a step towards creating a Slack bot that posts valuable engineering practices from top tech talks daily. Stay Tuned!
Introduction
In this tutorial, we’ll explore an advanced yet accessible technique for retrieving visual information from video content based on what the speaker was discussing. Specifically, we’ll focus on finding information on slides in a video recording of a speech. As video content continues to grow in volume and importance, being able to quickly find specific information within videos becomes crucial. Imagine being able to locate a particular statistic mentioned in an hour-long presentation without watching the entire video. That’s the power of multimodal video search! This approach combines VideoDB’s powerful scene indexing capabilities with spoken word search to create a robust, multimodal search pipeline. Don’t worry if these terms sound complex - we’ll break everything down step by step!Setup
Installing packages
API Keys
Before proceeding, ensure access to VideoDB. If not, sign up for API access on the respective platforms. Get your API key from VideoDB Console (Free for first 50 uploads, No credit card required).Step 1: Connect to VideoDB
Gear up by establishing a connection to VideoDB.Step 2: Upload the Video
Next, let’s upload our sample video:Step 3: Index the Video on Different Modalities
Now comes the exciting part - we’re going to index our video in two ways:- Indexing spoken content (what’s being said in the video)
- Indexing visual content (what’s being shown in the video)
Indexing Spoken Content
Find Right Configuration for Scene Indexing
To learn more about Scene Index, explore the following guides:- Quickstart Guide guide provides a step-by-step introduction to Scene Index. It’s ideal for getting started quickly and understanding the primary functions.
- Scene Extraction Options Guide delves deeper into the various options available for scene extraction within Scene Index. It covers advanced settings, customization features, and tips for optimizing scene extraction based on different needs and preferences.
- Finding the Best Configuration for Scene Extraction
prompt on some sample scenes first is a sensible approach. It allows you to experiment and make adjustments without committing to the entire video, which can help manage costs.
The prompt guides the visual model to identify and describe the content of slides in each scene, outputting “None” if no slides are visible. This targeted testing can help fine-tune the model’s performance before applying it to the entire video.
Index Scenes With The Finalized Config and Prompt
This function fits all the steps above into a single cell and processes the entire video accordingly:- It breaks the video into scenes using a shot-based approach
- For each scene, it analyzes the visual content based on the given
prompt - It creates an index of these scene descriptions
Step 4: Search Pipeline Implementation
The heart of this approach is the search pipeline, which combines spoken word search with scene indexing. This pipeline does the following:- Performs a keyword search on the spoken word index
- Extracts time ranges from the search results
- Retrieves the scenes
- Filters scenes based on overlaps with the time ranges from the spoken word search
- Returns the descriptions of these scenes (our slide content) and their time ranges
Step 5: Viewing the Search Results
Finally, let’s use our search pipeline:The content written on the slide is
Here are some other query outputs using the same search pipeline:
Search for “stripe api review”
API REVIEW CHECKLIST
Search for “Friction Log”
Internal Terminal Dogfooding Instructions
Conclusion
This document has outlined a sophisticated approach to multimodal video search, combining spoken word indexing with scene-based visual analysis. By leveraging VideoDB’s powerful indexing and search capabilities, we’ve created a pipeline that can find specific visual content (in this case, slide information) based on spoken queries. This technique has broad applications beyond just searching for slides in speeches. It could be adapted for various use cases where visual information needs to be retrieved based on audio content, such as:- Finding product demonstrations in long-form video content
- Identifying key moments in educational videos
- Searching for specific visual elements in recorded meetings or presentations
Further Resources
To learn more about Scene Index, explore the following guides:Scene Index Quickstart
Step-by-step introduction to Scene Index for quick setup and primary functions.
Scene Extraction Options
Deep dive into various options for scene extraction, advanced settings, and optimization.
Advanced Visual Search
Advanced techniques for visual content retrieval and complex search scenarios.
Custom Annotation Pipelines
Build custom annotation pipelines for specialized video analysis workflows.
Get Support
If you have any questions or feedback, feel free to reach out to us:Discord Community
Connect with the VideoDB community for support and discussions
GitHub
Explore our open source projects and contribute
VideoDB
Visit our main website for more information