【问题标题】:Requested MovieWriter (ffmpeg) not available even when I installed it即使我安装了请求的 MovieWriter (ffmpeg) 也不可用
【发布时间】:2020-08-20 18:46:07
【问题描述】:

我正在运行这个命令。

import bar_chart_race as bcr
bcr.bar_chart_race(df=covid_df,filename=None,figsize=(3.5,3),title='Covid-19 Cases by State',n_bars=10)

得到以下错误

Exception: You do not have ffmpeg installed on your machine. Download
                            ffmpeg from here: https://www.ffmpeg.org/download.html.
                            
                            Matplotlib's original error message below:

                            Requested MovieWriter (ffmpeg) not available

已经安装了模块

D:\py\Scripts>pip install ffmpeg-python
Requirement already satisfied: ffmpeg-python in d:\py\lib\site-packages (0.1)

D:\py\Scripts>

【问题讨论】:

    标签: python ffmpeg


    【解决方案1】:

    ffmpeg-python 模块和 ffmpeg 是两个不同的东西。您需要从错误消息的链接安装ffmpeg

    https://www.ffmpeg.org/download.html

    【讨论】:

    • 由于系统策略,我无法从我的系统下载外部应用程序。有其他方法吗?
    • 我的意思是我可以下载但不能安装
    • 根据bar_chart_race你需要ffmpeg或者magick dexplo.org/bar_chart_race/installation。您可以尝试找到另一个使用 ffmpeg-python 的库,到目前为止我不知道。 Matplotlib 有更多种类的视频编写器,您可能会在其中找到适合您的东西。
    • @EXODIA 您无法安装它,因为它“只”需要解压缩并将 bin 文件夹添加到路径变量中?
    【解决方案2】:

    对于那些能够下载 ffmpeg 文件的人。以下是激活它的步骤。

    1. 使用 pip 或 conda 在你的 cmd 中安装 ffmpeg:

      conda install -c conda-forge ffmpeg
      

      pip install ffmpeg-python    
      
    2. 从以下页面下载 ffmpeg zip 文件: https://ffmpeg.zeranoe.com/builds/

      由于我有 Windows 操作系统,我需要将 ffmpeg 的 bin 文件夹放入路径中。例如,解压缩您下载的文件并将其复制粘贴到您的 C: 中。使用此link 中的步骤将 bin 文件夹放到路径中。

    注意!完成这些步骤后,您可以通过在终端中运行以下命令来检查安装情况:

    ffmpeg -version
    

    在这种情况下,您不应该看到:“ffmpeg”未被识别为内部或外部经济指令。

    有关详细说明,请查看此webpage

    【讨论】:

      猜你喜欢
      • 2020-10-23
      • 2021-06-25
      • 2020-10-01
      • 2022-10-08
      • 2019-08-14
      • 1970-01-01
      • 2017-10-20
      • 2019-09-22
      • 2016-04-09
      相关资源
      最近更新 更多