Display ffmpeg error if any

This commit is contained in:
Simon committed 2023-04-16 14:42:22 +02:00
1 parent 26d58ad29d
commit 3515afe7f1
1 file changed
+6 -1
+6 -1
View File
@@ -6,6 +6,7 @@ from os import name
from pathlib import Path
from subprocess import Popen
import ffmpeg
from prawcore import ResponseException
from utils.console import print_substep
from reddit.subreddit import get_subreddit_threads
@@ -53,7 +54,11 @@ def main(POST_ID=None) -> None:
bg_config = get_background_config()
download_background(bg_config)
chop_background_video(bg_config, length, reddit_object)
make_final_video(number_of_comments, length, reddit_object, bg_config)
try:
make_final_video(number_of_comments, length, reddit_object, bg_config)
except ffmpeg.Error as e:
print(e.stderr.decode("utf8"))
exit(1)
def run_many(times) -> None: