From 1c9f5e4ae685a957a29100e7ade1ac365149c218 Mon Sep 17 00:00:00 2001 From: tassaron Date: Thu, 21 Apr 2022 01:05:55 -0400 Subject: fix crash if ffmpeg is not installed (tested on windows 11) --- src/video_thread.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/video_thread.py') diff --git a/src/video_thread.py b/src/video_thread.py index 91ebe93..4a07fb2 100644 --- a/src/video_thread.py +++ b/src/video_thread.py @@ -244,9 +244,15 @@ class Worker(QtCore.QObject): ) self.staticComponents[compNo] = None - ffmpegCommand = createFfmpegCommand( - self.inputFile, self.outputFile, self.components, duration - ) + try: + ffmpegCommand = createFfmpegCommand( + self.inputFile, self.outputFile, self.components, duration + ) + except sp.CalledProcessError as e: + self.components[0]._error.emit("Ffmpeg could not be found. Is it installed?", str(e)) + self.cancelExport() + return + cmd = " ".join(ffmpegCommand) print('###### FFMPEG COMMAND ######\n%s' % cmd) print('############################') -- cgit v1.2.3