Closed
Description
You have to set one before importing animation:
# Must be set before the animation import
mpl.rcParams['animation.ffmpeg_path'] = "C:\\Users\\jschulz\\Dropbox\\Programme\\cmder\\vendor\\jasc\\ffmpeg.exe"
import matplotlib.animation as animation
Without:
C:\portabel\miniconda\envs\katins2\lib\site-packages\matplotlib\animation.py:781: UserWarning: MovieWriter ffmpeg unavailable
warnings.warn("MovieWriter %s unavailable" % writer)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-2c23ec3f11d2> in <module>()
25
26 ani = animation.FuncAnimation(plt.gcf(), updatefig, frames=40, init_func=initfig)
---> 27 ani.save('_movie.mp4')
C:\portabel\miniconda\envs\katins2\lib\site-packages\matplotlib\animation.pyc in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs)
786 metadata=metadata)
787 except IndexError:
--> 788 raise ValueError("Cannot save animation: no writers are "
789 "available. Please install mencoder or "
790 "ffmpeg to save animations.")
ValueError: Cannot save animation: no writers are available. Please install mencoder or ffmpeg to save animations.
This runtime error should give that information: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/animation.py#L788
Metadata
Metadata
Assignees
Labels
No labels