Skip to content

Commit efa87db

Browse files
committed
* Changing SVT-AV1 to single pass only due to ffmpeg not allowing passlog files properly
* Changing SVT-AV1 to CRF quantization mode by default * Fixing #642 Possible to create a profile without bitrate specified for audio stream (thanks to Xoanon88) * Fixing #646 PydanticSerializationUnexpectedValue warning during startup (thanks to Noelle Leigh) * Fixing how program is centered on multiple monitors
1 parent 76bbe3c commit efa87db

File tree

12 files changed

+56
-29
lines changed

12 files changed

+56
-29
lines changed

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Version 5.10.1
4+
5+
* Changing SVT-AV1 to single pass only due to ffmpeg not allowing passlog files properly
6+
* Changing SVT-AV1 to CRF quantization mode by default
7+
* Fixing #642 Possible to create a profile without bitrate specified for audio stream (thanks to Xoanon88)
8+
* Fixing #646 PydanticSerializationUnexpectedValue warning during startup (thanks to Noelle Leigh)
9+
* Fixing how program is centered on multiple monitors
10+
311
## Version 5.10.0
412

513
* Adding global disable interlace check (thanks to Hexenhammer)

fastflix/application.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ def app_setup(
196196
sys.exit(1)
197197

198198
if app.fastflix.config.theme != "system":
199-
QtCore.QDir.addSearchPath(app.fastflix.config.theme, str(breeze_styles_path / app.fastflix.config.theme))
200-
file = QtCore.QFile(f"{app.fastflix.config.theme}:stylesheet.qss")
199+
file = QtCore.QFile(str(breeze_styles_path / app.fastflix.config.theme / "stylesheet.qss"))
201200
file.open(QtCore.QFile.OpenModeFlag.ReadOnly | QtCore.QFile.OpenModeFlag.Text)
202201
stream = QtCore.QTextStream(file)
203202
data = stream.readAll()
@@ -233,7 +232,9 @@ def app_setup(
233232
container = Container(app)
234233
container.show()
235234

236-
container.move(QtGui.QGuiApplication.primaryScreen().availableGeometry().center() - container.rect().center())
235+
# container.move(QtGui.QGuiApplication.primaryScreen().availableGeometry().center() - container.rect().center())
236+
screen_geometry = QtGui.QGuiApplication.primaryScreen().availableGeometry()
237+
container.move(screen_geometry.center() - container.rect().center())
237238

238239
if not app.fastflix.config.disable_version_check:
239240
latest_fastflix(app=app, show_new_dialog=False)
@@ -257,7 +258,7 @@ def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock, por
257258
)
258259

259260
try:
260-
app.exec_()
261+
app.exec()
261262
except Exception:
262263
logger.exception("Error while running FastFlix")
263264
raise

fastflix/encoders/common/setting_panel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@ def _add_modes(
346346
disable_custom_qp=False,
347347
show_bitrate_passes=False,
348348
disable_bitrate=False,
349+
qp_display_name=None,
349350
):
351+
if not qp_display_name:
352+
qp_display_name = qp_name.upper()
350353
self.recommended_bitrates = recommended_bitrates
351354
self.recommended_qps = recommended_qps
352355
self.qp_name = qp_name
@@ -403,7 +406,7 @@ def _add_modes(
403406
bitrate_box_layout.addWidget(self.widgets.custom_bitrate)
404407
bitrate_box_layout.addWidget(QtWidgets.QLabel("k"))
405408

406-
self.qp_radio = QtWidgets.QRadioButton(qp_name.upper())
409+
self.qp_radio = QtWidgets.QRadioButton(qp_display_name)
407410
self.qp_radio.setChecked(True)
408411
self.qp_radio.setFixedWidth(80)
409412
self.qp_radio.setToolTip(qp_help)

fastflix/encoders/svt_av1/command_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def convert_me(two_numbers, conversion_rate=50_000) -> str:
7777
beginning += f" -svtav1-params \"{':'.join(svtav1_params)}\" "
7878

7979
if not settings.single_pass:
80-
pass_log_file = fastflix.current_video.work_path / f"pass_log_file_{secrets.token_hex(10)}"
80+
pass_log_file = f"pass_log_file_{secrets.token_hex(10)}"
8181
beginning += f'-passlogfile "{pass_log_file}" '
8282

8383
pass_type = "bitrate" if settings.bitrate else "QP"

fastflix/encoders/svt_av1/settings_panel.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, parent, main, app: FastFlixApp):
7070

7171
self.widgets = Box(fps=None, mode=None, segment_size=None)
7272

73-
self.mode = "QP"
73+
self.mode = "CRF"
7474

7575
grid.addLayout(self.init_preset(), 0, 0, 1, 2)
7676
grid.addLayout(self.init_pix_fmt(), 1, 0, 1, 2)
@@ -80,7 +80,7 @@ def __init__(self, parent, main, app: FastFlixApp):
8080
grid.addLayout(self.init_sc_detection(), 4, 0, 1, 2)
8181
grid.addLayout(self.init_max_mux(), 5, 0, 1, 2)
8282
grid.addLayout(self.init_modes(), 0, 2, 5, 4)
83-
grid.addLayout(self.init_single_pass(), 6, 2, 1, 1)
83+
# grid.addLayout(self.init_single_pass(), 6, 2, 1, 1)
8484
grid.addLayout(self.init_svtav1_params(), 5, 2, 1, 4)
8585

8686
grid.setRowStretch(8, 1)
@@ -130,13 +130,13 @@ def init_sc_detection(self):
130130
label="Scene Detection", options=["false", "true"], widget_name="sc_detection", opt="scene_detection"
131131
)
132132

133-
def init_single_pass(self):
134-
return self._add_check_box(
135-
label="Single Pass",
136-
widget_name="single_pass",
137-
tooltip="Single Pass Encoding",
138-
opt="single_pass",
139-
)
133+
# def init_single_pass(self):
134+
# return self._add_check_box(
135+
# label="Single Pass",
136+
# widget_name="single_pass",
137+
# tooltip="Single Pass Encoding",
138+
# opt="single_pass",
139+
# )
140140

141141
def init_preset(self):
142142
return self._add_combo_box(
@@ -151,7 +151,7 @@ def init_qp_or_crf(self):
151151
return self._add_combo_box(
152152
label="Quantization Mode",
153153
widget_name="qp_mode",
154-
options=["qp", "crf"],
154+
options=["crf", "qp"],
155155
tooltip="Use CRF or QP",
156156
opt="qp_mode",
157157
)
@@ -174,7 +174,7 @@ def init_svtav1_params(self):
174174
return layout
175175

176176
def init_modes(self):
177-
return self._add_modes(recommended_bitrates, recommended_qp, qp_name="qp")
177+
return self._add_modes(recommended_bitrates, recommended_qp, qp_name="qp", qp_display_name="CRF/QP")
178178

179179
def mode_update(self):
180180
self.widgets.custom_qp.setDisabled(self.widgets.qp.currentText() != "Custom")
@@ -188,7 +188,8 @@ def update_video_encoder_settings(self):
188188
speed=self.widgets.speed.currentText(),
189189
tile_columns=self.widgets.tile_columns.currentText(),
190190
tile_rows=self.widgets.tile_rows.currentText(),
191-
single_pass=self.widgets.single_pass.isChecked(),
191+
# single_pass=self.widgets.single_pass.isChecked(),
192+
single_pass=True,
192193
scene_detection=bool(self.widgets.sc_detection.currentIndex()),
193194
qp_mode=self.widgets.qp_mode.currentText(),
194195
pix_fmt=self.widgets.pix_fmt.currentText().split(":")[1].strip(),

fastflix/models/config.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from fastflix.rigaya_helpers import get_all_encoder_formats_and_devices
2525

2626
logger = logging.getLogger("fastflix")
27-
2827
ffmpeg_folder = Path(user_data_dir("FFmpeg", appauthor=False, roaming=True))
2928

3029
NO_OPT = object()
@@ -109,8 +108,8 @@ class Config(BaseModel):
109108
nvencc: Path | None = Field(default_factory=lambda: where("NVEncC64") or where("NVEncC"))
110109
vceencc: Path | None = Field(default_factory=lambda: where("VCEEncC64") or where("VCEEncC"))
111110
qsvencc: Path | None = Field(default_factory=lambda: where("QSVEncC64") or where("QSVEncC"))
112-
output_directory: Path | None = False
113-
source_directory: Path | None = False
111+
output_directory: Path | None = None
112+
source_directory: Path | None = None
114113
output_name_format: str = "{source}-fastflix-{rand_4}"
115114
flat_ui: bool = True
116115
language: str = "eng"
@@ -288,6 +287,12 @@ def load(self, portable_mode=False):
288287
if key in self and key not in ("config_path", "version"):
289288
setattr(self, key, Path(value) if key in paths and value else value)
290289

290+
if self.output_directory is False:
291+
self.output_directory = None
292+
293+
if self.source_directory is False:
294+
self.source_directory = None
295+
291296
if not self.ffmpeg or not self.ffmpeg.exists():
292297
self.ffmpeg = find_ffmpeg_file("ffmpeg", raise_on_missing=True)
293298
if not self.ffprobe or not self.ffprobe.exists():

fastflix/models/encode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ class SVTAV1Settings(EncoderSettings):
497497
single_pass: bool = False
498498
speed: str = "7" # Renamed preset in svtav1 encoder
499499
qp: Optional[Union[int, float]] = 24
500-
qp_mode: str = "qp"
500+
qp_mode: str = "crf"
501501
bitrate: Optional[str] = None
502502
svtav1_params: list[str] = Field(default_factory=list)
503503

fastflix/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
__version__ = "5.10.0"
3+
__version__ = "5.10.1"
44
__author__ = "Chris Griffith"

fastflix/widgets/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,12 @@ def save(self):
351351
restart_needed = True
352352
self.app.fastflix.config.hdr10plus_parser = new_hdr10_parser
353353

354-
new_output_path = False
354+
new_output_path = None
355355
if self.output_path_line_edit.text().strip() and not self.default_output_dir.isChecked():
356356
new_output_path = Path(self.output_path_line_edit.text())
357357
self.app.fastflix.config.output_directory = new_output_path
358358

359-
new_source_path = False
359+
new_source_path = None
360360
if self.source_path_line_edit.text().strip() and not self.default_source_dir.isChecked():
361361
new_source_path = Path(self.source_path_line_edit.text())
362362
self.app.fastflix.config.source_directory = new_source_path

fastflix/widgets/windows/audio_conversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
from PySide6 import QtWidgets, QtGui
55

6+
from fastflix.exceptions import FastFlixError
67
from fastflix.models.fastflix_app import FastFlixApp
78
from fastflix.models.encode import AudioTrack
8-
9-
9+
from fastflix.shared import error_message
1010
from fastflix.language import t
1111

1212
__all__ = ["AudioConversion"]

0 commit comments

Comments
 (0)