mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 23:58:11 +00:00
fixed error reading video resolution
This commit is contained in:
parent
3d46e1a822
commit
405c4b6636
@ -283,10 +283,10 @@ class Upscaler:
|
|||||||
|
|
||||||
# width/height will be coded width/height x upscale factor
|
# width/height will be coded width/height x upscale factor
|
||||||
if self.scale_ratio:
|
if self.scale_ratio:
|
||||||
coded_width = video_info['streams'][video_stream_index]['coded_width']
|
original_width = video_info['streams'][video_stream_index]['width']
|
||||||
coded_height = video_info['streams'][video_stream_index]['coded_height']
|
original_height = video_info['streams'][video_stream_index]['height']
|
||||||
self.scale_width = int(self.scale_ratio * coded_width)
|
self.scale_width = int(self.scale_ratio * original_width)
|
||||||
self.scale_height = int(self.scale_ratio * coded_height)
|
self.scale_height = int(self.scale_ratio * original_height)
|
||||||
|
|
||||||
# upscale images one by one using waifu2x
|
# upscale images one by one using waifu2x
|
||||||
Avalon.info('Starting to upscale extracted images')
|
Avalon.info('Starting to upscale extracted images')
|
||||||
|
Loading…
Reference in New Issue
Block a user