Skip to content

Commit

Permalink
Version 5.5.4 (#478)
Browse files Browse the repository at this point in the history
* Fixing #474 SVT-AV1 single pass would not be set on return from queue (thanks to veldspar)
* Fixing #475 Autocrop can break with index error (thanks to No Name / phanluchoaofficial1152)
* Fixing #477 HDR10+ not extracting with NVEncC encoder, switching to built in copy ability (thanks to Genine-Collin)
  • Loading branch information
cdgriffith authored May 4, 2023
1 parent a4501db commit 1973a62
Show file tree
Hide file tree
Showing 21 changed files with 114 additions and 229 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 5.5.4

* Fixing #474 SVT-AV1 single pass would not be set on return from queue (thanks to veldspar)
* Fixing #475 Autocrop can break with index error (thanks to No Name / phanluchoaofficial1152)
* Fixing #477 HDR10+ not extracting with NVEncC encoder, switching to built in copy ability (thanks to Genine-Collin)

## Version 5.5.3

* Fixing missing language options (thanks to RoDanny2021)
Expand Down
60 changes: 60 additions & 0 deletions fastflix/data/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10275,3 +10275,63 @@ Output Depth:
ukr: Тільки 8 біт
kor: 8 비트 만
ron: Numai 8-Bit
Copy HDR10+:
eng: Copy HDR10+
deu: HDR10+ kopieren
fra: Copier HDR10+
ita: Copia HDR10+
spa: Copiar HDR10+
zho: 复制HDR10+
jpn: HDR10+をコピー
rus: Копировать HDR10+
por: Copiar HDR10+
swe: Kopiera HDR10+
pol: Skopiuj HDR10+
ukr: Скопіювати HDR10+
kor: HDR10+ 복사
ron: Copiați HDR10+
Copy HDR10+ dynamic metadata from input file:
eng: Copy HDR10+ dynamic metadata from input file
deu: Kopieren Sie HDR10+ dynamische Metadaten aus der Eingabedatei
fra: Copier les métadonnées dynamiques HDR10+ du fichier d'entrée
ita: Copia i metadati dinamici HDR10+ dal file di input
spa: Copiar metadatos dinámicos HDR10+ del archivo de entrada
zho: 从输入文件复制HDR10+动态元数据
jpn: 入力ファイルからHDR10+ダイナミックメタデータをコピー
rus: Скопировать динамические метаданные HDR10+ из входного файла
por: Copiar metadados dinâmicos HDR10+ do arquivo de entrada
swe: Kopiera HDR10+ dynamisk metadata från inmatningsfilen
pol: Skopiuj dynamiczne metadane HDR10+ z pliku wejściowego
ukr: Скопіювати динамічні метадані HDR10+ з вхідного файлу
kor: 입력 파일에서 HDR10+ 동적 메타 데이터 복사
ron: Copiați metadatele dinamice HDR10+ din fișierul de intrare
Single Pass:
eng: Single Pass
deu: Einzelner Pass
fra: Passe unique
ita: Passaggio singolo
spa: Pase único
zho: 单次通过
jpn: シングルパス
rus: Одиночный проход
por: Passe único
swe: Enkelt pass
pol: Pojedyncze przejście
ron: O singură trecere
kor: 단일 패스
ukr: Одноразовий пропуск
Single Pass Encoding:
eng: Single Pass Encoding
deu: Single-Pass-Codierung
fra: Encodage à passage unique
ita: Codifica a passaggio singolo
spa: Codificación de una sola pasada
zho: 单程编码
jpn: シングルパスエンコード
rus: Однопроходное кодирование
por: Codificação de passagem única
swe: Kodning i ett enda steg
pol: Kodowanie jednoprzebiegowe
ron: Codificare cu o singură trecere
kor: 싱글 패스 인코딩
ukr: Однопрохідне кодування
9 changes: 9 additions & 0 deletions fastflix/encoders/common/setting_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,15 @@ def init_decoder(self):
min_width=80,
)

def init_dhdr10_info(self):
layout = self._add_check_box(
label="Copy HDR10+",
widget_name="copy_hdr10",
tooltip="Copy HDR10+ dynamic metadata from input file",
opt="copy_hdr10",
)
return layout


class QSVEncPanel(RigayaPanel):
def init_adapt_ref(self):
Expand Down
4 changes: 2 additions & 2 deletions fastflix/encoders/nvencc_av1/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def build(fastflix: FastFlix):
max_cll = f'--max-cll "{fastflix.current_video.cll}"'

dhdr = None
if settings.hdr10plus_metadata:
dhdr = f'--dhdr10-info "{settings.hdr10plus_metadata}"'
if settings.copy_hdr10:
dhdr = f"--dhdr10-info copy"

seek = ""
seekto = ""
Expand Down
29 changes: 1 addition & 28 deletions fastflix/encoders/nvencc_av1/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,29 +362,6 @@ def init_metrics(self):
tooltip="Calculate PSNR and SSIM and show in the encoder output",
)

def init_dhdr10_info(self):
layout = self._add_file_select(
label="HDR10+ Metadata",
widget_name="hdr10plus_metadata",
button_action=lambda: self.dhdr10_update(),
tooltip="dhdr10_info: Path to HDR10+ JSON metadata file",
)
self.labels["hdr10plus_metadata"].setFixedWidth(200)
self.extract_button = QtWidgets.QPushButton(t("Extract HDR10+"))
self.extract_button.hide()
self.extract_button.clicked.connect(self.extract_hdr10plus)

self.extract_label = QtWidgets.QLabel(self)
self.extract_label.hide()
self.movie = QtGui.QMovie(loading_movie)
self.movie.setScaledSize(QtCore.QSize(25, 25))
self.extract_label.setMovie(self.movie)

layout.addWidget(self.extract_button)
layout.addWidget(self.extract_label)

return layout

def init_modes(self):
layout = self._add_modes(recommended_bitrates, recommended_crfs, qp_name="cqp")
return layout
Expand Down Expand Up @@ -418,7 +395,7 @@ def update_video_encoder_settings(self):
lookahead=self.widgets.lookahead.currentIndex() if self.widgets.lookahead.currentIndex() > 0 else None,
aq=self.widgets.aq.currentText(),
aq_strength=self.widgets.aq_strength.currentIndex(),
hdr10plus_metadata=self.widgets.hdr10plus_metadata.text().strip(), # .replace("\\", "/"),
copy_hdr10=self.widgets.copy_hdr10.isChecked(),
multipass=self.widgets.multipass.currentText(),
mv_precision=self.widgets.mv_precision.currentText(),
init_q_i=self.widgets.init_q_i.currentText() if self.widgets.init_q_i.currentIndex() != 0 else None,
Expand Down Expand Up @@ -458,10 +435,6 @@ def new_source(self):
if not self.app.fastflix.current_video:
return
super().new_source()
if self.app.fastflix.current_video.hdr10_plus:
self.extract_button.show()
else:
self.extract_button.hide()
if self.app.fastflix.current_video.current_video_stream.bit_depth > 8 and not self.main.remove_hdr:
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
Expand Down
30 changes: 0 additions & 30 deletions fastflix/encoders/nvencc_avc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ def __init__(self, parent, main, app: FastFlixApp):
even_more.addLayout(self.init_metrics())
grid.addLayout(even_more, 7, 2, 1, 4)

grid.addLayout(self.init_dhdr10_info(), 8, 2, 1, 4)

grid.setRowStretch(9, 1)

guide_label = QtWidgets.QLabel(
Expand Down Expand Up @@ -355,29 +353,6 @@ def init_metrics(self):
tooltip="Calculate PSNR and SSIM and show in the encoder output",
)

def init_dhdr10_info(self):
layout = self._add_file_select(
label="HDR10+ Metadata",
widget_name="hdr10plus_metadata",
button_action=lambda: self.dhdr10_update(),
tooltip="dhdr10_info: Path to HDR10+ JSON metadata file",
)
self.labels["hdr10plus_metadata"].setFixedWidth(200)
self.extract_button = QtWidgets.QPushButton(t("Extract HDR10+"))
self.extract_button.hide()
self.extract_button.clicked.connect(self.extract_hdr10plus)

self.extract_label = QtWidgets.QLabel(self)
self.extract_label.hide()
self.movie = QtGui.QMovie(loading_movie)
self.movie.setScaledSize(QtCore.QSize(25, 25))
self.extract_label.setMovie(self.movie)

layout.addWidget(self.extract_button)
layout.addWidget(self.extract_label)

return layout

def init_modes(self):
layout = self._add_modes(recommended_bitrates, recommended_crfs, qp_name="cqp")
return layout
Expand All @@ -404,7 +379,6 @@ def update_video_encoder_settings(self):
lookahead=self.widgets.lookahead.currentIndex() if self.widgets.lookahead.currentIndex() > 0 else None,
aq=self.widgets.aq.currentText(),
aq_strength=self.widgets.aq_strength.currentIndex(),
hdr10plus_metadata=self.widgets.hdr10plus_metadata.text().strip(), # .replace("\\", "/"),
multipass=self.widgets.multipass.currentText(),
mv_precision=self.widgets.mv_precision.currentText(),
init_q_i=self.widgets.init_q_i.currentText() if self.widgets.init_q_i.currentIndex() != 0 else None,
Expand Down Expand Up @@ -444,7 +418,3 @@ def new_source(self):
if not self.app.fastflix.current_video:
return
super().new_source()
if self.app.fastflix.current_video.hdr10_plus:
self.extract_button.show()
else:
self.extract_button.hide()
4 changes: 2 additions & 2 deletions fastflix/encoders/nvencc_hevc/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def build(fastflix: FastFlix):
max_cll = f'--max-cll "{fastflix.current_video.cll}"'

dhdr = None
if settings.hdr10plus_metadata:
dhdr = f'--dhdr10-info "{settings.hdr10plus_metadata}"'
if settings.copy_hdr10:
dhdr = f"--dhdr10-info copy"

seek = ""
seekto = ""
Expand Down
29 changes: 1 addition & 28 deletions fastflix/encoders/nvencc_hevc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,29 +360,6 @@ def init_metrics(self):
tooltip="Calculate PSNR and SSIM and show in the encoder output",
)

def init_dhdr10_info(self):
layout = self._add_file_select(
label="HDR10+ Metadata",
widget_name="hdr10plus_metadata",
button_action=lambda: self.dhdr10_update(),
tooltip="dhdr10_info: Path to HDR10+ JSON metadata file",
)
self.labels["hdr10plus_metadata"].setFixedWidth(200)
self.extract_button = QtWidgets.QPushButton(t("Extract HDR10+"))
self.extract_button.hide()
self.extract_button.clicked.connect(self.extract_hdr10plus)

self.extract_label = QtWidgets.QLabel(self)
self.extract_label.hide()
self.movie = QtGui.QMovie(loading_movie)
self.movie.setScaledSize(QtCore.QSize(25, 25))
self.extract_label.setMovie(self.movie)

layout.addWidget(self.extract_button)
layout.addWidget(self.extract_label)

return layout

def init_modes(self):
layout = self._add_modes(recommended_bitrates, recommended_crfs, qp_name="cqp")
return layout
Expand Down Expand Up @@ -416,7 +393,7 @@ def update_video_encoder_settings(self):
lookahead=self.widgets.lookahead.currentIndex() if self.widgets.lookahead.currentIndex() > 0 else None,
aq=self.widgets.aq.currentText(),
aq_strength=self.widgets.aq_strength.currentIndex(),
hdr10plus_metadata=self.widgets.hdr10plus_metadata.text().strip(), # .replace("\\", "/"),
copy_hdr10=self.widgets.copy_hdr10.isChecked(),
multipass=self.widgets.multipass.currentText(),
mv_precision=self.widgets.mv_precision.currentText(),
init_q_i=self.widgets.init_q_i.currentText() if self.widgets.init_q_i.currentIndex() != 0 else None,
Expand Down Expand Up @@ -456,10 +433,6 @@ def new_source(self):
if not self.app.fastflix.current_video:
return
super().new_source()
if self.app.fastflix.current_video.hdr10_plus:
self.extract_button.show()
else:
self.extract_button.hide()
if self.app.fastflix.current_video.current_video_stream.bit_depth > 8 and not self.main.remove_hdr:
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
Expand Down
4 changes: 2 additions & 2 deletions fastflix/encoders/qsvencc_av1/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def build(fastflix: FastFlix):
max_cll = f'--max-cll "{fastflix.current_video.cll}"'

dhdr = None
if settings.hdr10plus_metadata:
dhdr = f'--dhdr10-info "{settings.hdr10plus_metadata}"'
if settings.copy_hdr10:
dhdr = f"--dhdr10-info copy"

seek = ""
seekto = ""
Expand Down
29 changes: 1 addition & 28 deletions fastflix/encoders/qsvencc_av1/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,29 +295,6 @@ def init_metrics(self):
tooltip="Calculate PSNR and SSIM and show in the encoder output",
)

def init_dhdr10_info(self):
layout = self._add_file_select(
label="HDR10+ Metadata",
widget_name="hdr10plus_metadata",
button_action=lambda: self.dhdr10_update(),
tooltip="dhdr10_info: Path to HDR10+ JSON metadata file",
)
self.labels["hdr10plus_metadata"].setFixedWidth(200)
self.extract_button = QtWidgets.QPushButton(t("Extract HDR10+"))
self.extract_button.hide()
self.extract_button.clicked.connect(self.extract_hdr10plus)

self.extract_label = QtWidgets.QLabel(self)
self.extract_label.hide()
self.movie = QtGui.QMovie(loading_movie)
self.movie.setScaledSize(QtCore.QSize(25, 25))
self.extract_label.setMovie(self.movie)

layout.addWidget(self.extract_button)
layout.addWidget(self.extract_label)

return layout

def init_modes(self):
layout = self._add_modes(recommended_bitrates, recommended_crfs, qp_name="cqp")
return layout
Expand Down Expand Up @@ -347,7 +324,7 @@ def update_video_encoder_settings(self):
preset=self.widgets.preset.currentText().split("-")[0].strip(),
force_ten_bit=self.widgets.force_ten_bit.isChecked(),
lookahead=self.widgets.lookahead.currentText() if self.widgets.lookahead.currentIndex() > 0 else None,
hdr10plus_metadata=self.widgets.hdr10plus_metadata.text().strip(), # .replace("\\", "/"),
copy_hdr10=self.widgets.copy_hdr10.isChecked(),
max_q_i=self.widgets.max_q_i.currentText() if self.widgets.max_q_i.currentIndex() != 0 else None,
max_q_p=self.widgets.max_q_p.currentText() if self.widgets.max_q_p.currentIndex() != 0 else None,
max_q_b=self.widgets.max_q_b.currentText() if self.widgets.max_q_b.currentIndex() != 0 else None,
Expand Down Expand Up @@ -383,10 +360,6 @@ def new_source(self):
if not self.app.fastflix.current_video:
return
super().new_source()
if self.app.fastflix.current_video.hdr10_plus:
self.extract_button.show()
else:
self.extract_button.hide()
if self.app.fastflix.current_video.current_video_stream.bit_depth > 8 and not self.main.remove_hdr:
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
Expand Down
4 changes: 2 additions & 2 deletions fastflix/encoders/qsvencc_hevc/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def build(fastflix: FastFlix):
max_cll = f'--max-cll "{fastflix.current_video.cll}"'

dhdr = None
if settings.hdr10plus_metadata:
dhdr = f'--dhdr10-info "{settings.hdr10plus_metadata}"'
if settings.copy_hdr10:
dhdr = f"--dhdr10-info copy"

seek = ""
seekto = ""
Expand Down
29 changes: 1 addition & 28 deletions fastflix/encoders/qsvencc_hevc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,29 +287,6 @@ def init_metrics(self):
tooltip="Calculate PSNR and SSIM and show in the encoder output",
)

def init_dhdr10_info(self):
layout = self._add_file_select(
label="HDR10+ Metadata",
widget_name="hdr10plus_metadata",
button_action=lambda: self.dhdr10_update(),
tooltip="dhdr10_info: Path to HDR10+ JSON metadata file",
)
self.labels["hdr10plus_metadata"].setFixedWidth(200)
self.extract_button = QtWidgets.QPushButton(t("Extract HDR10+"))
self.extract_button.hide()
self.extract_button.clicked.connect(self.extract_hdr10plus)

self.extract_label = QtWidgets.QLabel(self)
self.extract_label.hide()
self.movie = QtGui.QMovie(loading_movie)
self.movie.setScaledSize(QtCore.QSize(25, 25))
self.extract_label.setMovie(self.movie)

layout.addWidget(self.extract_button)
layout.addWidget(self.extract_label)

return layout

def init_modes(self):
layout = self._add_modes(recommended_bitrates, recommended_crfs, qp_name="cqp")
return layout
Expand Down Expand Up @@ -339,7 +316,7 @@ def update_video_encoder_settings(self):
preset=self.widgets.preset.currentText().split("-")[0].strip(),
force_ten_bit=self.widgets.force_ten_bit.isChecked(),
lookahead=self.widgets.lookahead.currentText() if self.widgets.lookahead.currentIndex() > 0 else None,
hdr10plus_metadata=self.widgets.hdr10plus_metadata.text().strip(), # .replace("\\", "/"),
copy_hdr10=self.widgets.copy_hdr10.isChecked(),
max_q_i=self.widgets.max_q_i.currentText() if self.widgets.max_q_i.currentIndex() != 0 else None,
max_q_p=self.widgets.max_q_p.currentText() if self.widgets.max_q_p.currentIndex() != 0 else None,
max_q_b=self.widgets.max_q_b.currentText() if self.widgets.max_q_b.currentIndex() != 0 else None,
Expand Down Expand Up @@ -375,10 +352,6 @@ def new_source(self):
if not self.app.fastflix.current_video:
return
super().new_source()
if self.app.fastflix.current_video.hdr10_plus:
self.extract_button.show()
else:
self.extract_button.hide()
if self.app.fastflix.current_video.current_video_stream.bit_depth > 8 and not self.main.remove_hdr:
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
Expand Down
Loading

0 comments on commit 1973a62

Please sign in to comment.