我正在尝试从本教程中复制一个 gif 转换器,但它仍然给我错误。
我安装了所有依赖项moviepy
并遵循了所有说明。
我正在使用 Windows 8.1 64 位
from moviepy.editor import *
clip = (VideoFileClip("C:\abi\youtubetogif_project\a.mp4")
.resize(0.5))
clip.write_gif("a.gif")
改变路径,改变视频仍然不起作用
编辑:使用这样的双反斜杠"C:\\abi\\youtubetogif_project\\a.mp4"
仍然给我错误
例外
Traceback (most recent call last):
File "C:\abi\youtubetogif_project\test.py", line 3, in <module>
clip = VideoFileClip("C:\abi\youtubetogif_project\a.mp4")
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\video\io\VideoFileClip.py", line 55, in __init__
self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\video\io\ffmpeg_reader.py", line 22, in __init__
infos = ffmpeg_parse_infos(filename, print_infos, check_duration)
File "C:\Python34\lib\site-packages\moviepy-0.2.1.8.12-py3.4.egg\moviepy\video\io\ffmpeg_reader.py", line 209, in ffmpeg_parse_infos
stderr=sp.PIPE)
File "C:\Python34\lib\subprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1104, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified