Skip to content

Commit a27c355

Browse files
Version 5.12.0 (#653)
* Adding automatic downloads for rigaya encoders on Windows * Adding #45 audio normalization (thanks to HannesJo0139, Marco Ravich, Kirill, Werner Robitza, Type-Delta, Xoanon88) * Adding ability to add subtitle or audio track * Fixing custom_crf not being found (thanks to Norbert) * Fixing missing space to CRF (thanks to Noelle) --------- Co-authored-by: Noelle Leigh <5957867+noelleleigh@users.noreply.github.com>
1 parent c284c3a commit a27c355

37 files changed

+860
-55
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.12.0
4+
5+
* Adding automatic downloads for rigaya encoders on Windows
6+
* Adding #45 audio normalization (thanks to HannesJo0139, Marco Ravich, Kirill, Werner Robitza, Type-Delta, Xoanon88)
7+
* Adding ability to add subtitle or audio track
8+
* Fixing custom_crf not being found (thanks to Norbert)
9+
* Fixing missing space to CRF (thanks to Noelle)
10+
311
## Version 5.11.0
412

513
* Adding parallel encoding options for rigaya hardware encoders (thanks to Hexenhammer)

fastflix/application.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import logging
3+
import platform
34
import sys
45

56
import coloredlogs
@@ -13,9 +14,10 @@
1314
from fastflix.models.fastflix_app import FastFlixApp
1415
from fastflix.program_downloads import ask_for_ffmpeg, grab_stable_ffmpeg
1516
from fastflix.resources import main_icon, breeze_styles_path
16-
from fastflix.shared import file_date, message, latest_fastflix, DEVMODE
17+
from fastflix.shared import file_date, message, latest_fastflix, DEVMODE, yes_no_message
1718
from fastflix.widgets.container import Container
1819
from fastflix.widgets.progress_bar import ProgressBar, Task
20+
from fastflix.gpu_detect import automatic_rigaya_download
1921

2022
logger = logging.getLogger("fastflix")
2123

@@ -81,6 +83,7 @@ def init_encoders(app: FastFlixApp, **_):
8183
from fastflix.encoders.vaapi_hevc import main as vaapi_hevc_plugin
8284
from fastflix.encoders.vaapi_vp9 import main as vaapi_vp9_plugin
8385
from fastflix.encoders.vaapi_mpeg2 import main as vaapi_mpeg2_plugin
86+
from fastflix.encoders.modify import main as modify_plugin
8487

8588
encoders = [
8689
hevc_plugin,
@@ -101,6 +104,7 @@ def init_encoders(app: FastFlixApp, **_):
101104
vaapi_vp9_plugin,
102105
vaapi_mpeg2_plugin,
103106
copy_plugin,
107+
modify_plugin,
104108
]
105109

106110
if DEVMODE:
@@ -169,6 +173,7 @@ def app_setup(
169173
app.fastflix.config = Config()
170174
init_fastflix_directories(app)
171175
init_logging(app)
176+
logger.debug(f"GUI logging initialized, saving to {app.fastflix.log_path}")
172177
upgraded = app.fastflix.config.upgrade_check()
173178
if upgraded:
174179
# No translation will be possible in this case
@@ -215,6 +220,21 @@ def app_setup(
215220

216221
logger.setLevel(app.fastflix.config.logging_level)
217222

223+
if platform.system() == "Windows":
224+
if app.fastflix.config.auto_gpu_check is None:
225+
app.fastflix.config.auto_gpu_check = yes_no_message(
226+
t(
227+
"Do you want FastFlix to automatically detect your GPUs and download the optional encoders for them?\n\nThis will include downloading 7zip on Windows platform."
228+
),
229+
title="Allow Optional Downloads",
230+
)
231+
if app.fastflix.config.auto_gpu_check:
232+
ProgressBar(
233+
app, [Task(name=t("Detect GPUs"), command=automatic_rigaya_download)], signal_task=True, can_cancel=True
234+
)
235+
236+
app.fastflix.config.save()
237+
218238
startup_tasks = [
219239
Task(t("Gather FFmpeg version"), ffmpeg_configuration),
220240
Task(t("Gather FFprobe version"), ffprobe_configuration),
@@ -246,7 +266,6 @@ def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock, por
246266
# import tracemalloc
247267
#
248268
# tracemalloc.start()
249-
250269
app = app_setup(
251270
enable_scaling=enable_scaling,
252271
portable_mode=portable_mode,

fastflix/data/icons/loading.gif

85.3 KB
Loading

fastflix/data/languages.yaml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10787,3 +10787,189 @@ Enable either auto split or parallel encoding mode.:
1078710787
ukr: Увімкніть режим автоматичного розділення або паралельного кодування.
1078810788
kor: 자동 분할 또는 병렬 인코딩 모드를 활성화합니다.
1078910789
ron: Activați divizarea automată sau modul de codare paralelă.
10790+
Update Rigaya's Encoders:
10791+
eng: Update Rigaya's Encoders
10792+
deu: Aktualisieren von Rigayas Encodern
10793+
fra: Mise à jour des encodeurs de Rigaya
10794+
ita: Aggiornare gli encoder di Rigaya
10795+
spa: Actualizar los codificadores de Rigaya
10796+
jpn: リガヤのエンコーダーを更新
10797+
rus: Обновление кодировщиков Rigaya
10798+
por: Atualizar os codificadores de Rigaya
10799+
swe: Uppdatera Rigayas kodare
10800+
pol: Aktualizacja koderów Rigaya
10801+
chs: 更新 Rigaya 编码器
10802+
ukr: Оновлення кодерів Rigaya
10803+
kor: 리가야의 인코더 업데이트
10804+
ron: Actualizarea codificatoarelor Rigaya
10805+
Detect GPUs:
10806+
eng: Detect GPUs
10807+
deu: GPUs erkennen
10808+
fra: Détecter les GPU
10809+
ita: Rilevare le GPU
10810+
spa: Detectar GPU
10811+
jpn: GPUの検出
10812+
rus: Обнаружение графических процессоров
10813+
por: Detetar GPUs
10814+
swe: Detektera GPU:er
10815+
pol: Wykrywanie procesorów graficznych
10816+
chs: 检测 GPU
10817+
ukr: Виявлення графічних процесорів
10818+
kor: GPU 감지
10819+
ron: Detectarea GPU-urilor
10820+
Run Audio Normalize:
10821+
eng: Run Audio Normalize
10822+
deu: Audio normalisieren ausführen
10823+
fra: Exécuter la normalisation audio
10824+
ita: Esegui normalizzazione audio
10825+
spa: Ejecutar Normalizar Audio
10826+
jpn: オーディオ・ノーマライズの実行
10827+
rus: Выполнить нормализацию звука
10828+
por: Executar normalização de áudio
10829+
swe: Kör ljud Normalisera
10830+
pol: Uruchom normalizację dźwięku
10831+
chs: 运行音频正常化
10832+
ukr: Запустити нормалізацію звуку
10833+
kor: 오디오 정규화 실행
10834+
ron: Run Audio Normalize
10835+
Add Audio Track:
10836+
eng: Add Audio Track
10837+
deu: Audiospur hinzufügen
10838+
fra: Ajouter une piste audio
10839+
ita: Aggiungi traccia audio
10840+
spa: Añadir pista de audio
10841+
jpn: オーディオトラックの追加
10842+
rus: Добавить аудиодорожку
10843+
por: Adicionar faixa de áudio
10844+
swe: Lägg till ljudspår
10845+
pol: Dodaj ścieżkę audio
10846+
chs: 添加音轨
10847+
ukr: Додати аудіодоріжку
10848+
kor: 오디오 트랙 추가
10849+
ron: Adăugați o pistă audio
10850+
Add Text Based Subtitle Track:
10851+
eng: Add Text Based Subtitle Track
10852+
deu: Textbasierte Untertitelspur hinzufügen
10853+
fra: Ajouter une piste de sous-titres basée sur le texte
10854+
ita: Aggiungere una traccia di testo per i sottotitoli
10855+
spa: Añadir pista de subtítulos basada en texto
10856+
jpn: テキストベースの字幕トラックを追加
10857+
rus: Добавление дорожки субтитров на основе текста
10858+
por: Adicionar faixa de legendas com base em texto
10859+
swe: Lägg till textbaserat undertextspår
10860+
pol: Dodaj tekstową ścieżkę napisów
10861+
chs: 添加基于文本的字幕轨道
10862+
ukr: Додавання текстової доріжки субтитрів
10863+
kor: 텍스트 기반 자막 트랙 추가
10864+
ron: Adăugați o pistă de subtitrare bazată pe text
10865+
Audio Normalization:
10866+
eng: Audio Normalization
10867+
deu: Audio-Normalisierung
10868+
fra: Normalisation audio
10869+
ita: Normalizzazione audio
10870+
spa: Normalización de audio
10871+
jpn: オーディオ・ノーマライゼーション
10872+
rus: Нормализация звука
10873+
por: Normalização de áudio
10874+
swe: Normalisering av ljud
10875+
pol: Normalizacja dźwięku
10876+
chs: 音频正常化
10877+
ukr: Нормалізація звуку
10878+
kor: 오디오 노멀라이제이션
10879+
ron: Normalizare audio
10880+
This will run the audio normalization process on all streams of:
10881+
eng: This will run the audio normalization process on all streams of
10882+
deu: Dadurch wird der Audionormalisierungsprozess für alle Streams von
10883+
fra: Cette opération exécute le processus de normalisation audio sur tous les flux
10884+
de
10885+
ita: Eseguirà il processo di normalizzazione audio su tutti i flussi di
10886+
spa: Esto ejecutará el proceso de normalización de audio en todos los flujos de
10887+
jpn: のすべてのストリームに対してオーディオ正規化処理を実行します。
10888+
rus: Это запустит процесс нормализации звука для всех потоков
10889+
por: Isso executará o processo de normalização de áudio em todos os fluxos de
10890+
swe: Detta kommer att köra ljudnormaliseringsprocessen på alla strömmar av
10891+
pol: Spowoduje to uruchomienie procesu normalizacji dźwięku na wszystkich strumieniach
10892+
chs: 这将在所有音频流上运行音频规范化程序。
10893+
ukr: Це запустить процес нормалізації звуку на всіх потоках
10894+
kor: 이렇게 하면 다음의 모든 스트림에서 오디오 정규화 프로세스가 실행됩니다.
10895+
ron: Aceasta va rula procesul de normalizare audio pe toate fluxurile de
10896+
'and create an output file with audio format ':
10897+
eng: 'and create an output file with audio format '
10898+
deu: und erstellen Sie eine Ausgabedatei im Audioformat
10899+
fra: et créer un fichier de sortie au format audio
10900+
ita: e creare un file di uscita con il formato audio
10901+
spa: y crear un archivo de salida con formato de audio
10902+
jpn: というオーディオ・フォーマットで出力ファイルを作成する。
10903+
rus: и создайте выходной файл с аудиоформатом
10904+
por: e criar um ficheiro de saída com o formato de áudio
10905+
swe: och skapa en utdatafil med ljudformat
10906+
pol: i utworzyć plik wyjściowy w formacie audio
10907+
chs: 并创建音频格式的输出文件
10908+
ukr: і створіть вихідний файл у форматі аудіо
10909+
kor: 를 클릭하고 오디오 형식의 출력 파일을 생성합니다.
10910+
ron: și creați un fișier de ieșire cu format audio
10911+
Please make sure the source and output files are specified:
10912+
eng: Please make sure the source and output files are specified
10913+
deu: Bitte stellen Sie sicher, dass die Quell- und Ausgabedateien angegeben sind
10914+
fra: Veuillez vous assurer que les fichiers source et de sortie sont spécifiés.
10915+
ita: Accertarsi che i file di origine e di uscita siano specificati
10916+
spa: Asegúrese de que se especifican los archivos de origen y de salida
10917+
jpn: ソースファイルと出力ファイルが指定されていることを確認してください。
10918+
rus: Убедитесь, что исходный и выходной файлы указаны
10919+
por: Certifique-se de que os ficheiros de origem e de saída são especificados
10920+
swe: Kontrollera att käll- och utdatafilerna är specificerade
10921+
pol: Upewnij się, że podano pliki źródłowe i wyjściowe
10922+
chs: 请确保指定了源文件和输出文件
10923+
ukr: Будь ласка, переконайтеся, що вказані вихідний та вихідний файли
10924+
kor: 소스 및 출력 파일이 지정되었는지 확인하세요.
10925+
ron: Vă rugăm să vă asigurați că fișierele sursă și de ieșire sunt specificate
10926+
? "Do you want FastFlix to automatically detect your GPUs and download the optional
10927+
encoders for them?\n\nThis will include downloading 7zip on Windows platform."
10928+
: eng: "Do you want FastFlix to automatically detect your GPUs and download the optional
10929+
encoders for them?\n\nThis will include downloading 7zip on Windows platform."
10930+
deu: "Möchten Sie, dass FastFlix Ihre GPUs automatisch erkennt und die optionalen
10931+
Encoder für sie herunterlädt?\n\nDazu gehört auch das Herunterladen von 7zip auf
10932+
der Windows-Plattform."
10933+
fra: "Voulez-vous que FastFlix détecte automatiquement vos GPU et télécharge les
10934+
encodeurs optionnels pour eux ?\n\nCela inclut le téléchargement de 7zip sur la
10935+
plateforme Windows."
10936+
ita: "Volete che FastFlix rilevi automaticamente le vostre GPU e scarichi gli encoder
10937+
opzionali per esse?\n\nQuesto include il download di 7zip su piattaforma Windows."
10938+
spa: "¿Quieres que FastFlix detecte automáticamente tus GPU y descargue los codificadores
10939+
opcionales para ellas?\n\nEsto incluirá la descarga de 7zip en la plataforma Windows."
10940+
jpn: "FastFlixにGPUを自動的に検出させ、オプションのエンコーダをダウンロードさせたいですか?\n\nこれにはWindowsプラットフォームでの7zipのダウンロードも含まれます。"
10941+
rus: "Хотите, чтобы FastFlix автоматически определял ваши графические процессоры
10942+
и загружал для них дополнительные кодировщики?\n\nЭто включает загрузку 7zip на
10943+
платформе Windows."
10944+
por: "Quer que o FastFlix detecte automaticamente as suas GPUs e transfira os codificadores
10945+
opcionais para elas?\n\nIsso incluirá o download do 7zip na plataforma Windows."
10946+
swe: "Vill du att FastFlix automatiskt ska upptäcka dina GPU: er och ladda ner de
10947+
valfria kodarna för dem?\n\nDetta kommer att inkludera nedladdning av 7zip på
10948+
Windows-plattformen."
10949+
pol: "Czy chcesz, aby FastFlix automatycznie wykrywał twoje procesory graficzne
10950+
i pobierał dla nich opcjonalne kodery?\n\nObejmuje to pobranie programu 7zip na
10951+
platformę Windows."
10952+
chs: "您希望 FastFlix 自动检测您的 GPU 并为其下载可选编码器吗?\n\n这包括在 Windows 平台上下载 7zip。"
10953+
ukr: "Хочете, щоб FastFlix автоматично визначав ваш графічний процесор і завантажував
10954+
додаткові кодеки для нього?\n\nДля цього потрібно завантажити 7zip на платформі
10955+
Windows."
10956+
kor: "FastFlix가 자동으로 GPU를 감지하여 옵션 인코더를 다운로드하도록 하시겠습니까?\n\n여기에는 Windows 플랫폼에서 7zip
10957+
다운로드가 포함됩니다."
10958+
ron: "Doriți ca FastFlix să detecteze automat GPU-urile dvs. și să descarce codurile
10959+
opționale pentru acestea?\n\nAceasta va include descărcarea 7zip pe platforma
10960+
Windows."
10961+
Allow Optional Downloads:
10962+
eng: Allow Optional Downloads
10963+
deu: Optionale Downloads zulassen
10964+
fra: Autoriser les téléchargements facultatifs
10965+
ita: Consentire i download opzionali
10966+
spa: Permitir descargas opcionales
10967+
jpn: オプションのダウンロードを許可する
10968+
rus: Разрешить необязательные загрузки
10969+
por: Permitir transferências opcionais
10970+
swe: Tillåt valfria nedladdningar
10971+
pol: Zezwalaj na opcjonalne pobieranie
10972+
chs: 允许可选下载
10973+
ukr: Дозволити додаткові завантаження
10974+
kor: 선택적 다운로드 허용
10975+
ron: Permiteți descărcări opționale

fastflix/encoders/common/setting_panel.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def _add_modes(
364364
self.widgets.mode.buttonClicked.connect(self.set_mode)
365365
qp_help = (
366366
f"{qp_name.upper()} {t('is extremely source dependant')},\n"
367-
f"{t('the resolution-to-')}{qp_name.upper()}{t('are mere suggestions!')}"
367+
f"{t('the resolution-to-')}{qp_name.upper()} {t('are mere suggestions!')}"
368368
)
369369
config_opt = None
370370
if not disable_bitrate:
@@ -375,7 +375,7 @@ def _add_modes(
375375
self.widgets.bitrate.addItems(recommended_bitrates)
376376
self.widgets.bitrate_passes = QtWidgets.QComboBox()
377377
self.widgets.bitrate_passes.addItems(["1", "2"])
378-
self.widgets.bitrate_passes.currentIndexChanged.connect(lambda: self.mode_update())
378+
379379
config_opt = self.app.fastflix.config.encoder_opt(self.profile_name, "bitrate")
380380
custom_bitrate = False
381381
try:
@@ -387,7 +387,6 @@ def _add_modes(
387387
self.widgets.bitrate.setCurrentText("Custom")
388388
else:
389389
self.widgets.bitrate.setCurrentIndex(default_bitrate_index)
390-
self.widgets.bitrate.currentIndexChanged.connect(lambda: self.mode_update())
391390
self.widgets.custom_bitrate = QtWidgets.QLineEdit("3000" if not custom_bitrate else config_opt)
392391
self.widgets.custom_bitrate.setValidator(QtGui.QDoubleValidator())
393392
self.widgets.custom_bitrate.setFixedWidth(100)
@@ -429,7 +428,6 @@ def _add_modes(
429428
if default_qp_index is not None:
430429
self.widgets[qp_name].setCurrentIndex(default_qp_index)
431430

432-
self.widgets[qp_name].currentIndexChanged.connect(lambda: self.mode_update())
433431
if not disable_custom_qp:
434432
self.widgets[f"custom_{qp_name}"] = QtWidgets.QLineEdit("30" if not custom_qp else str(qp_value))
435433
self.widgets[f"custom_{qp_name}"].setFixedWidth(100)
@@ -443,6 +441,9 @@ def _add_modes(
443441
self.bitrate_radio.setChecked(True)
444442
if not disable_bitrate:
445443
qp_box_layout.addWidget(self.qp_radio)
444+
self.widgets.bitrate_passes.currentIndexChanged.connect(lambda: self.mode_update())
445+
self.widgets.bitrate.currentIndexChanged.connect(lambda: self.mode_update())
446+
self.widgets[qp_name].currentIndexChanged.connect(lambda: self.mode_update())
446447
qp_box_layout.addWidget(self.widgets[qp_name], 1)
447448
qp_box_layout.addStretch(1)
448449
qp_box_layout.addStretch(1)

fastflix/encoders/copy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
enable_subtitles = True
1616
enable_audio = True
1717
enable_attachments = True
18-
18+
enable_advanced = False
1919

2020
from fastflix.encoders.copy.command_builder import build
2121
from fastflix.encoders.copy.settings_panel import Copy as settings_panel

fastflix/encoders/hevc_x265/settings_panel.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,7 @@ def init_modes(self):
566566
return self._add_modes(recommended_bitrates, recommended_crfs, qp_name="crf", show_bitrate_passes=True)
567567

568568
def mode_update(self):
569-
if "custom_crf" in self.widgets:
570-
self.widgets.custom_crf.setDisabled(self.widgets.crf.currentText() != "Custom")
569+
self.widgets.custom_crf.setDisabled(self.widgets.crf.currentText() != "Custom")
571570
self.widgets.custom_bitrate.setDisabled(self.widgets.bitrate.currentText() != "Custom")
572571
self.main.build_commands()
573572

fastflix/encoders/modify/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)