I tried running simple moviepy code. It does not save anything. Exit code 0. No error message. No sucessfully saved print. I have the newest version of moviepy and ffmpeg. Doesnt work with or without specifying an output directory. I am on windows 10, working in PyCharm with Python 3.9 . I am super new to coding if it isnt obvious, thankful for any help!! Here is the code I used:
from moviepy.editor import VideoClip
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter
w, h = 640, 480
red = int(255 * t)
green = int(255 * (1 - t))
blue = 0
frame = np.zeros((h, w, 3), dtype=np.uint8)
frame[:, :, 0] = red
frame[:, :, 1] = green
frame[:, :, 2] = blue
return frame
duration = 5 # in seconds
fps = 30
width, height = 640, 480
video_clip = VideoClip(make_frame, duration=duration)
output_path = "output.mp4"
video_clip.write_videofile(output_path, fps=fps, codec='libx264')
print("File saved successfully!")
I was expecting to get any file saved at all. Nothing shows up in my folder. I have double checked MoviePy and ffmpeg as stated.