【发布时间】:2017-07-04 15:34:07
【问题描述】:
我对 matplotlib 和动画相当陌生,我在使用 pyplot.show 时可以使用动画,但在尝试使用 animation.save 函数时,唯一输出的是带有动画初始帧的 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'])
任何帮助将不胜感激,谢谢
【问题讨论】:
标签: python animation matplotlib ffmpeg