需要PyGame
You must execute VideoFileClip before previewing.
The method askopenfile selects a file.
Execute clip = VideoFileClip(file.name) for creating VideoFileClip object.
Then you can execute clip.without_audio().preview().
For more details see: MoviePy – Previewing a Video Clip.
When executing the code, I was getting an error message:
clip.preview requires Pygame installed
I has to install pygame.
Here is a code sample for selecting and previewing a video file:
from tkinter.filedialog import askopenfile
from moviepy.editor import *
file = askopenfile(initialdir = ".", title="choose a video", filetype=[("Video Files","*.mp4")])