Search…
video

Contents

Video

__init__ [#19]

Check the source code online
1
def __init__(self, *args, fmt='mp4', **kwargs):
Copied!
  docstring:
no docstring

get_cap_from_images_folder [#23]

Check the source code online
1
def get_cap_from_images_folder(self, img_format='%1d.png'):
Copied!
  docstring:
1
It creates a cv2 VideoCaptur 'cap' from a folder of images (frames)
Copied!

close [#46]

Check the source code online
1
def close(self):
Copied!
  docstring:
1
Takes a folder full of frames saved as images and converts it into a
2
video.
Copied!

BasicVideoMaker

1
Wrapper around vedo Video class to facilitate the creation of videos from
2
brainrender scenes.
3
​
4
Use kwargs to specify:
5
- save_fld: folder where to save video
6
- save_name: video name
7
- video_format: e.g. mp4
8
- duration: video duration in seconds
9
- niters: number of iterations (frames) when creating the video
10
- fps: framerate of video
Copied!

__init__ [#79]

Check the source code online
1
def __init__(self, scene, **kwargs):
Copied!
  docstring:
no docstring

parse_kwargs [#95]

Check the source code online
1
def parse_kwargs(self, **kwargs):
Copied!
  docstring:
1
Parses arguments for video creation
2
​
3
Use kwargs to specify:
4
​
5
- save_fld: folder where to save video
6
​
7
- save_name: video name
8
​
9
- video_format: e.g. mp4
10
​
11
- duration: video duration in seconds
12
​
13
- niters: number of iterations (frames) when creating the video
14
​
15
- fps: framerate of video
16
​
17
Arguments not specified in kwargs will be assigned default values
Copied!

make_video [#115]

Check the source code online
1
def make_video(self, azimuth=0, elevation=0, roll=0, **kwargs):
Copied!
  docstring:
1
Creates a video using user defined parameters
2
​
3
:param azimuth: integer, specify the rotation in degrees per frame on
4
the relative axis. (Default value = 0)
5
​
6
:param elevation: integer, specify the rotation in degrees per frame
7
on the relative axis. (Default value = 0)
8
​
9
:param roll: integer, specify the rotation in degrees per frame on the
10
relative axis. (Default value = 0)
11
​
12
:param kwargs: use to change destination folder, video name, fps,
13
duration ... check 'self.parse_kwargs' for details.
Copied!

CustomVideoMaker

1
Subclasses BasicVideoMaker and replaces make_video method.
Copied!

__init__ [#163]

Check the source code online
1
def __init__(self, scene, **kwargs):
Copied!
  docstring:
no docstring

make_video [#166]

Check the source code online
1
def make_video(self, video_function, **kwargs):
Copied!
  docstring:
1
Let's users use a custom function to create the video.
2
​
3
The custom function must:
4
​
5
- have a 'scene' keyword argument to accept a Scene() instance
6
​
7
- have a 'videomaker' keyword argument to accept the CustomVideoMaker
8
(self) instance
9
​
10
- have a 'video' keyword that takes the Video argument
11
​
12
- return the instance of Video
13
​
14
The custom function can manipulate actors and camera in the scene and
15
​
16
add frames to the video with 'video.addFrame()'.
17
​
18
Once all frames are ready it has to return the video object
19
​
20
so that the video can be closed and saved.
21
​
22
:param video_function: custom function used to generate the video's
23
frames
24
​
25
see: examples/advanced/custom_videomaker.py
Copied!
Last modified 1yr ago