我正試圖編寫一個在Mac OS 10.11.16上使用MoviePy將Python文件轉換爲GIF的Python程序。我使用:我在Mac OS上安裝ffmpeg時遇到困難,所以我可以使用MoviePy。我已經完成了研究,但沒有任何工作。有什麼建議麼?
import moviepy.editor as mp
,我得到一個錯誤說我需要調用imageio.plugins.ffmpeg.download()
這樣我就可以下載的ffmpeg。我使用:
import imageio
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 "<pyshell#2>", line 1, 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.
我肯定有互聯網連接。我發現this鏈接,並嘗試安裝Homebrew和靜態構建,但都沒有工作。似乎編譯它自己對我來說有點太高級了(我只是簡單地研究過它)。我在IDLE上使用了imageio.plugins.ffmpeg.download()
。我讀了一些關於使用PyCharm來運行MoviePy代碼的內容,但是我得到了相同的初始錯誤。 ffmpeg目前在我的/usr/local/bin
文件夾中。歡迎任何建議。感謝您的幫助。
編輯:我使用Python 3.6.1
嘗試在imageio的GitHub問題跟蹤器上報告它嗎? – tburrows13