Spaces:
Runtime error
Runtime error
Update tools.py
Browse files
tools.py
CHANGED
@@ -169,7 +169,8 @@ def create_video_from_images_and_audio(images_dir, speeches_dir, final_video_fil
|
|
169 |
clips.append(final_clip)
|
170 |
|
171 |
final_clip = concatenate_videoclips(clips)
|
172 |
-
|
|
|
173 |
final_clip.write_videofile(final_video_filename, codec='libx264', fps=24)
|
174 |
|
175 |
# Close all video files properly
|
|
|
169 |
clips.append(final_clip)
|
170 |
|
171 |
final_clip = concatenate_videoclips(clips)
|
172 |
+
if not final_video_filename.endswith('.mp4'):
|
173 |
+
final_video_filename = final_video_filename + '.mp4'
|
174 |
final_clip.write_videofile(final_video_filename, codec='libx264', fps=24)
|
175 |
|
176 |
# Close all video files properly
|