Vikit.ai SDK let you develop easily video generators leveraging generative AI and other AI models. You may see this as a langchain to orchestrate AI models and video editing tools. To see the video in full resolution, click on the GIF.
You need a personal access token, which you can easily obtain from here.
Vikit.ai SDK is easy to test standalone using Google Colab.
It is easy to develop through Dev Containers. Dev container file and instructions are available here
requirements.txt
contains requirements for python environmentGenerating a video from simple text prompt, with background music and voice over narration:
import asyncio
from vikit.music_building_context import MusicBuildingContext
from vikit.prompt.prompt_factory import PromptFactory
from vikit.video.prompt_based_video import PromptBasedVideo
from vikit.video.video_build_settings import VideoBuildSettings
prompt = "Paris, the City of Light, is a global center of art, fashion, and culture, renowned for its iconic landmarks and romantic atmosphere. The Eiffel Tower, Louvre Museum, and Notre-Dame Cathedral are just a few of the city's must-see attractions."
video_build_settings = VideoBuildSettings(
music_building_context=MusicBuildingContext(
apply_background_music=True,
generate_background_music=True,
),
include_read_aloud_prompt=True,
)
async def create_video():
prompt = await PromptFactory().create_prompt_from_text(prompt_text)
video = PromptBasedVideo(prompt=prompt)
await video.build(build_settings=video_build_settings)
if __name__ == "__main__":
asyncio.run(create_video())
You can orchestrate several videos, using CompositeVideo()
. Here is an example showing how to generate two videos from texts:
import asyncio
from vikit.video.composite_video import CompositeVideo
from vikit.video.raw_text_based_video import RawTextBasedVideo
from vikit.video.video_build_settings import VideoBuildSettings
async def create_composite_video():
prompt1 = "Paris, the City of Light, is a global center of art, fashion, and culture, renowned for its iconic landmarks and romantic atmosphere."
prompt2 = "The Eiffel Tower, Louvre Museum, and Notre-Dame Cathedral are just a few of the city's must-see attractions."
video1 = RawTextBasedVideo(prompt1)
video2 = RawTextBasedVideo(prompt2)
video_composite.append_video(video1).append_video(video2)
await video_composite.build(
build_settings=VideoBuildSettings(
output_video_file_name="Composite.mp4",
)
video_composite.append_video(video1).append_video(transit).append_video(video2)
await video_composite.build(
build_settings=VideoBuildSettings(
test_mode=False,
output_video_file_name="Composite.mp4",
)
)
if __name__ == "__main__":
asyncio.run(create_composite_video())
More elaborated examples can be found in script_example.py or in our Google Colab. For additional information, please refer to the Documentation.
If you've encountered a bug, have a feature request, or have any suggestions to improve the project, we encourage you to open an issue on our GitHub repository. To do so, go to the "Issues" tab in our GitHub repository and click "New Issue." Please provide a clear title and detailed description, including steps to reproduce, environment setup, and any relevant screenshots or code snippets. If you have questions, reach out to us hello@vikit.ai.
Wanna help? You're very welcome!:
Please make sure your changes are consistent with these common guidelines: