Skip to main content
Open In Colab

Introduction

Narration is the heartbeat of trailers, injecting excitement and intrigue into every frame. With VideoDB, adding narration becomes a seamless, creative process. In this tutorial, we will:
  1. Analyze a movie trailer to understand its scenes.
  2. Generate a dramatic script using VideoDB’s text generation.
  3. Synthesize a deep, trailer-style voiceover using VideoDB’s voice generation.
  4. Edit the narration into specific time slots to match the video’s pacing.
  5. Overlay a movie poster at the end.
All using a single SDK. Here’s an example of weaving a thrilling storyline from a reel of unrelated, but valuable cinematic shots:

Setup

Installing VideoDB

API Keys

You only need your VideoDB API Key. Get your API key from VideoDB Console. Free for first 50 uploads, no credit card required.

Step 1: Connect to VideoDB

Establish a connection to your VideoDB project.

Step 2: Upload the Trailer

We’ll upload a sample movie trailer (Chase) to VideoDB. This creates the base video asset we will edit.

Step 3: Analyze Scenes

We need to understand the visual pacing of the trailer to write a good script. index_scenes() will generate descriptions and timestamps for every shot.
Let’s view the description of first scene from the video
Output:

Step 4: Generate Narration Script

We’ll use VideoDB’s generate_text to write a dramatic script. We feed the scene descriptions into the prompt to ensure the narration matches the visual action.
You can refine the narration script prompt to ensure synchronization with timestamps in the scene index, optimizing the storytelling experience.

Step 5: Generate Voiceover Audio

Now we synthesize the audio.

Step 6: Edit the Timeline

Now we combine the video and audio.

Step 7: Review and Share

Preview the trailer with the integrated narration to ensure it aligns with your vision. Once satisfied, share the trailer with others to experience the enhanced storytelling.

Bonus - Add Movie Poster

Let’s add a “Coming Soon” style movie poster at the very end of the trailer. We’ll upload an image URL and overlay it on the video.

Conclusion

You’ve successfully built a sophisticated video editing workflow:
  • Analysis: Automated scene understanding.
  • Generation: AI Scripting and Voice synthesis.
  • Composition: Non-linear editing with multi-track audio and image overlays.
Here’s another interesting experiment to generate automatic voiceovers for silent footages. In this example, we’ve added the classic David Attenborough styled documentary narration to this footage of the underwater world. Check out the complete tutorial here

Explore Full Notebook

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

AI Voiceovers

Add professional narration to silent footage

Voice Cloning

Clone voices for consistent brand audio