2017-07-03 29 views
-1

Windows 10/Python 3.6.1/Sublime Text Editor 3で以下のサンプルコードを実行しようとすると、タイトルにエラーが表示されます。 MAGICK_HOME ImageMagickを手動でインストールした場所を指す環境変数。 ImageMagickを1バージョンしかインストールしていないことを確認しました。 FFMPEG、Numpy、imageio、Decorator、tqdmがすべてインストールされていることを確認しました。MoviePyエラー:指定されたファイルが見つかりません

はい、「vidclip.mp4」というファイルが存在します。ここで望ましい動作は、単純に動画をクリップし、githubページの例に従って中央にテキストを追加することです。つまり、コードを正常に実行するだけです。

何が間違っているかも知っていますか? githubから

例コード:

from moviepy.editor import * 

video = VideoFileClip("vidclip.mp4").subclip(7,64) 

# Make the text. Many more options are available. 
txt_clip = (TextClip("Ken Block who?",fontsize=70,color='white') 
      .set_position('center') 
      .set_duration(10)) 

result = CompositeVideoClip([video, txt_clip]) # Overlay text on video 
result.write_videofile("vidclip_edited.webm",fps=25) # Many options... 

完全なエラー・トレース:

Traceback (most recent call last): 
    File "C:\Users\av\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\VideoClip.py", line 1220, in __init__ 
    subprocess_call(cmd, verbose=False) 
    File "C:\Users\av\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\tools.py", line 42, in subprocess_call 
    proc = sp.Popen(cmd, **popen_params) 
    File "C:\Users\av\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 707, in __init__ 
    restore_signals, start_new_session) 
    File "C:\Users\av\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 990, in _execute_child 
    startupinfo) 
FileNotFoundError: [WinError 2] The system cannot find the file specified 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Users\av\Desktop\Desktop\Projects\Youtube\blender\test\testMoviePy.py", line 6, in <module> 
    txt_clip = (TextClip("Ken Block who?",fontsize=70,color='white') 
    File "C:\Users\av\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\VideoClip.py", line 1229, in __init__ 
    raise IOError(error) 
OSError: MoviePy Error: creation of None failed because of the following error: 

[WinError 2] The system cannot find the file specified. 

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or.that the path you specified is incorrect 
+0

downvoteの理由は何ですか?私はその質問を解決してうれしいです。 – JohnSmithy1266

答えて

0

は、問題を発見しました。私はそれが命令であることを認識しませんでした。ImageMagickのファイル内にffmpeg.execonvert.exeの位置を指定しています。その後、MoviePyをインストールします(この順番で)。

関連する問題