From 3e793ce2b17ca793f33de95ee987688bd93205a0 Mon Sep 17 00:00:00 2001 From: Javanaut Date: Sat, 21 Oct 2023 13:27:20 +0200 Subject: [PATCH] fixes --- bin/ffx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ffx.py b/bin/ffx.py index dc02516..8df047f 100755 --- a/bin/ffx.py +++ b/bin/ffx.py @@ -8,6 +8,8 @@ DEFAULT_STEREO_BANDWIDTH = "128" DEFAULT_AC3_BANDWIDTH = "256" DEFAULT_DTS_BANDWIDTH = "320" +TEMP_FILE_NAME = "ffmpeg2pass-0.log" + def executeProcess(commandSequence): process = subprocess.Popen(commandSequence, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -194,7 +196,8 @@ for quality in qualities: print(f"Command Sequence 1: {commandSequence1}") - os.remove("ffmpeg2pass-0.log") + if os.path.exists(TEMP_FILE_NAME): + os.remove(TEMP_FILE_NAME) executeProcess(commandSequence1)