Update final_video.py

pull/1583/head
Hassan Hossam 2 years ago committed by GitHub
parent f2d89a10dd
commit 0e888bc1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -99,7 +99,14 @@ def prepare_background(reddit_id: str, W: int, H: int) -> str:
try:
output.run(quiet=True)
except Exception as e:
print(e)
print('An error occurred while running...')
print('trying auto error fixing...')
try:
os.remove(f"assets/temp/{reddit_id}/background.mp4")
os.remove(f"assets/temp/{reddit_id}/background_noaudio.mp4")
prepare_background(reddit_id, W, H)
except:
print('Please Rerun the script ')
exit()
return output_path
@ -303,7 +310,7 @@ def make_final_video(
text = f"Background by {background_config[2]}"
background_clip = ffmpeg.drawtext(
background_clip,
text=text,
text=(''),
x=f"(w-text_w)",
y=f"(h-text_h)",
fontsize=12,

Loading…
Cancel
Save