来自moviepy的FileNotFoundError

时间:2014-09-28 08:44:54

标签: python moviepy

我正在尝试从此tutorial复制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

0 个答案:

没有答案