File size: 334 Bytes
cbe3ce3
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
from moviepy.editor import TextClip, CompositeVideoClip

def generate_simple_video(prompt):
    txt_clip = TextClip(prompt, fontsize=70, color='white')
    txt_clip = txt_clip.set_duration(5)  # 5-second video with text
    video = CompositeVideoClip([txt_clip])
    video.write_videofile("output.mp4", fps=24)
    return "output.mp4"