python - 由于ffmpeg不可用,matplotlib动画ArtistAnimation失败

标签 python matplotlib ffmpeg ubuntu-14.04

我试图调用 matplotlib.animation.ArtistAnimation 从一系列 png 图像制作动画,但出现与 ffmpeg 连接的错误。我在 Ubuntu 14.04 上安装了 Anaconda。我收到的错误消息是:

UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py:782: UserWarning: MovieWriter ffmpeg unavailable
  warnings.warn("MovieWriter %s unavailable" % writer)
...
  File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 810, in save
    writer.grab_frame(**savefig_kwargs)
  File "/home/ohm/anaconda2/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 196, in saving
    self.finish()
  File "/home/ohm/anaconda2/lib/python2.7/site-packages/matplotlib/animation.py", line 389, in finish
    + ' Try running with --verbose-debug')
RuntimeError: Error creating movie, return code: 1 Try running with --verbose-debug

我尝试过sudo apt-get install ffmpeg,但没有这样的包。有人知道我缺少什么包裹吗?

最佳答案

conda update conda
conda install --channel https://conda.anaconda.org/conda-forge ffmpeg

关于python - 由于ffmpeg不可用,matplotlib动画ArtistAnimation失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37878769/

相关文章:

windows-10 - 尝试为 Windows 10 (x86_64) 静态编译 FFmpeg 4.2.3,但二进制文件要求缺少 DLL

python - 将数字连接到一个文件中

python - 通过 uWSGI 时 Flask debug=True 不起作用

python - 在 matplotlib 中以编程方式绘制重叠偏移图

python - 对于具有自定义级别的 matplotlib contourf 图,颜色图被忽略

ffmpeg - 从视频文件ffmpeg中删除流

python - 使用 x 和 y 的数据框通过 Matplotlib 生成直方图

python - 如何在 Python 中使用 selenium 滚动到页面末尾?

python - for循环中matplotlib中的多个图例

php - 如何通过mplayer或ffmpeg将视频拍照转php?