videodb
VideoDB Documentation
videodb
VideoDB Documentation
Examples and Tutorials

icon picker
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)
Load content from console.dev.videodb.io?
Loading external content may reveal information to 3rd parties. Learn more
Allow
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 ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.