示例:
from moviepy.editor import VideoFileClip
if __name__ == "__main__":
video_path = './1.mp4'
clip = VideoFileClip(video_path)
# clip.write_gif('Dynamic_graph.gif')
clip.write_gif("Dynamic_graph.gif", fps=60) # 设置为每秒60帧,这将直接影响gif文件的大小