From ac8811e42c52b95a892069c71e9b69ced923d485 Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Tue, 6 Aug 2024 16:16:21 -0500 Subject: [PATCH] * Adding #354 M1 support (thanks to Nhunz and Anton) * Adding #536 Improve Profiles - save advanced options (thanks to CelticTaonga and DCNerds) * Fixing #185 audio channels not being set properly and resetting on encoder change (thanks to Tupsi) * Fixing #522 add file fails - fixed as of 5.7.0 (thanks to pcl5x2008) * Fixing #531 list limitation in readme that FFmpeg must support the software encoders listed (thanks to brunoais) --- .github/workflows/build.yaml | 2 +- CHANGES | 7 ++- README.md | 2 + fastflix/encoders/vp9/settings_panel.py | 1 + fastflix/version.py | 2 +- fastflix/widgets/panels/advanced_panel.py | 61 +++++++++++++++++++++-- 6 files changed, 69 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9179b6dd..2d109516 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,7 +9,7 @@ jobs: build-nix: strategy: matrix: - os: [ ubuntu-20.04, ubuntu-22.04, macos-12 ] + os: [ ubuntu-20.04, ubuntu-22.04, macos-12, macos-latest-xlarge ] runs-on: ${{ matrix.os }} steps: diff --git a/CHANGES b/CHANGES index 20cdcc0e..208f90c9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,12 @@ # Changelog -## Version 5.7.5 +## Version 5.8.0 +* Adding #354 M1 support (thanks to Nhunz and Anton) +* Adding #536 Improve Profiles - save advanced options (thanks to CelticTaonga and DCNerds) +* Fixing #185 audio channels not being set properly and resetting on encoder change (thanks to Tupsi) +* Fixing #522 add file fails - fixed as of 5.7.0 (thanks to pcl5x2008) +* Fixing #531 list limitation in readme that FFmpeg must support the software encoders listed (thanks to brunoais) * Fixing #586 audio channels being set incorrectly (thanks to Hankuu) * Fixing #588 audio and subtitle dispositions were not set from source (thanks to GeZorTenPlotZ) diff --git a/README.md b/README.md index 3a1bd272..b70b4bcb 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ Check out [the FastFlix github wiki](https://github.com/cdgriffith/FastFlix/wiki | Covers | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | | bt.2020 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +If one of the above software encoders is not listed, it is due to your version of FFmpeg not having that encoder compiled in. + ## Hardware Encoders These will require the appropriate hardware. Nvidia GPU for NVEnc, Intel GPU/CPU for QSVEnc, and AMD GPU for VCEEnc. diff --git a/fastflix/encoders/vp9/settings_panel.py b/fastflix/encoders/vp9/settings_panel.py index 526eac03..86765ec8 100644 --- a/fastflix/encoders/vp9/settings_panel.py +++ b/fastflix/encoders/vp9/settings_panel.py @@ -42,6 +42,7 @@ "8-bit: yuv420p", "10-bit: yuv420p10le", "12-bit: yuv420p12le", + "8-bit 420 Transparent: yuva420p", "8-bit 422: yuv422p", "8-bit 444: yuv444p", "10-bit 422: yuv422p10le", diff --git a/fastflix/version.py b/fastflix/version.py index e6cf9cb1..04096d1c 100644 --- a/fastflix/version.py +++ b/fastflix/version.py @@ -1,4 +1,4 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -__version__ = "5.7.5" +__version__ = "5.8.0" __author__ = "Chris Griffith" diff --git a/fastflix/widgets/panels/advanced_panel.py b/fastflix/widgets/panels/advanced_panel.py index 826f1737..4bdbeb26 100644 --- a/fastflix/widgets/panels/advanced_panel.py +++ b/fastflix/widgets/panels/advanced_panel.py @@ -679,23 +679,78 @@ def reset(self, settings: VideoSettings = None): def new_source(self): self.reset() - if self.app.fastflix.current_video.color_primaries in ffmpeg_valid_color_primaries: + advanced_options: AdvancedOptions = self.app.fastflix.config.opt("advanced_options") + + if color_primaries := advanced_options.color_primaries: + self.color_primaries_widget.setCurrentText(color_primaries) + elif self.app.fastflix.current_video.color_primaries in ffmpeg_valid_color_primaries: self.color_primaries_widget.setCurrentIndex( ffmpeg_valid_color_primaries.index(self.app.fastflix.current_video.color_primaries) + 1 ) else: self.color_primaries_widget.setCurrentIndex(0) - if self.app.fastflix.current_video.color_transfer in ffmpeg_valid_color_transfers: + if color_transfer := advanced_options.color_transfer: + self.color_transfer_widget.setCurrentText(color_transfer) + elif self.app.fastflix.current_video.color_transfer in ffmpeg_valid_color_transfers: self.color_transfer_widget.setCurrentIndex( ffmpeg_valid_color_transfers.index(self.app.fastflix.current_video.color_transfer) + 1 ) else: self.color_transfer_widget.setCurrentIndex(0) - if self.app.fastflix.current_video.color_space in ffmpeg_valid_color_space: + if color_space := advanced_options.color_space: + self.color_space_widget.setCurrentText(color_space) + elif self.app.fastflix.current_video.color_space in ffmpeg_valid_color_space: self.color_space_widget.setCurrentIndex( ffmpeg_valid_color_space.index(self.app.fastflix.current_video.color_space) + 1 ) else: self.color_space_widget.setCurrentIndex(0) + + if video_speed := advanced_options.video_speed: + self.video_speed_widget.setCurrentText(get_key(video_speeds, video_speed)) + + if deblock := advanced_options.deblock: + self.deblock_widget.setCurrentText(deblock) + + if deblock_size := advanced_options.deblock_size: + self.deblock_size_widget.setCurrentText(str(deblock_size)) + + if tone_map := advanced_options.tone_map: + self.tone_map_widget.setCurrentText(tone_map) + + if vsync := advanced_options.vsync: + self.vsync_widget.setCurrentText(vsync) + + if brightness := advanced_options.brightness: + self.brightness_widget.setText(brightness) + + if saturation := advanced_options.saturation: + self.saturation_widget.setText(saturation) + + if contrast := advanced_options.contrast: + self.contrast_widget.setText(contrast) + + if maxrate := advanced_options.maxrate: + self.maxrate_widget.setText(str(maxrate)) + + if bufsize := advanced_options.bufsize: + self.bufsize_widget.setText(str(bufsize)) + + if source_fps := advanced_options.source_fps: + self.incoming_fps_widget.setText(source_fps) + self.incoming_same_as_source.setChecked(False) + else: + self.incoming_same_as_source.setChecked(True) + + if output_fps := advanced_options.output_fps: + self.outgoing_fps_widget.setText(output_fps) + self.outgoing_same_as_source.setChecked(False) + else: + self.outgoing_same_as_source.setChecked(True) + + if denoise_type_index := advanced_options.denoise_type_index: + self.denoise_type_widget.setCurrentIndex(denoise_type_index) + if denoise_strength_index := advanced_options.denoise_strength_index: + self.denoise_strength_widget.setCurrentIndex(denoise_strength_index)