vikit.video.composite_video¶
Overview¶
Composite made from the collection of videos that need to be generated altogether, as a consistent block |
Classes¶
- class vikit.video.composite_video.CompositeVideo¶
Bases:
vikit.video.video.Video,is_composite_videoComposite made from the collection of videos that need to be generated altogether, as a consistent block
It could be a final video or intermediate composing specific scenes of the final video.
Composite video can include other composite videos, and so on, to build a tree of videos to be generated
Overview
Methods¶ append_video(video)Append a video to the list of videos to be mixed
Cleanse the video list by removing any empty composites videos
Get the background music prompt from the video list.
Get the build settings for children Video
Get the duration of the video, we recompute it every time
Get the title of the video, we recompute it every time
-
run_build_core_logic_hook(ml_models_gateway, build_settings)Mix all the videos in the list: here we actually build and stitch the videos together,
run_post_build_actions_hook(build_settings)-
run_pre_build_actions_hook(build_settings)-
Update the metadata post building
Members
- append_video(video: vikit.video.video.Video)¶
Append a video to the list of videos to be mixed
- params:
video: The video to be appended
- Returns:
The current object
- Return type:
self
- cleanse_video_list()¶
Cleanse the video list by removing any empty composites videos
- generate_background_music_prompt()¶
Get the background music prompt from the video list.
- Returns:
The background music prompt
- Return type:
- get_children_build_settings()¶
Get the build settings for children Video
- get_duration()¶
Get the duration of the video, we recompute it every time as the duration of the video can change if we add or remove videos
- get_title()¶
Get the title of the video, we recompute it every time as the title of the video can change if we add or remove videos
- is_composite_video()¶
- async run_build_core_logic_hook(ml_models_gateway, build_settings=VideoBuildSettings())¶
Mix all the videos in the list: here we actually build and stitch the videos together, will take some time and resources as we call external services and run video mixing locally.
Warning: order is very important here, and the first pass is supposed to happen from the root composite levels
Today we do generate the videos so the first ones are the ones that will be used to generate the final video This requires a specific order, and generating videos ahead of time won’t work unless you take care of building the videos in the child composite video list first.
- params:
build_settings: The settings to be used for the build
- Returns:
The current object
- Return type:
self
- async run_post_build_actions_hook(build_settings: vikit.video.video_build_settings.VideoBuildSettings)¶
- async run_pre_build_actions_hook(build_settings: vikit.video.video_build_settings.VideoBuildSettings)¶
- update_metadata_post_building()¶
Update the metadata post building