videodb
VideoDB Documentation
videodb
VideoDB Documentation
Examples and Tutorials

icon picker
Adding Brand Elements with VideoDB

Introduction

Adding brand elements like logo, overlays styles, elevate your video content to a new levels of professionalism. This tutorial will guide you through the process of integrating logos and custom text assets, ensuring your brand shines through in every frame.
For this tutorial, we’ll add Starbucks’ branding to
unbranded, raw short film through image and text assets and see how those can be modified to enhance the content of raw footage. Although this is a quick example, the possibilities are endless! We look forward to seeing your experiments with these building blocks.

Setup

📦 Installing packages

%pip install videodb

🔑 API Keys

Before proceeding, ensure access to
light
Get your API key from . ( Free for first 50 uploads, No credit card required ) 🎉
import os

os.environ["VIDEO_DB_API_KEY"] = ""

Implementation

📋 Step 1: Connect to VideoDB

Begin by establishing a connection to VideoDB using your API key:
from videodb import connect

# Connect to VideoDB using your API key
conn = connect()

coll = conn.get_collection()

🎬 Step 2: Upload Video and Image Assets

Begin the branding process by uploading your video and image assets (base video and logo image) to VideoDB:
Refer to if you require any assistance with using image assets.
from videodb import MediaType

# Upload video to VideoDB
video = coll.upload(url="https://youtu.be/SR__amDl1c8?si=ieqLlLrvFUAuNSmr")

# Upload image asset for branding
image = collection.upload(file_path="/content/Starbucks Logo.png", media_type=MediaType.image)

Here's the logo (image asset) well be using for this tutorial:
Starbucks Logo.png

🎨 Step 3: Add Brand Elements to Video

We shall begin by defining the text asset (custom text: “When the chaos of the night strikes, find your Starbucks calm.”) and specifications about the image overlay (logo) and video.
For details about the text customization parameters, refer to the documentation for Text Assets.
from videodb.asset import VideoAsset, TextAsset, ImageAsset
from videodb import TextStyle

# Create Video Asset
video_asset = VideoAsset(
asset_id=video.id,
start=0,
end=44
)

# Create Image Asset
image_asset = ImageAsset(
asset_id=image.id,
width=200,
height=40,
x=1050,
y=625,
duration=107
)

# Create text asset
text_asset = TextAsset(
text="When the chaos of the night strikes, \n find your Starbucks calm. \n Sip steady.",
duration=10,
style=TextStyle(
fontsize=38,
fontcolor="FFB800",
font = "Cormorant",
box=False,
y=200,
text_align=3
)
)


ok
Checkout this to know the detailed usage of Text Assets. Go through for detailed reference.

🔍 Step 4: Add Brand Elements to Video

Lastly, we shall bring all these assets together by creating a , and using the video asset as the base.
# Create timeline with the logo & text assets

from videodb.timeline import Timeline

timeline = Timeline(conn)
timeline.add_inline(video_asset)

timeline.add_overlay(3, image_asset)
timeline.add_overlay(0, text_asset)

🎥 Step 5: Review and Share

Review your branded video to ensure it aligns perfectly with your brand identity, then share it with your audience:
from videodb import play_stream

# Preview the branded video
stream_url = timeline.generate_stream()
play_stream(stream_url)


Here’s what we got from this quick exercise:

🎉 Conclusion

Congratulations on mastering the art of branding with VideoDB! By seamlessly integrating brand elements into your videos, you've enhanced their professionalism and engagement. Experiment with different branding techniques to ensure your brand shines through in every frame.
For more information and advanced features, explore the and join the VideoDB community on or for support and collaboration. Share your branded videos proudly and inspire others in the professional branding sphere!

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.