Spaces:
Sleeping
Sleeping
Update Milestone5API.py
Browse files- Milestone5API.py +1 -1
Milestone5API.py
CHANGED
|
@@ -19,7 +19,7 @@ def add_text_to_video(input_video_path, output_video_path, text, new_video_path)
|
|
| 19 |
'-i', input_video_path,
|
| 20 |
'-vf', f"drawtext=text='{text}':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2",
|
| 21 |
'-c:a', 'copy',
|
| 22 |
-
|
| 23 |
],check=True, stdout=subprocess.PIPE)
|
| 24 |
print("Text added to video successfully.")
|
| 25 |
except subprocess.CalledProcessError as e:
|
|
|
|
| 19 |
'-i', input_video_path,
|
| 20 |
'-vf', f"drawtext=text='{text}':fontsize=24:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2",
|
| 21 |
'-c:a', 'copy',
|
| 22 |
+
new_video_path
|
| 23 |
],check=True, stdout=subprocess.PIPE)
|
| 24 |
print("Text added to video successfully.")
|
| 25 |
except subprocess.CalledProcessError as e:
|