python-3.x - MovieWriter (ffmpeg) 不可用 PyCharm (Windows)
问题描述
我已按照说明下载 ffmpeg 并根据 Matplotlib-Animation "No MovieWriters Available"添加路径 虽然我可以在 Windows 控制台上的命令提示符和 Bash 中输入版本,但心爱的 PyCharm 警告我:
Requested MovieWriter (ffmpeg) not available
当我尝试保存动画时:
ani = anim.FuncAnimation(fig, animate, frames = 14, init_func = init, interval = 500, repeat = False)
plt.show()
ani.save("Inno.mp4", writer=writer)
我必须添加另一条路径吗?请帮帮我,我真的厌倦了这个错误。
解决方案
可以直接指定ffmpeg路径,如下:
plt.rcParams['animation.ffmpeg_path'] = 'ffmpeg path on your machine' (e.g.: "C:\FFmpeg\bin\ffmpeg.exe")
或尝试在您的 cmd 上调用 ffmpeg 以确保已在您的环境变量中正确定义其路径。
要在确保正确定义路径后获取路径,请在您的 cmd 中写入:
where ffmpeg
推荐阅读
- google-apps-script - 使用云端硬盘搜索结果会导致迭代器错误
- python - tf.image.sample_distorted_bounding_box 中“bounding_boxes”和“min_object_covered”的功能?
- android - 如何根据条件显示布局?
- nginx - nginx配置与位置具有不同的根
- android - 后台定位服务奥利奥
- python - 使用 ftplib python 访问 ftp 目录
- java - Eclipse 无法识别 /plugins 文件夹下的新插件
- java - 使用 URL 类进入下一页
- qgis - QGIS:将ID从多边形添加到重叠多边形
- jasper-reports - 使用 jaspersoft ireport 5.6.0 在 php 中生成 pdf。pdf上的阿拉伯语问题