From f88a0ef44f182e5efc6280716d7e56b24e00c746 Mon Sep 17 00:00:00 2001 From: Janis Hutz <98422316+simplePCBuilding@users.noreply.github.com> Date: Wed, 15 Mar 2023 12:13:00 +0000 Subject: [PATCH] Update handler.py fix error with solution of high success probability --- bin/handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/handler.py b/bin/handler.py index e3b6598..0803008 100644 --- a/bin/handler.py +++ b/bin/handler.py @@ -93,7 +93,10 @@ class Handler: def video_scaling(self, ffmpegpath, fsrpath, filepath, quality_mode, quality_setting, output_path): # DO NOT CALL THIS! Use Handler().handler() instead! - self.videometa = ffmpeg.probe(str(filepath), './bin/lib/ffprobe.exe')["streams"].pop(0) + if ( sys.platform == 'win32' ): + self.videometa = ffmpeg.probe(str(filepath), 'bin\lib\ffprobe.exe')["streams"].pop(0) + else: + self.videometa = ffmpeg.probe(str(filepath))["streams"].pop(0) # Retrieving Video metadata self.duration = self.videometa.get("duration") self.frames = self.videometa.get("nb_frames")