ktk.Player.to_video#
- Player.to_video(filename, *, fps=None, downsample=1, show_progress_bar=True)[source]#
Save the current view to an MP4 video file.
- Parameters:
filename (str) – Name of the video file to save.
fps (int | None) – Optional. Frames per second of the output video. Default is None, which means that fps matches the current playback speed of the Player. This attribute does not affect the number of images in the output video; it only affects the playback speed of the output video.
downsample (int) – Optional. Use it to reduce the file size on acquisitions at high sample rates. Default is 1, which means that the video is not downsampled. In this case, each index is exported as one frame of the output video. A value of 2 divides the number of frames by 2, which means that every other index is skipped. A value of 3 divides the number of frames by 3, etc.
show_progress_bar (bool) – Optional. True to show a progress bar while creating the video file.
- Return type:
None