Timeline capabilities, allows for the editing of video streams in real time ⚡️. It's like having a straightforward yet powerful interface for a video editor that can be operated in real time, seamlessly integrated with your AI systems.
But first, let's talk about an exciting upgrade to our upload function. 👉 We now support the uploading of any type of audio and image files to VideoDB making it a truly multimedia database. Whether they are sound effects 📢, music files 🎼, podcasts 🎤 or logos 🌁 VideoDB automatically recognizes the file type, eliminating the need for you to specify whether the file or URL is audio, video, or image.
audio = conn.upload(url='audio link')
Timeline
You can now craft programmatic compilation streams with audio, image and text overlays using your video data in VideoDB. This introduces innovative personalization of video streams in real time.
The Timeline object provides you with two methods: add Asset objects inline using the add_inline function, and incorporate an overlay using the add_overlay function.
Assets
Here’s more information about Asset objects: Assets such as VideoAsset and AudioAsset objects can be generated from any uploaded content. There is no limit to the number of assets you can create. To define any asset, you must provide the identifier of the media and specify the segment of the media with start and end parameters.
These assets can be attached to the timeline either inline or as an overlay, allowing you to compile the timeline and instantly generate a new video stream.
Quickstart
First, update you SDK.
!pip install -U videodb
Here’s a sample snippet to get you started 👉
# Assets, Timeline
from videodb.asset import VideoAsset, AudioAsset, ImageAsset
from videodb.timeline import Timeline
# get video and audio [ These are random IDs please change ]
video = collection.get_video('m-7b104a71-a761-4b63-aad8-2d00738fbf4a')
Leveraging the capabilities of automation and AI-driven content understanding, the possibilities for creation and repurposing of your content are boundless with VideoDB.
If you wish to extract audio from a video, please specify this in the "media_type" field. For instance, you can obtain audio from a YouTube video by doing so.
The types of media that can be uploaded are defined in the MediaType class.
Limitations
In a scenario where two or more overlay objects cannot overlap, it is necessary to perform calculations to ensure that the duration of previous overlay objects does not extend beyond the start time on the timeline. This is a common requirement in video editing, particularly in a two-track editor setup.
Video assets must be added sequentially; it is currently not possible to overlay a video asset on top of another video or audio.
Audio assets cannot be added sequentially.
Stay tuned for more innovative ways to repurpose and enhance your content using VideoDB's automation and AI-driven features 🤘