From 405c4b66363c534eda8c08f4820080497c7bb1d3 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Tue, 2 Apr 2019 16:23:59 -0400 Subject: [PATCH] fixed error reading video resolution --- bin/upscaler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/upscaler.py b/bin/upscaler.py index 25bd0d5..1d770f7 100644 --- a/bin/upscaler.py +++ b/bin/upscaler.py @@ -283,10 +283,10 @@ class Upscaler: # width/height will be coded width/height x upscale factor if self.scale_ratio: - coded_width = video_info['streams'][video_stream_index]['coded_width'] - coded_height = video_info['streams'][video_stream_index]['coded_height'] - self.scale_width = int(self.scale_ratio * coded_width) - self.scale_height = int(self.scale_ratio * coded_height) + original_width = video_info['streams'][video_stream_index]['width'] + original_height = video_info['streams'][video_stream_index]['height'] + self.scale_width = int(self.scale_ratio * original_width) + self.scale_height = int(self.scale_ratio * original_height) # upscale images one by one using waifu2x Avalon.info('Starting to upscale extracted images')