Matplotlib-Animation “No MovieWriters Available”

后端 未结 8 1192
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-07 18:40

Under Linux, I\'ve been checking out matplotlib\'s animation class, and it seems to work except that I cant initialise the movie writer to write out the movie.

Using

8条回答
  •  孤城傲影
    2020-12-07 18:57

    (be sure to follow JPH feedback above about the proper ffmpeg download) Not sure why, but in my case here is the one that worked (in my case was on windows).

    Initialize a writer:

    import matplotlib.pyplot as plt
    import matplotlib.animation as animation
    Writer = animation.FFMpegWriter(fps=30, codec='libx264')  #or 
    Writer = animation.FFMpegWriter(fps=20, metadata=dict(artist='Me'), bitrate=1800) ==> This is WORKED FINE ^_^
    

    Writer = animation.writers['ffmpeg'] ==> GIVES ERROR ""RuntimeError: Requested MovieWriter (ffmpeg) not available""

提交回复
热议问题