taichi.tools.video

Module Contents

Classes

VideoManager

Functions

scale_video(input_fn, output_fn, ratiow, ratioh)

crop_video(input_fn, output_fn, x_begin, x_end, y_begin, y_end)

accelerate_video(input_fn, output_fn, speed)

get_ffmpeg_path()

mp4_to_gif(input_fn, output_fn, framerate)

interpolate_frames(frame_dir, mul=4)

ffmpeg_common_args(frame_rate, input_fn, width, height, crf, output_path)

make_video(input_files, width=0, height=0, frame_rate=24, crf=20, output_path='video.mp4')

Attributes

FRAME_FN_TEMPLATE

FRAME_DIR

taichi.tools.video.FRAME_FN_TEMPLATE = %06d.png
taichi.tools.video.FRAME_DIR = frames
taichi.tools.video.scale_video(input_fn, output_fn, ratiow, ratioh)
taichi.tools.video.crop_video(input_fn, output_fn, x_begin, x_end, y_begin, y_end)
taichi.tools.video.accelerate_video(input_fn, output_fn, speed)
taichi.tools.video.get_ffmpeg_path()
taichi.tools.video.mp4_to_gif(input_fn, output_fn, framerate)
class taichi.tools.video.VideoManager(output_dir, width=None, height=None, post_processor=None, framerate=24, automatic_build=True)
get_output_filename(self, suffix)
write_frame(self, img)
get_frame_directory(self)
write_frames(self, images)
clean_frames(self)
make_video(self, mp4=True, gif=True)
taichi.tools.video.interpolate_frames(frame_dir, mul=4)
taichi.tools.video.ffmpeg_common_args(frame_rate, input_fn, width, height, crf, output_path)
taichi.tools.video.make_video(input_files, width=0, height=0, frame_rate=24, crf=20, output_path='video.mp4')