Skip to content

Commit

Permalink
Version 5.1.0 (#396)
Browse files Browse the repository at this point in the history
* Adding AV1 support for rigaya's AMD hardware encoder! (requires 7000 series AMD GPU and latest rigaya encoder)
* Adding #192 a true portable mode for Windows (thanks to Demicro)
* Fixing lookup for QSVEncC
* Fixing lookup for hdr10plus_tool
* Fixing concatenation builder
* Fixing #390 Wrong scale and behavior for DPI 250% on Windows (thanks to smtad)
  • Loading branch information
cdgriffith authored Dec 3, 2022
1 parent 434a5aa commit cfea12b
Show file tree
Hide file tree
Showing 22 changed files with 759 additions and 44 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -29,8 +29,6 @@ jobs:
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
- uses: syphar/restore-pip-download-cache@v1

- name: Install pip requirements
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
Expand Down Expand Up @@ -69,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -86,8 +84,6 @@ jobs:
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
- uses: syphar/restore-pip-download-cache@v1

- name: Install pip requirements
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
Expand Down Expand Up @@ -120,13 +116,13 @@ jobs:
dist/FastFlix
dist/LICENSE
build-windows-2019:
build-windows-2022:

runs-on: windows-2019
runs-on: windows-2022

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -140,8 +136,6 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- uses: syphar/restore-pip-download-cache@v1

- name: Insatll requirements
shell: cmd
run: |
Expand Down Expand Up @@ -211,7 +205,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -223,8 +217,6 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- uses: syphar/restore-pip-download-cache@v1

- name: Insatll requirements
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
Expand Down Expand Up @@ -264,7 +256,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -276,8 +268,6 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- uses: syphar/restore-pip-download-cache@v1

- name: Insatll requirements
run: |
python -m pip install --upgrade pip setuptools --ignore-installed
Expand Down
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Version 5.1.0

* Adding AV1 support for rigaya's AMD hardware encoder!
* Adding #192 a true portable mode for Windows (thanks to Demicro)
* Fixing lookup for QSVEncC
* Fixing lookup for hdr10plus_tool
* Fixing concat builder
* Fixing #390 Wrong scale and behavior for DPI 250% on Windows (thanks to smtad)

## Version 5.0.0

* Adding new GUI backend PySide6
Expand Down
8 changes: 8 additions & 0 deletions FastFlix_Windows_OneFile.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- mode: python ; coding: utf-8 -*-
import os

from PyInstaller.utils.hooks import collect_submodules

block_cipher = None
Expand All @@ -18,6 +20,10 @@ with open("requirements.txt", "r") as reqs:
if package not in ("pyinstaller"):
all_imports.append(package)

portable_file = "fastflix\\portable.py"
with open(portable_file, "w") as portable:
portable.write(" ")

a = Analysis(['fastflix\\__main__.py'],
binaries=[],
datas=[('iso-639-3.tab', 'iso639'), ('iso-639-3.json', 'iso639'), ('CHANGES', 'fastflix\\.'), ('docs\\build-licenses.txt', 'docs')] + all_fastflix_files,
Expand Down Expand Up @@ -46,3 +52,5 @@ exe = EXE(pyz,
runtime_tmpdir=None,
console=True,
icon='fastflix\\data\\icon.ico')

os.unlink(portable_file)
11 changes: 10 additions & 1 deletion fastflix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@

def start_fastflix():
exit_code = 2
portable_mode = True
try:
exit_code = main()
from fastflix import portable
except ImportError:
portable_mode = False

if portable_mode:
print("PORTABLE MODE DETECTED: now using local config file and workspace in same directory as the executable")

try:
exit_code = main(portable_mode)
except Exception:
traceback.print_exc()
input(
Expand Down
16 changes: 9 additions & 7 deletions fastflix/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def init_encoders(app: FastFlixApp, **_):
from fastflix.encoders.svt_av1_avif import main as svt_av1_avif_plugin
from fastflix.encoders.nvencc_av1 import main as nvencc_av1_plugin
from fastflix.encoders.qsvencc_av1 import main as qsvencc_av1_plugin
from fastflix.encoders.vceencc_av1 import main as vceencc_av1_plugin

encoders = [
hevc_plugin,
Expand All @@ -93,19 +94,20 @@ def init_encoders(app: FastFlixApp, **_):

if app.fastflix.config.qsvencc:
encoders.insert(1, qsvencc_plugin)
encoders.insert(5, qsvencc_av1_plugin)
encoders.insert(9, qsvencc_avc_plugin)
encoders.insert(encoders.index(av1_plugin), qsvencc_av1_plugin)
encoders.insert(encoders.index(avc_plugin), qsvencc_avc_plugin)

if app.fastflix.config.nvencc:
encoders.insert(1, nvencc_plugin)
encoders.insert(5, nvencc_av1_plugin)
encoders.insert(9, nvencc_avc_plugin)
encoders.insert(encoders.index(av1_plugin), nvencc_av1_plugin)
encoders.insert(encoders.index(avc_plugin), nvencc_avc_plugin)

if app.fastflix.config.vceencc:
if reusables.win_based:
# HEVC AMF support only works on windows currently
encoders.insert(1, vceencc_hevc_plugin)
encoders.insert(7, vceencc_avc_plugin)
encoders.insert(encoders.index(av1_plugin), vceencc_av1_plugin)
encoders.insert(encoders.index(avc_plugin), vceencc_avc_plugin)

app.fastflix.encoders = {
encoder.name: encoder
Expand Down Expand Up @@ -134,7 +136,7 @@ def register_app():
logger.exception("Could not set application ID for Windows, please raise issue in github with above error")


def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock):
def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock, portable_mode=False):
app = create_app()
app.fastflix = FastFlix(queue=queue_list, queue_lock=queue_lock)
app.fastflix.log_queue = log_queue
Expand All @@ -154,7 +156,7 @@ def start_app(worker_queue, status_queue, log_queue, queue_list, queue_lock):
title="Upgraded",
)
try:
app.fastflix.config.load()
app.fastflix.config.load(portable_mode=portable_mode)
except MissingFF as err:
if reusables.win_based and ask_for_ffmpeg():
try:
Expand Down
48 changes: 48 additions & 0 deletions fastflix/data/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6947,3 +6947,51 @@ Priority:
por: Prioridade
swe: Prioritet
pol: Priorytet
Bitrate Mode:
eng: Bitrate Mode
deu: Bitrate Modus
fra: Mode de débit binaire
ita: Modalità Bitrate
spa: Modo Bitrate
zho: 比特率模式
jpn: ビットレートモード
rus: Режим битрейта
por: Modo Bitrate
swe: Bitrate-läge
pol: Tryb bitrate
VCEEncC AV1 Encoder is untested!:
eng: VCEEncC AV1 Encoder is untested!
deu: VCEEncC AV1 Encoder ist ungetestet!
fra: VCEEncC AV1 Encoder n'est pas testé !
ita: VCEEncC AV1 Encoder non è stato testato!
spa: El codificador VCEEncC AV1 no ha sido probado.
zho: VCEEncC AV1编码器未经测试!
jpn: VCEEncC AV1エンコーダは未検証です!
rus: VCEEncC AV1 Encoder не тестировался!
por: O codificador VCEEncC AV1 não foi testado!
swe: VCEEncC AV1 Encoder är otestad!
pol: VCEEncC AV1 Encoder nie jest testowany!
QSVEncC AV1 Encoder is untested!:
eng: QSVEncC AV1 Encoder is untested!
deu: QSVEncC AV1 Encoder ist ungetestet!
fra: QSVEncC AV1 Encoder n'est pas testé !
ita: Il codificatore QSVEncC AV1 non è stato testato!
spa: El codificador QSVEncC AV1 no ha sido probado.
zho: QSVEncC AV1编码器未经测试!
jpn: QSVEncC AV1 Encoderは未検証です。
rus: Кодировщик QSVEncC AV1 не тестировался!
por: O codificador QSVEncC AV1 não foi testado!
swe: QSVEncC AV1 Encoder är otestad!
pol: QSVEncC AV1 Encoder nie jest testowany!
NVEncC AV1 Encoder is untested!:
eng: NVEncC AV1 Encoder is untested!
deu: NVEncC AV1 Encoder ist ungetestet!
fra: L'encodeur NVEncC AV1 n'est pas testé !
ita: Il codificatore NVEncC AV1 non è stato testato!
spa: El codificador NVEncC AV1 no ha sido probado.
zho: NVEncC AV1编码器未经测试!
jpn: NVEncC AV1 Encoderは未検証です。
rus: NVEncC AV1 Encoder не тестировался!
por: O codificador NVEncC AV1 não foi testado!
swe: NVEncC AV1 Encoder är otestad!
pol: NVEncC AV1 Encoder nie jest testowany!
Empty file.
Loading

0 comments on commit cfea12b

Please sign in to comment.