diff --git a/src/video2x_gui.py b/src/video2x_gui.py index 05c9bde..fbcf943 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -31,7 +31,7 @@ from PyQt5.QtWidgets import * import magic # QObject, pyqtSlot, pyqtSignal, QRunnable, QThreadPool, QAbstractTableModel, Qt -GUI_VERSION = '2.1.0' +GUI_VERSION = '2.2.0' LEGAL_INFO = f'''Video2X GUI Version: {GUI_VERSION}\\ Upscaler Version: {UPSCALER_VERSION}\\ @@ -374,9 +374,10 @@ class Video2XMainWindow(QMainWindow): self.ffmpeg_migrate_streams_output_options_mapping_data_check_box_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsMappingDataCheckBox') self.ffmpeg_migrate_streams_output_options_mapping_font_check_box_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsMappingFontCheckBox') self.ffmpeg_migrate_streams_output_options_pixel_format_line_edit = self.findChild(QLineEdit, 'ffmpegMigrateStreamsOutputOptionsPixelFormatLineEdit') + self.ffmpeg_migrate_streams_output_options_frame_interpolation_spin_box = self.findChild(QSpinBox, 'ffmpegMigrateStreamsOutputOptionsFrameInterpolationSpinBox') self.ffmpeg_migrate_streams_output_options_copy_codec_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsCopyCodecCheckBox') - self.ffmpeg_migrate_streams_output_options_copy_known_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsOtherCopyKnownMetadataTagsCheckBox') - self.ffmpeg_migrate_streams_output_options_copy_arbitrary_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsOtherCopyArbitraryMetadataTagsCheckBox') + self.ffmpeg_migrate_streams_output_options_copy_known_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsCopyKnownMetadataTagsCheckBox') + self.ffmpeg_migrate_streams_output_options_copy_arbitrary_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsCopyArbitraryMetadataTagsCheckBox') self.ffmpeg_migrate_streams_hardware_acceleration_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsHardwareAccelerationCheckBox') # Gifski settings @@ -691,6 +692,16 @@ class Video2XMainWindow(QMainWindow): self.config['ffmpeg']['migrate_streams']['output_options']['-pix_fmt'] = self.ffmpeg_migrate_streams_output_options_pixel_format_line_edit.text() + if (fps := self.ffmpeg_migrate_streams_output_options_frame_interpolation_spin_box.value()) > 0: + if ('-vf' in self.config['ffmpeg']['migrate_streams']['output_options'] and + len(self.config['ffmpeg']['migrate_streams']['output_options']['-vf']) > 0 and + self.config['ffmpeg']['migrate_streams']['output_options']['-vf'] != f'minterpolate=\'fps={fps}\''): + self.config['ffmpeg']['migrate_streams']['output_options']['-vf'] += f',minterpolate=\'fps={fps}\'' + else: + self.config['ffmpeg']['migrate_streams']['output_options']['-vf'] = f'minterpolate=\'fps={fps}\'' + else: + self.config['ffmpeg']['migrate_streams']['output_options'].pop('-vf', None) + # copy source codec if self.ffmpeg_migrate_streams_output_options_copy_codec_check_box.isChecked(): self.config['ffmpeg']['migrate_streams']['output_options']['-c'] = 'copy' diff --git a/src/video2x_gui.pyproject.user b/src/video2x_gui.pyproject.user index 90555ba..efa575f 100644 --- a/src/video2x_gui.pyproject.user +++ b/src/video2x_gui.pyproject.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -170,7 +170,7 @@ false true - + C:/Users/k4yt3x/Documents/Projects/video2x/src 1 diff --git a/src/video2x_gui.ui b/src/video2x_gui.ui index 090bd14..628bfaa 100644 --- a/src/video2x_gui.ui +++ b/src/video2x_gui.ui @@ -1933,7 +1933,7 @@ - Ensure output width and height are divisible by 2 + Ensure output width and height are divisible by 2 (-vf: "pad=ceil(iw/2)*2:ceil(ih/2)*2") true @@ -2070,9 +2070,9 @@ - + - + Pixel Format (-pix_fmt) @@ -2083,10 +2083,28 @@ + + + + + + Frame Interpolation (-filter "minterpolate='fps=n'") + + + + + + + 9999 + + + + + - Copy codec + Stream copy (-c copy) true @@ -2094,9 +2112,9 @@ - + - Copy known metadata tags + Copy known metadata tags (-map_metadata 0) true @@ -2104,9 +2122,9 @@ - + - Copy arbitrary metadata tags + Copy arbitrary metadata tags (-movflags use_metadata_tags) true @@ -2114,7 +2132,7 @@ - + Qt::Vertical