Check the source code
online
def __init__(self, *args, fmt='mp4', **kwargs):
docstring:
no docstring
Check the source code
online
def get_cap_from_images_folder(self, img_format='%1d.png'):
docstring:
It creates a cv2 VideoCaptur 'cap' from a folder of images (frames)
Check the source code
online
def close(self):
docstring:
Takes a folder full of frames saved as images and converts it into a
video.
Wrapper around vedo Video class to facilitate the creation of videos from
brainrender scenes.
Use kwargs to specify:
- save_fld: folder where to save video
- save_name: video name
- video_format: e.g. mp4
- duration: video duration in seconds
- niters: number of iterations (frames) when creating the video
- fps: framerate of video
Check the source code
online
def __init__(self, scene, **kwargs):
docstring:
no docstring
Check the source code
online
def parse_kwargs(self, **kwargs):
docstring:
Parses arguments for video creation
Use kwargs to specify:
- save_fld: folder where to save video
- save_name: video name
- video_format: e.g. mp4
- duration: video duration in seconds
- niters: number of iterations (frames) when creating the video
- fps: framerate of video
Arguments not specified in kwargs will be assigned default values
Check the source code
online
def make_video(self, azimuth=0, elevation=0, roll=0, **kwargs):
docstring:
Creates a video using user defined parameters
:param azimuth: integer, specify the rotation in degrees per frame on
the relative axis. (Default value = 0)
:param elevation: integer, specify the rotation in degrees per frame
on the relative axis. (Default value = 0)
:param roll: integer, specify the rotation in degrees per frame on the
relative axis. (Default value = 0)
:param kwargs: use to change destination folder, video name, fps,
duration ... check 'self.parse_kwargs' for details.
Subclasses BasicVideoMaker and replaces make_video method.
Check the source code
online
def __init__(self, scene, **kwargs):
docstring:
no docstring
Check the source code
online
def make_video(self, video_function, **kwargs):
docstring:
Let's users use a custom function to create the video.
The custom function must:
- have a 'scene' keyword argument to accept a Scene() instance
- have a 'videomaker' keyword argument to accept the CustomVideoMaker
(self) instance
- have a 'video' keyword that takes the Video argument
- return the instance of Video
The custom function can manipulate actors and camera in the scene and
add frames to the video with 'video.addFrame()'.
Once all frames are ready it has to return the video object
so that the video can be closed and saved.
:param video_function: custom function used to generate the video's
frames
see: examples/advanced/custom_videomaker.py