diff --git a/bin/ffmpeg.py b/bin/ffmpeg.py index 093e085..b61d345 100644 --- a/bin/ffmpeg.py +++ b/bin/ffmpeg.py @@ -4,7 +4,7 @@ Name: FFMPEG Class Author: K4YT3X Date Created: Feb 24, 2018 -Last Modified: June 5, 2019 +Last Modified: June 15, 2019 Description: This class handles all FFMPEG related operations. diff --git a/bin/upscaler.py b/bin/upscaler.py index 864562c..223a271 100644 --- a/bin/upscaler.py +++ b/bin/upscaler.py @@ -4,7 +4,7 @@ Name: Video2X Upscaler Author: K4YT3X Date Created: December 10, 2018 -Last Modified: June 13, 2019 +Last Modified: June 15, 2019 Licensed under the GNU General Public License Version 3 (GNU GPL v3), available at: https://www.gnu.org/licenses/gpl-3.0.txt diff --git a/bin/video2x.py b/bin/video2x.py index 7a116c3..ea41945 100644 --- a/bin/video2x.py +++ b/bin/video2x.py @@ -13,7 +13,10 @@ __ __ _ _ ___ __ __ Name: Video2X Controller Author: K4YT3X Date Created: Feb 24, 2018 -Last Modified: June 13, 2019 +Last Modified: June 15, 2019 + +Dev: BrianPetkovsek +Dev: SAT3LL Licensed under the GNU General Public License Version 3 (GNU GPL v3), available at: https://www.gnu.org/licenses/gpl-3.0.txt @@ -192,13 +195,11 @@ def absolutify_paths(config): # check waifu2x-caffe path if not re.match('^[a-z]:', config['waifu2x_caffe']['waifu2x_caffe_path'], re.IGNORECASE): - config['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(current_directory, - config['waifu2x_caffe']['waifu2x_caffe_path']) + config['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(current_directory, config['waifu2x_caffe']['waifu2x_caffe_path']) # check waifu2x-converter-cpp path if not re.match('^[a-z]:', config['waifu2x_converter']['waifu2x_converter_path'], re.IGNORECASE): - config['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(current_directory, - config['waifu2x_converter']['waifu2x_converter_path']) + config['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(current_directory, config['waifu2x_converter']['waifu2x_converter_path']) # check ffmpeg path if not re.match('^[a-z]:', config['ffmpeg']['ffmpeg_path'], re.IGNORECASE): @@ -207,8 +208,7 @@ def absolutify_paths(config): # check video2x cache path if config['video2x']['video2x_cache_directory']: if not re.match('^[a-z]:', config['video2x']['video2x_cache_directory'], re.IGNORECASE): - config['video2x']['video2x_cache_directory'] = os.path.join(current_directory, - config['video2x']['video2x_cache_directory']) + config['video2x']['video2x_cache_directory'] = os.path.join(current_directory, config['video2x']['video2x_cache_directory']) return config diff --git a/bin/video2x_setup.py b/bin/video2x_setup.py index f4e7734..39ec4d1 100644 --- a/bin/video2x_setup.py +++ b/bin/video2x_setup.py @@ -4,7 +4,7 @@ Name: Video2X Setup Script Author: K4YT3X Date Created: November 28, 2018 -Last Modified: April 28, 2019 +Last Modified: June 15, 2019 Licensed under the GNU General Public License Version 3 (GNU GPL v3), available at: https://www.gnu.org/licenses/gpl-3.0.txt @@ -159,19 +159,14 @@ class Video2xSetup: # configure only the specified drivers if self.driver == 'all': - template_dict['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(local_app_data, 'video2x', - 'waifu2x-caffe', 'waifu2x-caffe-cui.exe') - template_dict['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(local_app_data, 'video2x', - 'waifu2x-converter-cpp') + template_dict['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(local_app_data, 'video2x', 'waifu2x-caffe', 'waifu2x-caffe-cui.exe') + template_dict['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(local_app_data, 'video2x', 'waifu2x-converter-cpp') elif self.driver == 'waifu2x_caffe': - template_dict['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(local_app_data, 'video2x', - 'waifu2x-caffe', 'waifu2x-caffe-cui.exe') + template_dict['waifu2x_caffe']['waifu2x_caffe_path'] = os.path.join(local_app_data, 'video2x', 'waifu2x-caffe', 'waifu2x-caffe-cui.exe') elif self.driver == 'waifu2x_converter': - template_dict['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(local_app_data, 'video2x', - 'waifu2x-converter-cpp') + template_dict['waifu2x_converter']['waifu2x_converter_path'] = os.path.join(local_app_data, 'video2x', 'waifu2x-converter-cpp') - template_dict['ffmpeg']['ffmpeg_path'] = os.path.join(local_app_data, 'video2x', - 'ffmpeg-latest-win64-static', 'bin') + template_dict['ffmpeg']['ffmpeg_path'] = os.path.join(local_app_data, 'video2x', 'ffmpeg-latest-win64-static', 'bin') template_dict['video2x']['video2x_cache_directory'] = None template_dict['video2x']['preserve_frames'] = False @@ -187,7 +182,7 @@ def download(url, save_path, chunk_size=4096): from tqdm import tqdm import requests - output_file = os.path.join(save_path, url.split("/")[-1]) + output_file = os.path.join(save_path, url.split('/')[-1]) print(f'Downloading: {url}') print(f'Chunk size: {chunk_size}') print(f'Saving to: {output_file}') @@ -215,7 +210,7 @@ def pip_install(package): return subprocess.run(['python', '-m', 'pip', 'install', '-U', package]).returncode -if __name__ == "__main__": +if __name__ == '__main__': try: args = process_arguments() print('Video2X Setup Script') diff --git a/bin/waifu2x_caffe.py b/bin/waifu2x_caffe.py index a3ea560..4c57537 100644 --- a/bin/waifu2x_caffe.py +++ b/bin/waifu2x_caffe.py @@ -4,7 +4,7 @@ Name: Waifu2x Caffe Driver Author: K4YT3X Date Created: Feb 24, 2018 -Last Modified: April 28, 2019 +Last Modified: June 15, 2019 Description: This class is a high-level wrapper for waifu2x-caffe. diff --git a/bin/waifu2x_converter.py b/bin/waifu2x_converter.py index d4911c0..d4c8d54 100644 --- a/bin/waifu2x_converter.py +++ b/bin/waifu2x_converter.py @@ -4,15 +4,15 @@ Name: Waifu2x Converter CPP Driver Author: K4YT3X Date Created: February 8, 2019 -Last Modified: April 28, 2019 +Last Modified: June 15, 2019 Description: This class is a high-level wrapper for waifu2x-converter-cpp. """ from avalon_framework import Avalon +import os import subprocess import threading -import os class Waifu2xConverter: