diff --git a/src/video2x_gui.py b/src/video2x_gui.py index 3e2605f..128c6f3 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -4,7 +4,7 @@ Creator: Video2X GUI Author: K4YT3X Date Created: May 5, 2020 -Last Modified: June 30, 2020 +Last Modified: September 1, 2020 """ # local imports @@ -34,7 +34,7 @@ from PyQt5.QtGui import * from PyQt5.QtWidgets import * import magic -GUI_VERSION = '2.7.1' +GUI_VERSION = '2.7.2' LEGAL_INFO = f'''Video2X GUI Version: {GUI_VERSION}\\ Upscaler Version: {UPSCALER_VERSION}\\ @@ -395,6 +395,11 @@ class Video2XMainWindow(QMainWindow): self.anime4kcpp_post_processing_check_box = self.findChild(QCheckBox, 'anime4kCppPostProcessingCheckBox') self.anime4kcpp_gpu_mode_check_box = self.findChild(QCheckBox, 'anime4kCppGpuModeCheckBox') self.anime4kcpp_cnn_mode_check_box = self.findChild(QCheckBox, 'anime4kCppCnnModeCheckBox') + self.anime4kcpp_hdn_check_box = self.findChild(QCheckBox, 'anime4kCppHdnCheckBox') + self.anime4kcpp_hdn_level_spin_box = self.findChild(QSpinBox, 'anime4kCppHdnLevelSpinBox') + self.anime4kcpp_force_fps_double_spin_box = self.findChild(QDoubleSpinBox, 'anime4kCppForceFpsDoubleSpinBox') + self.anime4kcpp_disable_progress_check_box = self.findChild(QCheckBox, 'anime4kCppDisableProgressCheckBox') + self.anime4kcpp_alpha_check_box = self.findChild(QCheckBox, 'anime4kCppAlphaCheckBox') # FFmpeg settings # global options @@ -557,6 +562,11 @@ class Video2XMainWindow(QMainWindow): self.anime4kcpp_post_processing_check_box.setChecked(settings['postprocessing']) self.anime4kcpp_gpu_mode_check_box.setChecked(settings['GPUMode']) self.anime4kcpp_cnn_mode_check_box.setChecked(settings['CNNMode']) + self.anime4kcpp_hdn_check_box.setChecked(settings['HDN']) + self.anime4kcpp_hdn_level_spin_box.setValue(settings['HDNLevel']) + self.anime4kcpp_force_fps_double_spin_box.setValue(settings['forceFps']) + self.anime4kcpp_disable_progress_check_box.setChecked(settings['disableProgress']) + self.anime4kcpp_alpha_check_box.setChecked(settings['alpha']) # ffmpeg # global options @@ -666,6 +676,11 @@ class Video2XMainWindow(QMainWindow): self.config['anime4kcpp']['postprocessing'] = bool(self.anime4kcpp_post_processing_check_box.isChecked()) self.config['anime4kcpp']['GPUMode'] = bool(self.anime4kcpp_gpu_mode_check_box.isChecked()) self.config['anime4kcpp']['CNNMode'] = bool(self.anime4kcpp_cnn_mode_check_box.isChecked()) + self.config['anime4kcpp']['HDN'] = bool(self.anime4kcpp_hdn_check_box.isChecked()) + self.config['anime4kcpp']['HDNLevel'] = self.anime4kcpp_hdn_level_spin_box.value() + self.config['anime4kcpp']['forceFps'] = self.anime4kcpp_force_fps_double_spin_box.value() + self.config['anime4kcpp']['disableProgress'] = bool(self.anime4kcpp_disable_progress_check_box.isChecked()) + self.config['anime4kcpp']['alpha'] = bool(self.anime4kcpp_alpha_check_box.isChecked()) # ffmpeg self.config['ffmpeg']['ffmpeg_path'] = os.path.expandvars(self.ffmpeg_path_line_edit.text()) diff --git a/src/video2x_gui.ui b/src/video2x_gui.ui index 40e2769..94c9d44 100644 --- a/src/video2x_gui.ui +++ b/src/video2x_gui.ui @@ -1804,6 +1804,27 @@ + + + + HDN + + + + + + + Disable Progress + + + + + + + Preserve Alpha Channel + + + @@ -1942,6 +1963,38 @@ + + + + + + HDN Level + + + + + + + 1 + + + + + + + + + + + Force FPS + + + + + + + + diff --git a/src/wrappers/anime4kcpp.py b/src/wrappers/anime4kcpp.py index 84c9200..e0a34e5 100755 --- a/src/wrappers/anime4kcpp.py +++ b/src/wrappers/anime4kcpp.py @@ -4,7 +4,7 @@ Name: Anime4KCPP Driver Author: K4YT3X Date Created: May 3, 2020 -Last Modified: August 20, 2020 +Last Modified: September 1, 2020 Description: This class is a high-level wrapper for Anime4KCPP. @@ -66,7 +66,7 @@ class WrapperMain: parser.add_argument('-h', '--platformID', type=int, help='Specify the platform ID') parser.add_argument('-d', '--deviceID', type=int, help='Specify the device ID') parser.add_argument('-C', '--codec', type=str, help='Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), hevc(not support in Windowds), av01(not support in Windowds) (string [=mp4v])') - parser.add_argument('-F', '--forceFps', action='store_true', help='Set output video fps to the specifying number, 0 to disable') + parser.add_argument('-F', '--forceFps', type=float, help='Set output video fps to the specifying number, 0 to disable') parser.add_argument('-D', '--disableProgress', action='store_true', help='disable progress display') parser.add_argument('-W', '--webVideo', type=str, help='process the video from URL') parser.add_argument('-A', '--alpha', action='store_true', help='preserve the Alpha channel for transparent image')