moviepy报错
Traceback (most recent call last):
File “julia_gif.py”, line 5, in
from moviepy.editor import ImageSequenceClip
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\editor.py”, line 22, in
from .video.io.VideoFileClip import VideoFileClip
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\VideoFileClip.py”, line 3, in
from moviepy.video.VideoClip import VideoClip
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\VideoClip.py”, line 21, in
from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\ffmpeg_writer.py”, line 11, in
from moviepy.config import get_setting
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\config.py”, line 35, in
FFMPEG_BINARY = get_exe()
File “C:\Users\yang\AppData\Local\Programs\Python\Python36\lib\site-packages\imageio\plugins\ffmpeg.py”, line 86, in get_exe
raise NeedDownloadError(‘Need ffmpeg exe. ‘
imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
imageio.plugins.ffmpeg.download()
解决办法:
下载ffmpeg.win32.exe到你的电脑。
确认你是windows系统, 因为我现在是在windows下开发的.
下载ffmpeg.win32.exe, 因为国外网站容易被墙, 所以我这里提供了自己的下载地址:ffmpeg.win32
放到ffmpeg的appdata文件夹下, 我的文件夹路径是C:\Users\yangt\AppData\Local\imageio\ffmpeg, 你的路径很可能是只需要改一下系统用户名yangt
确保放进去的文件名一定改成ffmpeg.win32.exe, 因为程序里就是硬编码的这个文件名.
问题解决, 测试一下