How I Used VideoDB API to Build a Smart Video Scene Finder and Shorts Maker

Pradyot SoniPradyot Soni
3 min read

📌 Tired of manually scrubbing through videos to find key scenes?
This AI-powered project automates the whole process — extracting specific scenes using semantic search and instantly converting them into vertical, mobile-optimized content (9:16).
✨ Imagine typing "fight scene" or "man laughing" and instantly getting that clip, converted into vertical format and ready for Reels — no scrubbing, no editing.

👋 Hey, Devs!

As a part of ongoing AI Demos x VideoDB Hackathon, I have built a cool side project that solves a real pain for video creators: finding specific scenes in long videos and turning them into Shorts with zero editing. Think AI-powered semantic search, scene extraction, and auto vertical cropping — all baked into a single app.

This blog walks you through how I did it using the awesome VideoDB API and Python. Let's get into it.


🧠 Behind the Idea

Most creators waste hours reviewing long videos to find viral moments. This tool solves this by:

  1. 🔍 Auto-detecting specific moments like “person talking” or “car chase”

  2. 🧠 Using semantic search instead of timestamp scrubbing.

  3. 🌐 Converting selected moments into ready-to-publish vertical videos

  4. ⚡ Boosting productivity for video editors, marketers, and influencers.


⚙️ What My App Does

  • User uploads a video (via link)

  • Enters a scene query, e.g., "person talking"

  • The backend hits VideoDB API and gets scene timestamps

  • Extracts clips using ffmpeg

  • Clips are resized/cropped into 9:16 using smart centering (OpenCV)

  • Outputs ready-to-publish reels in seconds!

    No manual work. Just magic.


⚙️ Tech Stack

TechRole
Python & FlaskCore backend logic
VideoDB APIAI-driven semantic scene search
OpenCVSmart cropping & resizing
HTML, CSS, JSUI for uploading & previewing
ffmpegFormat conversions

📁 Project Structure


🔍 Scene Detection Using VideoDB API

We utilise video_processor.py to interact with VideoDB:

  • Send video file + semantic query

  • Receive timestamps of matching scenes

  • Process only the relevant chunks

  • Zero manual editing!


📱 Vertical Cropping Magic

Traditional resizing distorts aspect ratio.
We use vertical_converter.py to:

  • Auto-detect region of interest

  • Use OpenCV to smart crop central subjects

  • Output 9:16 videos without losing focus


💻 Demo Snapshot

Here’s a quick preview of the UI:

  • Upload your video

  • Type your scene query

  • Get vertical video in a minute!

Watch demo video here


🚀 Try It Yourself

Clone the repo:

git clone https://github.com/pradyot29/AI-powered-Scene-Extractor-and-Vertical-Video-Converter.git
cd AI-powered-Scene-Extractor-and-Vertical-Video-Converter
pip install -r requirements.txt

Set your.env file with your VideoDB API key.

VIDEODB_API_KEY=your_videodb_key_here
SECRET_KEY=your_flask_secret_key_here

Then launch the app:

python app.py

🔚 Final Thoughts

This project is useful and very practical if you’re:

  • A YouTuber or Instagram Reels creator

  • A news editor trying to repurpose content

  • A startup marketer automating video campaigns

  • A developer looking to build on AI + video editing tools

⭐ Don’t just edit faster. Edit smarter with AI.


📢 Let’s Connect!

If you liked this project:

  • ⭐ Star the GitHub repo Github-pradyot

  • 💬 Drop a comment below or share this blog!

  • 🤙 Connect with me on LinkedIn.

  • 🌐 Want to build and win big? Register fast; AI Demos x VideoDB hackathon is live now.


27
Subscribe to my newsletter

Read articles from Pradyot Soni directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pradyot Soni
Pradyot Soni