Update handler.py

fix error with solution of high success probability
This commit is contained in:
Janis Hutz
2023-03-15 12:13:00 +00:00
committed by GitHub
parent 3d93b49ca4
commit f88a0ef44f

View File

@@ -93,7 +93,10 @@ class Handler:
def video_scaling(self, ffmpegpath, fsrpath, filepath, quality_mode, quality_setting, output_path): def video_scaling(self, ffmpegpath, fsrpath, filepath, quality_mode, quality_setting, output_path):
# DO NOT CALL THIS! Use Handler().handler() instead! # 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 # Retrieving Video metadata
self.duration = self.videometa.get("duration") self.duration = self.videometa.get("duration")
self.frames = self.videometa.get("nb_frames") self.frames = self.videometa.get("nb_frames")