mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 23:58:11 +00:00
added FFmpeg frame interpolation option
This commit is contained in:
parent
179bd6afc8
commit
289f5441eb
@ -31,7 +31,7 @@ from PyQt5.QtWidgets import *
|
|||||||
import magic
|
import magic
|
||||||
# QObject, pyqtSlot, pyqtSignal, QRunnable, QThreadPool, QAbstractTableModel, Qt
|
# 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}\\
|
LEGAL_INFO = f'''Video2X GUI Version: {GUI_VERSION}\\
|
||||||
Upscaler Version: {UPSCALER_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_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_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_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_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_known_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsCopyKnownMetadataTagsCheckBox')
|
||||||
self.ffmpeg_migrate_streams_output_options_copy_arbitrary_metadata_tags_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsOutputOptionsOtherCopyArbitraryMetadataTagsCheckBox')
|
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')
|
self.ffmpeg_migrate_streams_hardware_acceleration_check_box = self.findChild(QCheckBox, 'ffmpegMigrateStreamsHardwareAccelerationCheckBox')
|
||||||
|
|
||||||
# Gifski settings
|
# 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()
|
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
|
# copy source codec
|
||||||
if self.ffmpeg_migrate_streams_output_options_copy_codec_check_box.isChecked():
|
if self.ffmpeg_migrate_streams_output_options_copy_codec_check_box.isChecked():
|
||||||
self.config['ffmpeg']['migrate_streams']['output_options']['-c'] = 'copy'
|
self.config['ffmpeg']['migrate_streams']['output_options']['-c'] = 'copy'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.12.0, 2020-05-14T22:33:50. -->
|
<!-- Written by QtCreator 4.12.0, 2020-05-17T09:47:49. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@ -170,7 +170,7 @@
|
|||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/k4yt3x/Documents/Projects/video2x/src</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
@ -1933,7 +1933,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ffmpegAssembleVideoOutputOptionsEnsureDivisibleCheckBox">
|
<widget class="QCheckBox" name="ffmpegAssembleVideoOutputOptionsEnsureDivisibleCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ensure output width and height are divisible by 2</string>
|
<string>Ensure output width and height are divisible by 2 (-vf: "pad=ceil(iw/2)*2:ceil(ih/2)*2")</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -2070,9 +2070,9 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_32">
|
<layout class="QVBoxLayout" name="verticalLayout_32">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="ffmpegMigrateStreamsOutputOptionsOtherPixelFormatHorizontalLayout">
|
<layout class="QHBoxLayout" name="ffmpegMigrateStreamsOutputOptionsPixelFormatHorizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="ffmpegMigrateStreamsOutputOptionsOtherPixelFormatLabel">
|
<widget class="QLabel" name="ffmpegMigrateStreamsOutputOptionsPixelFormatLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pixel Format (-pix_fmt)</string>
|
<string>Pixel Format (-pix_fmt)</string>
|
||||||
</property>
|
</property>
|
||||||
@ -2083,10 +2083,28 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="ffmpegMigrateStreamsOutputOptionsFrameInterpolationHorizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="ffmpegMigrateStreamsOutputOptionsFrameInterpolationLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Frame Interpolation (-filter "minterpolate='fps=n'")</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="ffmpegMigrateStreamsOutputOptionsFrameInterpolationSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>9999</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsCopyCodecCheckBox">
|
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsCopyCodecCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Copy codec</string>
|
<string>Stream copy (-c copy)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -2094,9 +2112,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsOtherCopyKnownMetadataTagsCheckBox">
|
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsCopyKnownMetadataTagsCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Copy known metadata tags</string>
|
<string>Copy known metadata tags (-map_metadata 0)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -2104,9 +2122,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsOtherCopyArbitraryMetadataTagsCheckBox">
|
<widget class="QCheckBox" name="ffmpegMigrateStreamsOutputOptionsCopyArbitraryMetadataTagsCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Copy arbitrary metadata tags</string>
|
<string>Copy arbitrary metadata tags (-movflags use_metadata_tags)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -2114,7 +2132,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="ffmpegMigrateStreamsOutputOptionsOtherVerticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user