sreepathi-ravikumar commited on
Commit
7e426ee
·
verified ·
1 Parent(s): 8e3c369

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -89,10 +89,17 @@ def generate_video():
89
  if not image_files:
90
  raise ValueError("No images found in folder!")
91
 
92
- clips = [ImageClip(m).set_duration(5) for m in image_files]
93
- video = concatenate_videoclips(clips, method="compose")
 
 
 
 
 
 
 
94
  video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
95
- video.write_videofile(video_path, fps=24)
96
  for img in image_files:
97
  os.remove(img)
98
 
 
89
  if not image_files:
90
  raise ValueError("No images found in folder!")
91
 
92
+
93
+ for id in range(len(lines)):
94
+ video_func(id)
95
+ clips = []
96
+ for id in range(len(lines)):
97
+ clip = VideoFileClip(f"clip{id}.mp4")
98
+ clips.append(clip)
99
+
100
+ final_video = concatenate_videoclips(clips)
101
  video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
102
+ final_video.write_videofile(video_path", fps=24)
103
  for img in image_files:
104
  os.remove(img)
105