From 3515afe7f18aa595dce3476b67e262e3ee789e3f Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 16 Apr 2023 14:42:22 +0200 Subject: [PATCH] Display ffmpeg error if any --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b7a1b7f..d2273c6 100755 --- a/main.py +++ b/main.py @@ -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: