From 6824763a4111dc269295dca4f5298ea7f66243c5 Mon Sep 17 00:00:00 2001 From: ZillaRU Date: Tue, 13 Aug 2024 12:03:43 +0800 Subject: [PATCH] add messages for exceptions --- modules/utilities.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/utilities.py b/modules/utilities.py index 782395f..34f9118 100644 --- a/modules/utilities.py +++ b/modules/utilities.py @@ -27,7 +27,8 @@ def run_ffmpeg(args: List[str]) -> bool: subprocess.check_output(commands, stderr=subprocess.STDOUT) return True except Exception: - pass + print(' '.join(commands), "failed, please check the ffmpeg installation!") + exit(-1) return False @@ -38,7 +39,7 @@ def detect_fps(target_path: str) -> float: numerator, denominator = map(int, output) return numerator / denominator except Exception: - pass + print(' '.join(commands), "failed, please check the ffprobe installation!") return 30.0