Skip to main content
Open In Colab

Introduction

With an endless stream of new video content on our feeds, engaging the audience with dynamic visual elements can make educational and promotional videos much more impactful. VideoDB’s suite of features allows you to enhance videos with programmatic editing. In this tutorial, we’ll explore how to create a video that visually counts and displays instances of a specified word as it’s spoken. We’ll use VideoDB’s Keyword Search to index spoken words, and then apply audio and text overlays to show a counter updating in real-time with synchronized audio cues.

Setup

Installing packages

API Keys

Before proceeding, ensure access to VideoDB and set up Get your API key from VideoDB Console. ( Free for first 50 uploads, No credit card required)

Steps

Step 1: Connect to VideoDB

Establish a session for uploading videos. Import the necessary modules from VideoDB library to access functionalities.

Step 2: Upload Video

Upload and play the video to ensure it’s correctly loaded. We’ll be using this video for the purpose of this tutorial.

Step 3: Indexing Spoken Words

Index the video to identify and timestamp all spoken words.
Search within the video for the keyword (“education” in this example), and note each occurrence.

Step 5: Setup Timeline and Audio

Initialize the timeline and prepare an audio asset to use for each word occurrence.

Step 6: Overlay Text and Audio

Add text and audio overlays at each instance where the word is spoken using the Track and Clip pattern. Note: Adding the ‘padding’ is an optional step. It helps in adding a little more context to the exact instance identified, thus resulting in a better compiled output.

Step 7: Generate and Play the Stream

Finally, generate a streaming URL for your edited video and play it.
Here’s a preview of showing occurrence of the word Education

Conclusion

This tutorial showcases VideoDB’s capabilities to create a video that programmatically counts and displays the frequency of a specific keyword spoken throughout the video. This method can be adapted for various applications where dynamic text overlays add significant value to video content.

Tips and Tricks

  • Use different text styles and positions based on your video’s theme.
  • Add background sounds or effects to enhance the viewer’s experience.

Explore Full Notebook

Open the complete implementation in Google Colab with all code examples.

Brand Elements

Add logos, watermarks, and graphics

Audio Overlay

Add background music and sound effects