fedoo.MultiFrameDataSet.write_movie
- MultiFrameDataSet.write_movie(filename: str = 'test', field: str | None = None, component: int | str = 0, data_type: str | None = None, **kargs)
Create a video from the data.
Generate a video by loading iteratively every frame. This method rely on the
fedoo.DataSet.plot()and then accept the all its arguments as keyword arguments.- Parameters:
filename (str) – Name of the video file to write. The type of video generated depend on the file extension. If no extension provided, a ‘mp4’ file will be written.
field (str (optional)) – Name of the field to plot. If no field provided, only the mesh is ploted.
component (int, str (default = 0)) – The data component to plot in case of vector data
data_type (str in {'Node', 'Element' or 'GaussPoint'}, optional) – Type of the data. By default, the data_type is determined automatically by scanning the data arrays.
**kargs (dict) – Other optional parameters. See notes below.
Notes
Many options are available as keyword args. Refer to the documentation of
fedoo.DataSet.plot()method for details. Below, only the specific arguments are presented.Available keyword arguments are:
- climsequence[float|None] or None
Sequence of two float to define data boundaries for colorbar. If clim is None, clim change at each iteration with the min and max. If one of the boundary is set to None, the value is replace by the min or max of data for the all iterations sequence. Defaults to minimum and maximum of data for the all iterations sequence, ie clim =[None,None].
- framerateint, default = 24
Number of frames per second
- qualityint between 1 and 10, default = 5
Define the quality of the writen movie if the movie writer accept this parameter. Higher is better but take more place.
- azimuthscalar, default = 30
Angle of azimuth (degree) at the begining of the video.
- elevationscalar, default = 15
Angle of elevation (degree) at the begining of the video.
- rot_azimuthscalar, default = 0
Angle of azimuth rotation that is made at each new frame. Used to make easy video with camera moving around the scene.
- rot_elevationscalar, default = 0
Angle of elevation rotation that is made at each new frame. Used to make easy video with camera moving around the scene.
- window_sizelist of int (default = [1024, 768])
Size of the video in pixel