1.1.0 updated for video2x 2.6.0

This commit is contained in:
k4yt3x 2019-03-09 12:51:06 -05:00
parent 9639b0b990
commit 57615b4537

View File

@ -4,7 +4,7 @@
Name: Video2X Setup Script Name: Video2X Setup Script
Author: K4YT3X Author: K4YT3X
Date Created: November 28, 2018 Date Created: November 28, 2018
Last Modified: March 4, 2019 Last Modified: March 9, 2019
Licensed under the GNU General Public License Version 3 (GNU GPL v3), Licensed under the GNU General Public License Version 3 (GNU GPL v3),
available at: https://www.gnu.org/licenses/gpl-3.0.txt available at: https://www.gnu.org/licenses/gpl-3.0.txt
@ -31,7 +31,7 @@ import zipfile
# later in the script. # later in the script.
# import requests # import requests
VERSION = '1.0.3' VERSION = '1.1.0'
class Video2xSetup: class Video2xSetup:
@ -109,17 +109,21 @@ class Video2xSetup:
def _generate_config(self): def _generate_config(self):
""" Generate video2x config """ Generate video2x config
""" """
settings = {} # Open current video2x.json file as template
with open('video2x.json', 'r') as template:
settings['waifu2x_path'] = '{}\\video2x\\waifu2x-caffe\\waifu2x-caffe-cui.exe'.format(os.getenv('localappdata')) template_dict = json.load(template)
settings['ffmpeg_path'] = '{}\\video2x\\ffmpeg-4.1-win64-static\\bin'.format(os.getenv('localappdata')) template.close()
settings['ffmpeg_arguments'] = []
settings['ffmpeg_hwaccel'] = 'auto' template_dict['waifu2x_caffe']['waifu2x_caffe_path'] = '{}\\video2x\\waifu2x-caffe\\waifu2x-caffe-cui.exe'.format(os.getenv('localappdata'))
settings['video2x_cache_folder'] = False template_dict['ffmpeg']['ffmpeg_path'] = '{}\\video2x\\ffmpeg-4.1-win64-static\\bin'.format(os.getenv('localappdata'))
settings['preserve_frames'] = False template_dict['ffmpeg']['ffmpeg_hwaccel'] = 'auto'
template_dict['ffmpeg']['extra_arguments'] = []
template_dict['video2x']['video2x_cache_folder'] = False
template_dict['video2x']['preserve_frames'] = False
# Write configuration into file
with open('video2x.json', 'w') as config: with open('video2x.json', 'w') as config:
json.dump(settings, config, indent=2) json.dump(template_dict, config, indent=2)
config.close() config.close()