Skip to content

Commit

Permalink
Version 4.8.0 (#316)
Browse files Browse the repository at this point in the history
* Adding #313 basic vsync support for hardware encoders (thanks to Wontell)
* Adding #312 additional pixel formats for most encoders (thanks to Owen Quinlan)
* Adding "Auto" profile for VCEncC
* Changing #292 back to PySide2 to be compatible with Windows 7 and 8 (thanks to Causemic)
* Fixing #310 QT was complaining about some PNG formats (thanks to Don Gafford)
* Fixing #315 HDR10 info not parsed from subsequent video tracks than the first (thanks to msaintauret)
* Fixing profile not being passed for AVC with VCEencC and stuck on Baseline
* Fixing that force 10-bit encoding for NVEencC was not set from profiles properly (thanks to wynterca)
  • Loading branch information
cdgriffith authored Mar 27, 2022
1 parent 61519a3 commit c4855c8
Show file tree
Hide file tree
Showing 65 changed files with 212 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Install PySide6 apt requirements
- name: Install PySide2 apt requirements
run: |
sudo apt update
sudo apt install libopengl0 freeglut3 freeglut3-dev libxcb-icccm4 libxkbcommon-x11-0 libxcb-xkb1 libxcb-render-util0 libxcb-randr0 libxcb-keysyms1 libxcb-image0 -y
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
python-version: 3.8

- name: Install PySide6 requirements
- name: Install PySide2 requirements
run: |
sudo apt update
sudo apt install libopengl0 freeglut3 freeglut3-dev -y
Expand All @@ -46,5 +46,5 @@ jobs:
- name: Run tests
env:
PYTEST_QT_API: pyside6
PYTEST_QT_API: pyside2
run: pytest tests
11 changes: 11 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## Version 4.8.0

* Adding #313 basic vsync support for hardware encoders (thanks to Wontell)
* Adding #312 additional pixel formats for most encoders (thanks to Owen Quinlan)
* Adding "Auto" profile for VCEncC
* Changing #292 back to PySide2 to be compatible with Windows 7 and 8 (thanks to Causemic)
* Fixing #315 HDR10 info not parsed from subsequent video tracks than the first (thanks to msaintauret)
* Fixing #310 QT was complaining about some PNG formats (thanks to Don Gafford)
* Fixing profile not being passed for AVC with VCEencC and stuck on Baseline
* Fixing that force 10-bit encoding for NVEencC was not set from profiles properly (thanks to wynterca)

## Version 4.7.1

* Fixing #304 New profile Audio conversion downmix and bitrate issues (thanks to wynterca)
Expand Down
4 changes: 2 additions & 2 deletions docs/build-licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FastFlix's is MIT licenced.
* mistune (BSD)
* coloredlogs (MIT)
* colorama (BSD)
* PySide6 (LGPLv3)
* PySide2 (LGPLv3)

# Used for creating binary
* PyInstaller (Modified GPL)
Expand Down Expand Up @@ -257,7 +257,7 @@ to indicate the copyright and license terms:

The full license is in the file COPYING.txt, distributed with this software.

## PySide6
## PySide2

### GNU LESSER GENERAL PUBLIC LICENSE

Expand Down
2 changes: 1 addition & 1 deletion fastflix/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import coloredlogs
import reusables
from PySide6 import QtGui, QtWidgets, QtCore
from PySide2 import QtGui, QtWidgets, QtCore

from fastflix.flix import ffmpeg_audio_encoders, ffmpeg_configuration, ffprobe_configuration, ffmpeg_opencl_support
from fastflix.language import t
Expand Down
12 changes: 12 additions & 0 deletions fastflix/data/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6130,3 +6130,15 @@ This encoder does not support duplicating audio tracks, please remove copied tra
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!
Not supported by rigaya's hardware encoders:
eng: Not supported by rigaya's hardware encoders
deu: Wird von Rigayas Hardware-Encodern nicht unterstützt
fra: Non supporté par les encodeurs matériels de rigaya
ita: Non supportato dagli encoder hardware di rigaya
spa: No es compatible con los codificadores de hardware de Rigaya
zho: 不被Rigaya的硬件编码器所支持
jpn: リガヤのハードウェアエンコーダには対応していません。
rus: Не поддерживается аппаратными кодерами rigaya
por: Não suportado pelos codificadores de hardware da rigaya
swe: Stöds inte av Rigayas hårdvarukodare
pol: Nieobsługiwane przez nadajniki sprzętowe firmy rigaya
Binary file modified fastflix/data/styles/breeze_styles/onyx/checkbox_checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastflix/data/styles/breeze_styles/onyx/checkbox_unchecked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastflix/data/styles/breeze_styles/onyx/radio_checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastflix/data/styles/breeze_styles/onyx/radio_unchecked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions fastflix/encoders/av1_aom/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging

from box import Box
from PySide6 import QtCore, QtWidgets
from PySide2 import QtCore, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand All @@ -29,7 +29,17 @@

recommended_crfs = ["34", "32", "30", "28", "26", "24", "22", "20", "Custom"]

pix_fmts = ["8-bit: yuv420p", "10-bit: yuv420p10le"]
pix_fmts = [
"8-bit: yuv420p",
"10-bit: yuv420p10le",
"12-bit: yuv420p12le",
"8-bit 422: yuv422p",
"8-bit 444: yuv444p",
"10-bit 422: yuv422p10le",
"10-bit 444: yuv444p10le",
"12-bit 422: yuv422p12le",
"12-bit 444: yuv444p12le",
]


class AV1(SettingPanel):
Expand Down
14 changes: 12 additions & 2 deletions fastflix/encoders/avc_x264/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging

from box import Box
from PySide6 import QtCore, QtWidgets
from PySide2 import QtCore, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down Expand Up @@ -48,7 +48,17 @@
"Custom",
]

pix_fmts = ["8-bit: yuv420p", "10-bit: yuv420p10le"]
pix_fmts = [
"8-bit: yuv420p",
"10-bit: yuv420p10le",
"12-bit: yuv420p12le",
"8-bit 422: yuv422p",
"8-bit 444: yuv444p",
"10-bit 422: yuv422p10le",
"10-bit 444: yuv444p10le",
"12-bit 422: yuv422p12le",
"12-bit 444: yuv444p12le",
]


class AVC(SettingPanel):
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/common/setting_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

from box import Box
from PySide6 import QtGui, QtWidgets, QtCore
from PySide2 import QtGui, QtWidgets, QtCore

from fastflix.exceptions import FastFlixInternalException
from fastflix.language import t
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/copy/settings_panel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import logging

from PySide6 import QtWidgets
from PySide2 import QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/ffmpeg_hevc_nvenc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging

from box import Box
from PySide6 import QtCore, QtWidgets
from PySide2 import QtCore, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/gif/settings_panel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from box import Box
from PySide6 import QtWidgets
from PySide2 import QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.models.encode import GIFSettings
Expand Down
43 changes: 26 additions & 17 deletions fastflix/encoders/hevc_x265/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

from box import Box
from PySide6 import QtCore, QtGui, QtWidgets
from PySide2 import QtCore, QtGui, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down Expand Up @@ -52,7 +52,17 @@
"Custom",
]

pix_fmts = ["8-bit: yuv420p", "10-bit: yuv420p10le", "12-bit: yuv420p12le"]
pix_fmts = [
"8-bit: yuv420p",
"10-bit: yuv420p10le",
"12-bit: yuv420p12le",
"8-bit 422: yuv422p",
"8-bit 444: yuv444p",
"10-bit 422: yuv422p10le",
"10-bit 444: yuv444p10le",
"12-bit 422: yuv422p12le",
"12-bit 444: yuv444p12le",
]


def get_breaker():
Expand Down Expand Up @@ -492,30 +502,29 @@ def hdr_opts():
self.updating_settings = False
return

bit_depth = self.app.fastflix.current_video.streams["video"][self.main.video_track].bit_depth
if self.main.remove_hdr:
self.widgets.pix_fmt.clear()
self.widgets.pix_fmt.addItems([pix_fmts[0]])
self.widgets.pix_fmt.setCurrentIndex(0)
# self.widgets.pix_fmt.clear()
# self.widgets.pix_fmt.addItems([pix_fmts[0]])
# self.widgets.pix_fmt.setCurrentIndex(0)
self.widgets.hdr10_opt.setDisabled(True)
self.widgets.hdr10_opt.setChecked(False)
self.widgets.hdr10.setDisabled(True)
self.widgets.hdr10.setChecked(False)
self.widgets.repeat_headers.setChecked(False)
self.widgets.repeat_headers.setDisabled(False)
else:
self.widgets.pix_fmt.clear()
if bit_depth == 12:
self.widgets.pix_fmt.addItems(pix_fmts[2:])
self.widgets.pix_fmt.setCurrentIndex(0)
elif bit_depth == 10:
self.widgets.pix_fmt.addItems(pix_fmts[1:])
self.widgets.pix_fmt.setCurrentIndex(0)
else:
self.widgets.pix_fmt.addItems(pix_fmts)
self.widgets.pix_fmt.setCurrentIndex(1)

# bit_depth = self.app.fastflix.current_video.streams["video"][self.main.video_track].bit_depth
# self.widgets.pix_fmt.clear()
# # if bit_depth == 12:
# # self.widgets.pix_fmt.addItems(pix_fmts[2:])
# # self.widgets.pix_fmt.setCurrentIndex(0)
# if bit_depth >= 10:
# self.widgets.pix_fmt.addItems(pix_fmts[1:])
# self.widgets.pix_fmt.setCurrentIndex(0)
# else:
hdr_opts()
# self.widgets.pix_fmt.addItems(pix_fmts)
# self.widgets.pix_fmt.setCurrentIndex(1)

if update:
self.main.page_update()
Expand Down
8 changes: 7 additions & 1 deletion fastflix/encoders/nvencc_avc/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def build(fastflix: FastFlix):
elif settings.aq.lower() == "temporal":
aq = f"--aq-temporal --aq-strength {settings.aq_strength}"

vsync_setting = "cfr" if video.frame_rate == video.average_frame_rate else "vfr"
if video.video_settings.vsync == "cfr":
vsync_setting = "forcecfr"
elif video.video_settings.vsync == "vfr":
vsync_setting = "vfr"

command = [
f'"{clean_file_string(fastflix.config.nvencc)}"',
"-i",
Expand Down Expand Up @@ -126,7 +132,7 @@ def build(fastflix: FastFlix):
"auto",
"--colorrange",
"auto",
f"--avsync {'cfr' if video.frame_rate == video.average_frame_rate else 'vfr'}",
f"--avsync {vsync_setting}",
(f"--interlace {video.interlaced}" if video.interlaced else ""),
("--vpp-yadif" if video.video_settings.deinterlace else ""),
(f"--vpp-colorspace hdr2sdr=mobius" if video.video_settings.remove_hdr else ""),
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/nvencc_avc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Optional

from box import Box
from PySide6 import QtCore, QtWidgets, QtGui
from PySide2 import QtCore, QtWidgets, QtGui

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down
8 changes: 7 additions & 1 deletion fastflix/encoders/nvencc_hevc/command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def build(fastflix: FastFlix):
if settings.force_ten_bit:
bit_depth = "10"

vsync_setting = "cfr" if video.frame_rate == video.average_frame_rate else "vfr"
if video.video_settings.vsync == "cfr":
vsync_setting = "forcecfr"
elif video.video_settings.vsync == "vfr":
vsync_setting = "vfr"

command = [
f'"{clean_file_string(fastflix.config.nvencc)}"',
"-i",
Expand Down Expand Up @@ -157,7 +163,7 @@ def build(fastflix: FastFlix):
"auto",
"--colorrange",
"auto",
f"--avsync {'cfr' if video.frame_rate == video.average_frame_rate else 'vfr'}",
f"--avsync {vsync_setting}",
(f"--interlace {video.interlaced}" if video.interlaced else ""),
("--vpp-yadif" if video.video_settings.deinterlace else ""),
(f"--vpp-colorspace hdr2sdr=mobius" if video.video_settings.remove_hdr else ""),
Expand Down
20 changes: 9 additions & 11 deletions fastflix/encoders/nvencc_hevc/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Optional

from box import Box
from PySide6 import QtCore, QtWidgets, QtGui
from PySide2 import QtCore, QtWidgets, QtGui

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down Expand Up @@ -347,7 +347,7 @@ def init_ref(self):
)

def init_10_bit(self):
return self._add_check_box(label="10-bit", widget_name="ten_bit", opt="force_ten_bit")
return self._add_check_box(label="10-bit", widget_name="force_ten_bit", opt="force_ten_bit")

def init_metrics(self):
return self._add_check_box(
Expand Down Expand Up @@ -395,11 +395,10 @@ def setting_change(self, update=True):
self.updating_settings = True

if self.app.fastflix.current_video.current_video_stream.bit_depth > 8 and not self.main.remove_hdr:
self.widgets.ten_bit.setChecked(True)
self.widgets.ten_bit.setDisabled(True)
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
else:
self.widgets.ten_bit.setChecked(False)
self.widgets.ten_bit.setDisabled(False)
self.widgets.force_ten_bit.setDisabled(False)

if update:
self.main.page_update()
Expand All @@ -409,7 +408,7 @@ def update_video_encoder_settings(self):
settings = NVEncCSettings(
preset=self.widgets.preset.currentText().split("-")[0].strip(),
# profile=self.widgets.profile.currentText(),
force_ten_bit=self.widgets.ten_bit.isChecked(),
force_ten_bit=self.widgets.force_ten_bit.isChecked(),
tier=self.widgets.tier.currentText(),
lookahead=self.widgets.lookahead.currentIndex() if self.widgets.lookahead.currentIndex() > 0 else None,
aq=self.widgets.aq.currentText(),
Expand Down Expand Up @@ -457,8 +456,7 @@ def new_source(self):
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.ten_bit.setChecked(True)
self.widgets.ten_bit.setDisabled(True)
self.widgets.force_ten_bit.setChecked(True)
self.widgets.force_ten_bit.setDisabled(True)
else:
self.widgets.ten_bit.setChecked(False)
self.widgets.ten_bit.setDisabled(False)
self.widgets.force_ten_bit.setDisabled(False)
14 changes: 12 additions & 2 deletions fastflix/encoders/rav1e/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
import logging

from PySide6 import QtCore, QtWidgets
from PySide2 import QtCore, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down Expand Up @@ -44,7 +44,17 @@
'50 - "I\'m just testing to see if this works"',
"Custom",
]
pix_fmts = ["8-bit: yuv420p", "10-bit: yuv420p10le"]
pix_fmts = [
"8-bit: yuv420p",
"10-bit: yuv420p10le",
"12-bit: yuv420p12le",
"8-bit 422: yuv422p",
"8-bit 444: yuv444p",
"10-bit 422: yuv422p10le",
"10-bit 444: yuv444p10le",
"12-bit 422: yuv422p12le",
"12-bit 444: yuv444p12le",
]


class RAV1E(SettingPanel):
Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/svt_av1/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging

from box import Box
from PySide6 import QtCore, QtWidgets
from PySide2 import QtCore, QtWidgets

from fastflix.encoders.common.setting_panel import SettingPanel
from fastflix.language import t
Expand Down
Loading

0 comments on commit c4855c8

Please sign in to comment.