Skip to content
videodb
VideoDB Documentation
  • Pages
    • Welcome to VideoDB Docs
    • Quick Start Guide
      • Video Indexing Guide
      • Semantic Search
      • How Accurate is Your Search?
      • 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
      • icon picker
        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
      • Automated Traffic Violation Reporter
    • Meeting Recording SDK
    • Generative Media Quickstart
      • Generative Media Pricing
    • AI Video Editing Automation 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

Remove Unwanted Content from videos

VideoDB gives you the power to choose any bits from any video in an instant. If you are streaming content that has unwanted section for minors and NSFW content, you can easily skip that by just identifying the timeline where unwanted content exists and videoDB would take care of your stream to skip those secions.
image.png
Let’s take this from the TV show "The Breaking Bad". Our aim is to remove the sections that might not be appropriate for all viewers.

How to identify the unwanted sections?

This is mostly context specific and we can choose some external video intelligence APIs for this task. These APIs can give us the specific times where inappropriate video content appears in a video. For example is amazing for this task. If you're curious about the full process, including how to find visuallyl inappropriate content in a video, check out our 👉
where we walk through the entire process.
For the sake of simplicity, here we’ll just use the output of AWS Rekognition API and jump straight to the timestamps. Next, we'll upload the video to VideoDB and use these timestamps to generate stream with the safe timestamps. It's as easy as querying a database, but for videos ⚡️
Let’s dive in 👇

Setup

🔧 Installing VideoDB in your environment

VideoDB is available as a
!pip install videodb

🔗 Setting Up a connection to db

To connect to VideoDB, simply get the API and create a connection. This can be done by either providing your VideoDB API key directly to the constructor or by setting the VIDEO_DB_API_KEY environment variable with your API key.
light
Get your API key from . ( Free for first 50 uploads, No credit card required ) 🎉
from videodb import connect
conn = connect(api_key="YOUR_API_KEY")

Identified Sections

Here’s the list of safe timestamps of the from the TV show "Breaking Bad". 👉 . Let us know if you want us to create models or integrations within VideoDB. We would love know your thoughts and want to grow with your feedback.
safe_shots = [[0, 102], [104, 119], [122, 188], [192, 197], [202, 202], [207, 209], [223, 225], [231, 234], [245, 273], [275, 275], [277, 280], [282, 291], [293, 382], [384, 396], [398, 402], [405, 438], [440, 473], [475, 532], [534, 545], [547, 558]]

🧹 Removing unsafe visual sections using VideoDB

In just 4 lines of code, you have advanced video editing at your disposal.
First, we will upload our video to VideoDB
Then create a clip which contains only Safe Shots from the video by passing timeline in Video.generate_stream()
you can use play_stream() to play the video
from videodb import play_stream

# upload the video to db
video_url_yt = "https://www.youtube.com/watch?v=Xa7UaHgOGfM"
video = conn.upload(url=video_url_yt)

# generate a stream link of safe_shots by passing values in timeline
stream_link = video.generate_stream(timeline=safe_shots)

# play the video in browser/notebook
play_stream(stream_link)
checked-2
As you can see VideoDB fundamentally removes the limitation of files and rendering and helped retrieve sections of videos seamlessly.
Stay tuned for exciting features in our upcoming version and keep building awesome stuff with VideoDB 🤘

You can use the stream link with any video player ( video.js, JW player or simple html player ) to embed in your application. In upcoming versions, we are launching our own video player for your ease. It has built-in chapter and search feature. Please check to see it in action. We would love to know your thoughts at 👉 contact@vidoedb.io.

Keep building awesome stuff 🤘

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.