JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
VideoDB Documentation
VideoDB Documentation
VideoDB Documentation
Welcome to VideoDB Docs
Quick Start Guide
How Accurate is Your Search?
Semantic Search
Collections
Callback Details
Ref: Subtitle Styles
Language Support
Guide: Subtitles
Visual Search and Indexing
Scene Extraction Algorithms
Custom Annotations
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
Dynamic Video Streams
Ref: TextAsset
Guide : TextAsset
Open Source Tools
PromptClip: Use Power of LLM to Create Clips
StreamRAG: Connect ChatGPT to VideoDB
LlamaIndex VideoDB Retriever
Examples and Tutorials
Dubbing - Replace Soundtrack with New Audio
Beep curse words in real-time
Remove Unwanted Content from videos
Instant Clips of Your Favorite Characters
Insert Dynamic Ads in real-time
Adding Brand Elements with VideoDB
Revolutionize Video Editing with VideoDb: Effortless Ad Placement and Seamless Video Integration
Eleven Labs x VideoDB: Adding AI Generated voiceovers to silent footage
Elevating Trailers with Automated Narration
Add Intro/Outro to Videos
Enhancing Video Captions with VideoDB Subtitle Styling
Audio overlay + Video + Timeline
Building Dynamic Video Streams with VideoDB: Integrating Custom Data and APIs
Adding AI Generated Voiceovers with VideoDB and LOVO
AI Generated Ad Films for Product Videography: Wellsaid, Open AI & VideoDB
Fun with Keyword Search
AWS Rekognition and VideoDB - Intelligent Video Clips
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
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
Drafts
From Language Models to World Models: The Next Frontier in AI
The Future Series
Research Grants
Building World's First Video Database
Multimedia: From MP3/MP4 to the Future with VideoDB
Introducing VideoDB: The Pinnacle of Synchronized Video Streaming for the Modern Web
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
Team
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
Customer Love
Temp Doc
Dynamic Video Streams
Guide : TextAsset
Overview
This guide gives you an introduction to
TextAssets
and how you can use them to overlay text elements on your videos.
We will also explore the configurations available for the
TextAssets
class, such as:
Default Styling
Font Styling
Background box styling
Shadow for Text Element
Setup
📦 Installing packages
%
pip install
videodb
🔑 API Keys
Before proceeding, ensure that you have access to
VideoDB
.
Get your API key from
VideoDB Console
. ( Free for first 50 uploads, No credit card required ) 🎉
import
os
os
.
environ
[
"VIDEO_DB_API_KEY"
]
=
""
🌐
Connect to VideoDB
from
videodb
import
connect
conn
=
connect
(
)
coll
=
conn
.
get_collection
(
)
🎥
Upload Video
VideoDB uses video as a base to create a timeline. Click here to learn more about how
Timelines and Assets
function.
video
=
coll
.
upload
(
url
=
"
https://www.youtube.com/watch?v=4dW1ybhA5bM
"
)
You can upload from your local file system too by passing
file_path
in
upload()
Since this guide is focused on exploring the
TextAsset
object, we’ll be using
this plain video
to avoid any distractions. You can, of course, apply this to a
VideoAsset
of your choice.
Creating Assets
Now, we will create some assets that we are going to use in our Video Timeline
VideoAsset
- A Video that will be used as a base for Video Timeline
TextAsset
- A Text Element that will overlayed on our Video Timeline
Checkout
Timeline and Assets
🎥 VideoAsset
from
videodb
.
asset
import
VideoAsset
# Create a VideoAsset from Video
video_asset
=
VideoAsset
(
asset_id
=
video.id
,
start
=
0
,
end
=
20
)
🔠 TextAsset : Default Styling
To Create a TextAsset, use
TextAsset
with following params
text
: The text that needs to be displayed
duration
(optional)
: The duration for which the text element needs to be displayed
from
videodb
.
asset
import
TextAsset
text_asset_1
=
TextAsset
(
text
=
"THIS IS A SENTENCE"
,
duration
=
5
,
)
🔡 TextAsset - Custom Styling
To Create a
TextAsset
, with custom styling you can pass an additional parameter
style
(optional)
: Accepts a
TextStyle
Instance, which contains styling configuration of a
TextAsset
View API Reference for
TextStyle
1. Font Styling
from
videodb
.
asset
import
TextAsset
,
TextStyle
text_asset_2
=
TextAsset
(
text
=
"THIS IS A SENTENCE"
,
duration
=
5
,
style
=
TextStyle
(
font
=
"Inter"
,
fontsize
=
50
,
fontcolor
=
"#FFCFA5"
,
bordercolor
=
"#C14103"
,
borderw
=
"2"
)
)
2. Background box
from
videodb
.
asset
import
TextAsset
,
TextStyle
text_asset_3
=
TextAsset
(
text
=
"THIS IS A SENTENCE"
,
duration
=
5
,
style
=
TextStyle
(
box
=
True
,
boxcolor
=
"#FFCFA5"
,
boxborderw
=
10
,
boxw
=
0
,
boxh
=
0
,
text_align
=
"3"
)
)
3. Shadows
from
videodb
.
asset
import
TextAsset
,
TextStyle
text_asset_4
=
TextAsset
(
text
=
"THIS IS A SENTENCE"
,
duration
=
5
,
style
=
TextStyle
(
shadowcolor
=
"#0AA910"
,
shadowx
=
"2"
,
shadowy=
"3"
,
text_align
=
"3"
box
=
False
,
)
)
4. Position and Alignment
from
videodb
.
asset
import
TextAsset
,
TextStyle
text_asset_3
=
TextAsset
(
text
=
"THIS IS A SENTENCE"
,
duration
=
5
,
style
=
TextStyle
(
x
=
0
,
y
=
0
,
y_align
=
"text"
,
text_align
=
"T+C"
)
)
🎼
Create a timeline using
Timeline
from
videodb
.
timeline
import
Timeline
# Initialize a Timeline
timeline
=
Timeline
(
conn
)
# Add Our base VideoAsset inline
timeline
.
add_inline
(
video_asset
)
# TextAsset with default Styling
timeline
.
add_overlay
(
0
,
text_asset_1
)
# TextAsset with Custom Font Styling
timeline
.
add_overlay
(
5
,
text_asset_2
)
# TextAsset with Custom Border Box
timeline
.
add_overlay
(
10
,
text_asset_3
)
# TextAsset with Custom Shadow
timeline
.
add_overlay
(
15
,
text_asset_4
)
▶️ Play the Video
from
videodb
import
play_stream
stream_url
=
timeline
.
generate_stream
(
)
play_stream
(
stream_url
)
Load content from console.videodb.io?
Loading external content may reveal information to 3rd parties.
Learn more
Allow
👨💻
Next Step
Check out the other resources and tutorials using TextAssets.
Adding Brand Elements with VideoDB
Ref: TextAsset
If you have any questions or feedback. Feel free to reach out to us 🙌🏼
Discord
GitHub
Email
Overview
Setup
📦 Installing packages
🔑 API Keys
🌐 Connect to VideoDB
🎥 Upload Video
Creating Assets
🎥 VideoAsset
🔠 TextAsset : Default Styling
🔡 TextAsset - Custom Styling
1. Font Styling
2. Background box
3. Shadows
4. Position and Alignment
🎼 Create a timeline using Timeline
▶️ Play the Video
👨💻 Next Step
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.