0
我對matplotlib和動畫相當陌生,使用pyplot.show
時我使用的動畫,但當試圖使用animation.save
函數時,輸出的唯一東西是一個0秒的視頻,動畫的框架。保存matplotlib.animation輸出一個0秒的視頻
這是我的代碼:
plt.rcParams['animation.ffmpeg_path'] = r'C:\FFMPEG\bin\ffmpeg.exe'
FFwriter = animation.FFMpegWriter()
video_ani.save('basic_animation1.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])
任何幫助,將不勝感激,謝謝