Update video2.py
Browse files
video2.py
CHANGED
|
@@ -351,4 +351,14 @@ def video_func(id, lines, lang):
|
|
| 351 |
return final_video_path
|
| 352 |
else:
|
| 353 |
print("Video generation failed.")
|
| 354 |
-
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
return final_video_path
|
| 352 |
else:
|
| 353 |
print("Video generation failed.")
|
| 354 |
+
return None
|
| 355 |
+
|
| 356 |
+
def video_com(lines):
|
| 357 |
+
video_path = f"/tmp/video_{uuid.uuid4().hex}.mp4"
|
| 358 |
+
clips = []
|
| 359 |
+
for id in range(len(lines)):
|
| 360 |
+
clip = f"/app/data/video/clip{id}.mp4"
|
| 361 |
+
clips.append(clip)
|
| 362 |
+
|
| 363 |
+
video_path = rust_combiner.combine_clips(clips)
|
| 364 |
+
return video_path
|