Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.7.1 #305

Merged
merged 19 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b898b05
* Fixing #272 Codec drop down size fix (thanks to kachijs)
cdgriffith Jan 9, 2022
e5ac3a6
Updating encoder icons to be square to fill in drop down better
cdgriffith Jan 10, 2022
e48bdd0
* Fixing #278 FastFlix occasionally getting stuck on a single video i…
cdgriffith Jan 19, 2022
c7e2572
Fix parsing of output with -psnr on and add 640k audio bitrate (#287)
ObviousInRetrospect Jan 20, 2022
1ae176f
* Adding Japanese, Portuguese, Russian, Swedish, and Polish translations
cdgriffith Jan 23, 2022
2aa3492
Fix pyinstaller inclusion of Cython files
cdgriffith Jan 23, 2022
d6af244
Merge remote-tracking branch 'origin/master' into develop
cdgriffith Feb 1, 2022
aab595a
* Fixing concat builder behavior to work smoother
cdgriffith Feb 3, 2022
7ad424a
Audio profile select (#298)
cdgriffith Mar 5, 2022
a7996a5
Adding new options to svtav1
cdgriffith Mar 7, 2022
f9f0743
Adding HDR10 support for svtav1
cdgriffith Mar 8, 2022
d707bf8
Adding OpenCL support for Remove HDR to speed it up
cdgriffith Mar 9, 2022
6fe53be
Fixing default audio profile select if no filters provided
cdgriffith Mar 9, 2022
da99e61
Fixing profile audio for sane selection and proper downmix
cdgriffith Mar 10, 2022
1ac4d35
Fixing SVT AV1 check for color space in command builder
cdgriffith Mar 10, 2022
d17d1cb
* Adding #294 NVEncC 10-bit encoding mode for 8-bit source (thanks to…
cdgriffith Mar 11, 2022
40c25c1
Merge remote-tracking branch 'origin/master' into develop
cdgriffith Mar 11, 2022
ae11015
* Fixing #304 New profile Audio conversion downmix and bitrate issues…
cdgriffith Mar 11, 2022
aca421d
Increasing profile window size and adding missing translations
cdgriffith Mar 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 4.7.1

* Fixing #304 New profile Audio conversion downmix and bitrate issues (thanks to wynterca)

## Version 4.7.0

* Adding #164 audio matching in profiles (thanks to bmcassagne)
Expand All @@ -10,6 +14,7 @@
* Adding OpenCL support for Remove HDR to speed it up
* Changing FFmpeg download to look for latest master GPL builds
* Fixing #296 low quality auto-crop due to high rounding, increasing accuracy from 16 to 2 pixels (thanks to Rayman24365)
* Fixing #302 unclear when VBV is enabled (thanks to Paul Huckstepp)
* Fixing concat builder behavior to work smoother
* Fixing thumbnail generation for concat images

Expand Down
24 changes: 24 additions & 0 deletions fastflix/data/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6106,3 +6106,27 @@ Please load in a video to configure a new profile:
por: Por favor, carregue em um vídeo para configurar um novo perfil
swe: Ladda in en video för att konfigurera en ny profil
pol: Wczytaj film, jak skonfigurować nowy profil
10-bit:
eng: 10-bit
deu: 10-bit
fra: 10-bit
ita: 10-bit
spa: 10-bit
zho: 10位
jpn: 10ビット
rus: 10-бит
por: 10 bit
swe: 10-bit
pol: 10-bit
This encoder does not support duplicating audio tracks, please remove copied tracks!:
eng: This encoder does not support duplicating audio tracks, please remove copied tracks!
deu: Dieser Encoder unterstützt das Duplizieren von Audiospuren nicht, bitte entfernen Sie die kopierten Spuren!
fra: Cet encodeur ne prend pas en charge la duplication des pistes audio, veuillez supprimer les pistes copiées !
ita: Questo encoder non supporta la duplicazione di tracce audio, per favore rimuovi le tracce copiate!
spa: Este codificador no admite la duplicación de pistas de audio, por favor, elimine las pistas copiadas.
zho: 此编码器不支持复制音轨,请删除已复制的音轨!
jpn: このエンコーダーはオーディオトラックの複製をサポートしていません。コピーしたトラックを削除してください。
rus: Этот кодер не поддерживает дублирование звуковых дорожек, пожалуйста, удалите скопированные дорожки!
por: Este codificador não suporta a duplicação de faixas de áudio, por favor remova as faixas copiadas!
swe: Den här kodaren stöder inte duplicering av ljudspår, ta bort kopierade spår!
pol: Ten koder nie obsługuje duplikowania ścieżek audio, usuń skopiowane ścieżki!
21 changes: 20 additions & 1 deletion fastflix/models/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
VCEEncCSettings,
)

from fastflix.encoders.common.audio import channel_list

__all__ = ["MatchItem", "MatchType", "AudioMatch", "Profile", "SubtitleMatch", "AdvancedOptions"]


Expand All @@ -47,7 +49,7 @@ class AudioMatch(BaseModel):
match_input: str = "*"
conversion: Optional[str] = None
bitrate: Optional[str] = None
downmix: Optional[int] = None
downmix: Optional[Union[str, int]] = None

@validator("match_type")
def match_type_must_be_enum(cls, v):
Expand All @@ -61,6 +63,23 @@ def match_item_must_be_enum(cls, v):
return MatchType(v[0])
return MatchItem(v)

@validator("downmix")
def downmix_as_string(cls, v):
fixed = {1: "monoo", 2: "stereo", 3: "2.1", 4: "3.1", 5: "5.0", 6: "5.1", 7: "6.1", 8: "7.1"}
if isinstance(v, str) and v.isnumeric():
v = int(v)
if isinstance(v, int):
if v in fixed:
return fixed[v]
return None
return v

@validator("bitrate")
def bitrate_k_end(cls, v):
if v and not v.endswith("k"):
return f"{v}k"
return v


class SubtitleMatch(BaseModel):
match_type: Union[MatchType, List[MatchType]]
Expand Down
2 changes: 1 addition & 1 deletion fastflix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "4.7.0"
__version__ = "4.7.1"
__author__ = "Chris Griffith"
26 changes: 22 additions & 4 deletions fastflix/widgets/panels/audio_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,21 @@ def gen_track(
all_info=audio_track,
disable_dup=disable_dups,
)

if conversion:
new_track.widgets.convert_to.setCurrentText(conversion)
new_track.widgets.convert_bitrate.setCurrentText(bitrate)
if downmix and downmix < audio_track.channels:
new_track.widgets.downmix.setCurrentIndex(downmix)
# Downmix must come first
if downmix:
new_track.widgets.downmix.setCurrentText(downmix)
if conversion in lossless:
new_track.widgets.convert_bitrate.setDisabled(True)
else:
if bitrate not in [
new_track.widgets.convert_bitrate.itemText(i)
for i in range(new_track.widgets.convert_bitrate.count())
]:
new_track.widgets.convert_bitrate.addItem(bitrate)
new_track.widgets.convert_bitrate.setCurrentText(bitrate)
return new_track

# First populate all original tracks and disable them
Expand Down Expand Up @@ -574,7 +584,15 @@ def reload(self, original_tracks: List[AudioTrack], audio_formats):

new_track.widgets.downmix.setCurrentText(track.downmix)
new_track.widgets.convert_to.setCurrentText(track.conversion_codec)
new_track.widgets.convert_bitrate.setCurrentText(track.conversion_bitrate)
if track.conversion_codec in lossless:
new_track.widgets.convert_bitrate.setDisabled(True)
else:
if track.conversion_bitrate not in [
new_track.widgets.convert_bitrate.itemText(i)
for i in range(new_track.widgets.convert_bitrate.count())
]:
new_track.widgets.convert_bitrate.addItem(track.conversion_bitrate)
new_track.widgets.convert_bitrate.setCurrentText(track.conversion_bitrate)
new_track.widgets.title.setText(track.title)
if track.language:
new_track.widgets.language.setCurrentText(Lang(track.language).name)
Expand Down
9 changes: 5 additions & 4 deletions fastflix/widgets/windows/profile_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
)
from fastflix.models.profiles import AudioMatch, Profile, MatchItem, MatchType, AdvancedOptions
from fastflix.shared import error_message
from fastflix.encoders.common.audio import channel_list

language_list = sorted((k for k, v in Lang._data["name"].items() if v["pt2B"] and v["pt1"]), key=lambda x: x.lower())

Expand Down Expand Up @@ -96,7 +97,7 @@ def __init__(self, parent_list, app, main, parent, index):
self.grid.addWidget(self.kill_myself, 0, 5, 1, 5)

self.downmix = QtWidgets.QComboBox()
self.downmix.addItems(["No Downmix"] + [str(x) for x in range(1, 16)])
self.downmix.addItems([t("No Downmix")] + list(channel_list.keys()))
self.downmix.setCurrentIndex(0)
self.downmix.view().setFixedWidth(self.downmix.minimumSizeHint().width() + 50)

Expand All @@ -106,7 +107,7 @@ def __init__(self, parent_list, app, main, parent, index):
self.convert_to.view().setFixedWidth(self.convert_to.minimumSizeHint().width() + 50)

self.bitrate = QtWidgets.QComboBox()
self.bitrate.addItems([str(x) for x in range(32, 1024, 32)])
self.bitrate.addItems([f"{x}k" for x in range(32, 1024, 32)])
self.bitrate.view().setFixedWidth(self.bitrate.minimumSizeHint().width() + 50)

self.bitrate.setDisabled(True)
Expand Down Expand Up @@ -166,7 +167,7 @@ def get_settings(self):
match_input=match_input_value,
conversion=self.convert_to.currentText() if self.convert_to.currentIndex() > 0 else None,
bitrate=self.bitrate.currentText(),
downmix=self.downmix.currentIndex(),
downmix=self.downmix.currentText(),
)


Expand Down Expand Up @@ -343,7 +344,7 @@ def __init__(self, app: FastFlixApp, main, *args, **kwargs):
self.main = main
self.config_file = self.app.fastflix.config.config_path
self.setWindowTitle(t("New Profile"))
self.setMinimumSize(500, 450)
self.setMinimumSize(500, 600)
layout = QtWidgets.QGridLayout()

profile_name_label = QtWidgets.QLabel(t("Profile Name"))
Expand Down