This guide gives you an introduction to adding Subtitle Styles by showing you visual outputs of the configurations available for the SubtitleStyle class, such as
. ( 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
Upload a base video to add subtitle. For this guide, we’ll use following video
video = coll.upload(url="https://www.youtube.com/watch?v=il39Ks4mV9g")
video.play()
You can upload from your local file system too by passing file_path in upload()
🔊 Index Spoken Words
First, we need to index the video using video.index_spoken_words() function.This ensures the availability of the transcript. Without this step VideoDB wouldn’t be able to add captions to any video.
video.index_spoken_words()
📝 Default Subtitles
To add subtitles to your video you can use video.add_subtitle() .