mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-04 04:39:10 +00:00
fixed bulk processing file output issues
This commit is contained in:
parent
16389fc8a6
commit
9389511d2d
@ -478,6 +478,8 @@ class Upscaler:
|
|||||||
input_file_type = input_file_mime_type.split('/')[0]
|
input_file_type = input_file_mime_type.split('/')[0]
|
||||||
input_file_subtype = input_file_mime_type.split('/')[1]
|
input_file_subtype = input_file_mime_type.split('/')[1]
|
||||||
|
|
||||||
|
Avalon.debug_info(_('File MIME type: {}').format(input_file_mime_type))
|
||||||
|
|
||||||
# set default output file suffixes
|
# set default output file suffixes
|
||||||
# if image type is GIF, default output suffix is also .gif
|
# if image type is GIF, default output suffix is also .gif
|
||||||
if input_file_mime_type == 'image/gif':
|
if input_file_mime_type == 'image/gif':
|
||||||
@ -698,11 +700,14 @@ class Upscaler:
|
|||||||
# output can be either GIF or video
|
# output can be either GIF or video
|
||||||
if input_file_type == 'image' and input_file_subtype != 'gif':
|
if input_file_type == 'image' and input_file_subtype != 'gif':
|
||||||
|
|
||||||
|
Avalon.info(_('Exporting image'))
|
||||||
|
|
||||||
# resize and output image to output_path
|
# resize and output image to output_path
|
||||||
self.process_pool.append(self.ffmpeg_object.resize_image([f for f in self.upscaled_frames.iterdir() if f.is_file()][0], output_path, output_width, output_height))
|
self.process_pool.append(self.ffmpeg_object.resize_image([f for f in self.upscaled_frames.iterdir() if f.is_file()][0], output_path, output_width, output_height))
|
||||||
self._wait()
|
self._wait()
|
||||||
|
|
||||||
elif input_file_mime_type == 'image/gif' or input_file_type == 'video':
|
# elif input_file_mime_type == 'image/gif' or input_file_type == 'video':
|
||||||
|
else:
|
||||||
|
|
||||||
# if the desired output is gif file
|
# if the desired output is gif file
|
||||||
if output_path.suffix.lower() == '.gif':
|
if output_path.suffix.lower() == '.gif':
|
||||||
|
Loading…
Reference in New Issue
Block a user