spookyuser
commited on
Commit
·
9fc4674
1
Parent(s):
5f6f7a2
Fix path
Browse files- animate.py +1 -1
- app.py +1 -1
animate.py
CHANGED
@@ -230,5 +230,5 @@ def create_mp4_with_audio(frames, cv2_images, duration, audio, output_path):
|
|
230 |
new_clip = CompositeVideoClip([clip1, clip2, clip3])
|
231 |
new_clip.audio = audio # Naviely append audio without considering the length of the video, could be a problem, no idea, but it works, so I'm not touching it
|
232 |
new_clip.set_duration(duration)
|
233 |
-
new_clip.write_videofile(output_path, audio_codec="aac")
|
234 |
return output_path
|
|
|
230 |
new_clip = CompositeVideoClip([clip1, clip2, clip3])
|
231 |
new_clip.audio = audio # Naviely append audio without considering the length of the video, could be a problem, no idea, but it works, so I'm not touching it
|
232 |
new_clip.set_duration(duration)
|
233 |
+
new_clip.write_videofile(output_path.as_posix(), audio_codec="aac")
|
234 |
return output_path
|
app.py
CHANGED
@@ -91,7 +91,7 @@ def animate_images(image_paths: list[str], audio_input: AudioInput) -> str:
|
|
91 |
audio_input.start_time, audio_input.start_time + audio_input.run_for
|
92 |
)
|
93 |
video_frames, cv2_images = get_video_frames(image_paths, vid_output_dir)
|
94 |
-
path = Path(vid_output_dir / "output_final.mp4")
|
95 |
return create_mp4_with_audio(
|
96 |
video_frames, cv2_images, audio_clip.duration, audio_clip, path
|
97 |
)
|
|
|
91 |
audio_input.start_time, audio_input.start_time + audio_input.run_for
|
92 |
)
|
93 |
video_frames, cv2_images = get_video_frames(image_paths, vid_output_dir)
|
94 |
+
path = Path(vid_output_dir / "output_final.mp4")
|
95 |
return create_mp4_with_audio(
|
96 |
video_frames, cv2_images, audio_clip.duration, audio_clip, path
|
97 |
)
|