Python上的ffmpeg plagin imageio

时间:2017-03-23 23:00:44

标签: python-imageio

我只是试着打电话

  

从moviepy.editor导入VideoFileClip

但我收到此错误

File "/Users/macbook/python/main_video.py", line 3, in <module>
        from moviepy.editor import VideoFileClip
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/moviepy/editor.py", line 22, in <module>
        from .video.io.VideoFileClip import VideoFileClip
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/moviepy/video/io/VideoFileClip.py", line 3, in <module>
        from moviepy.video.VideoClip import VideoClip
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/moviepy/video/VideoClip.py", line 20, in <module>
        from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_writer.py", line 19, in <module>
        from moviepy.config import get_setting
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/moviepy/config.py", line 38, in <module>
        FFMPEG_BINARY = get_exe()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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()

如果我试着打电话给这个

  

imageio.plugins.ffmpeg.download()

答案是

Imageio: 'ffmpeg.osx' was not found on your computer; downloading it now.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>.
Error while fetching file: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>.
Traceback (most recent call last):
  File "/Users/macbook/python/test.py", line 29, in <module>
    imageio.plugins.ffmpeg.download()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 55, in download
    get_remote_file('ffmpeg/' + FNAME_PER_PLATFORM[plat])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 121, in get_remote_file
    _fetch_file(url, filename)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 177, in _fetch_file
    os.path.basename(file_name))
OSError: Unable to download 'ffmpeg.osx'. Perhaps there is a no internet connection? If there is, please report this problem.

我能做些什么?

1 个答案:

答案 0 :(得分:0)

TRY

import imageio
imageio.plugins.ffmpeg.download()

在代码中包含上面的行。我遇到了同样的问题see the given pic,这解决了它。 否则请检查您的互联网连接。