mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 23:19:11 +00:00
fixed directory cleaning errors, fixed resolution errors
This commit is contained in:
parent
4bd9541a32
commit
c5a7129415
@ -75,7 +75,7 @@ class Upscaler:
|
||||
|
||||
for directory in [self.extracted_frames, self.upscaled_frames]:
|
||||
try:
|
||||
print('Cleaning up cache directory: {}'.format())
|
||||
print('Cleaning up cache directory: {}'.format(directory))
|
||||
shutil.rmtree(directory)
|
||||
except (OSError, FileNotFoundError):
|
||||
pass
|
||||
@ -290,8 +290,8 @@ class Upscaler:
|
||||
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 = self.scale_ratio * coded_width
|
||||
self.scale_height = self.scale_ratio * coded_height
|
||||
self.scale_width = int(self.scale_ratio * coded_width)
|
||||
self.scale_height = int(self.scale_ratio * coded_height)
|
||||
|
||||
# upscale images one by one using waifu2x
|
||||
Avalon.info('Starting to upscale extracted images')
|
||||
|
Loading…
Reference in New Issue
Block a user