Skip to content

Commit

Permalink
feat(0.5.1): Aviator 0.5.1
Browse files Browse the repository at this point in the history
See changelog
  • Loading branch information
gianni-rosato committed Feb 6, 2024
1 parent 05b9642 commit b8c74c1
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 17 deletions.
Binary file modified assets/aviator_audio.png
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 assets/aviator_encoding.png
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 assets/aviator_output.png
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 assets/aviator_video.png
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 assets/aviator_video.webp
Binary file not shown.
11 changes: 11 additions & 0 deletions data/net.natesales.Aviator.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@

<releases>

<release version="0.5.1" date="2024-02-05">
<description translatable="no">
<p>TL;DR, mostly SVT-AV1-PSY improvements. But still exciting, nonetheless!</p>
<p>Open GOP toggle has been renamed to oGOP</p>
<p>Speed -1 and -2 are now supported with a warning when you go below Speed 3. Speed -2 can take over 8 hours for a minute of video on a Ryzen 9</p>
<p>New "Perceptual Tuning" enables some new SVT-AV1-PSY features by default to improve visual fidelity at the cost of metric scores</p>
<p>"-mapping_family 1" is now enabled in libopus, so surround encodes will benefit from Opus's multichannel optimizations</p>
<p>Modified SVT-AV1 defaults, notably re-enabling temporal filtering by default</p>
</description>
</release>

<release version="0.5.0" date="2024-01-13">
<description translatable="no">
<p>Today, we have a very exciting development - Aviator has switched to an in-house custom fork of SVT-AV1 dubbed SVT-AV1-PSY!</p>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('aviator',
version: '0.5.0',
version: '0.5.1',
meson_version: '>= 0.59',
)

Expand Down
14 changes: 7 additions & 7 deletions net.natesales.Aviator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ finish-args:
- --filesystem=host

build-options:
append-path: /usr/lib/sdk/rust-stable/bin
env:
CARGO_HOME: /run/build/done/cargo
PROTOC: /app/bin/protoc
prepend-ld-library-path: /usr/lib/sdk/llvm16/lib
prepend-path: /usr/lib/sdk/llvm16/bin
prepend-ld-library-path: /usr/lib/sdk/llvm17/lib
prepend-path: /usr/lib/sdk/llvm17/bin

cleanup:
- /include
Expand All @@ -35,6 +31,10 @@ modules:
buildsystem: cmake-ninja
builddir: true
config-opts:
- "-DCMAKE_C_COMPILER=clang"
- "-DCMAKE_CXX_COMPILER=clang++"
- "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld"
- "-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld"
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_CXX_FLAGS=-O3 -flto"
- "-DCMAKE_C_FLAGS=-O3 -flto"
Expand All @@ -49,7 +49,7 @@ modules:
sources:
- type: git
url: https://github.com/gianni-rosato/svt-av1-psy
commit: 5d60263a420305665c0d0a303c815cd5d3daf950
commit: 7ae86e207b753a21d155ada248b83a697eb45133

- name: ffmpeg
config-opts:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='Aviator',
version='0.5.0',
version='0.5.1',
description='AV1/OPUS Encoder GUI',
author='Gianni Rosato',
author_email='[email protected]',
Expand Down
25 changes: 20 additions & 5 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ class MainWindow(Adw.Window):
resolution_width_entry = Gtk.Template.Child()
resolution_height_entry = Gtk.Template.Child()
crop_toggle = Gtk.Template.Child()
warning_image_speed = Gtk.Template.Child()
gop_toggle = Gtk.Template.Child()
# scaling_method = Gtk.Template.Child()
psy_toggle = Gtk.Template.Child()
crf_scale = Gtk.Template.Child()
speed_scale = Gtk.Template.Child()
grain_scale = Gtk.Template.Child()
Expand Down Expand Up @@ -265,6 +267,15 @@ def open_source_file(self, button):
callback=self.handle_file_select
)

@Gtk.Template.Callback()
def speed_changed(self, button):
if self.speed_scale.get_value() < 3:
self.warning_image_speed.set_visible(True)
elif self.speed_scale.get_value() > 2:
self.warning_image_speed.set_visible(False)
else:
self.warning_image_speed.set_visible(True)

# Export

@Gtk.Template.Callback()
Expand Down Expand Up @@ -312,10 +323,6 @@ def start_export(self, button):
output += ".mkv"
elif self.container == "webm" and not output.endswith(".webm"):
output += ".webm"
# Trim file path
# if "/" in self.output_file_label.get_text():
# self.output_file_absolute = self.output_file_label.get_text()
# self.output_file_label.set_text(os.path.basename(self.output_file_absolute))

def run_in_thread():

Expand Down Expand Up @@ -358,6 +365,13 @@ def run_in_thread():
else:
resolution = "-y"

if self.psy_toggle.get_active():
tune = 3
sharpness = 1
else:
tune = 2
sharpness = 0

if self.denoise_toggle.get_active():
denoise_val = 1
else:
Expand Down Expand Up @@ -410,9 +424,10 @@ def run_in_thread():
"-crf", str(int(self.crf_scale.get_value())),
"-preset", str(int(self.speed_scale.get_value())),
"-pix_fmt", "yuv420p10le",
"-svtav1-params", f"film-grain={int(self.grain_scale.get_value())}:" + "input-depth=10:tune=2:enable-qm=1:qm-min=0:enable-tf=0:keyint=300:scd=1:aq-mode=2:" + f"irefresh-type={gop_val}:" + f"film-grain-denoise={denoise_val}",
"-svtav1-params", f"film-grain={int(self.grain_scale.get_value())}:" + f"tune={tune}:" + f"sharpness={sharpness}:" + "input-depth=10:enable-qm=1:qm-min=0:keyint=300:aq-mode=2:sharpness=1:" + f"irefresh-type={gop_val}:" + f"film-grain-denoise={denoise_val}",
"-map", "0:a?",
"-c:a", "copy" if self.audio_copy_switch.get_state() else "libopus",
"-mapping_family", "1",
"-b:a", self.bitrate_entry.get_text() + "K",
audio_filters_prefix,
audio_filters,
Expand Down
24 changes: 21 additions & 3 deletions src/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@
<property name="title" translatable="yes">CRF</property>
<property name="tooltip-text" translatable="yes">The CRF value determines the size &amp; quality of your output. Higher values mean lower file size &amp; quality while lower values create larger, higher-quality videos.</property>
<property name="use-underline">true</property>
<child>
<object class="GtkCheckButton" id="psy_toggle">
<property name="active">True</property>
<property name="label">Perceptual Tuning</property>
<property name="valign">center</property>
<property name="hexpand">False</property>
<property name="tooltip-text" translatable="yes">Tunes the encoder for perceptual quality (Tune 3: Subjective SSIM in SVT-AV1-PSY). Disable for better metric performance in exchange for generally degraded visual fidelity. For the best-looking video, leave enabled.</property>
</object>
</child>
<child>
<object class="GtkScale" id="crf_scale">
<property name="halign">end</property>
Expand Down Expand Up @@ -215,13 +224,21 @@
<property name="tooltip-text" translatable="yes">Adaptively detects screen content, like screen recordings or animation. It is highly recommended to leave this alone; disabling content adaptive SCM force-enables screen content detection, decreasing encoding efficiency for sparse visual benefit.</property>
</object>
</child> -->
<child>
<object class="GtkImage" id="warning_image_speed">
<property name="icon-name">dialog-warning</property>
<property name="visible">false</property>
<property name="margin-end">0</property>
<property name="tooltip-text" translatable="yes">Speeds below 3 are extremely slow and not recommended.</property>
</object>
</child>
<child>
<object class="GtkCheckButton" id="gop_toggle">
<property name="active">False</property>
<property name="label">Open GOP</property>
<property name="label">oGOP</property>
<property name="valign">center</property>
<property name="hexpand">False</property>
<property name="tooltip-text" translatable="yes">Allows the user to decide between Closed GOP &amp; Open GOP. GOP stands for "Group of Pictures." Enabling allows GOPs to reference one another, but this may not always produce better visual fidelity per bit. If unsure, keep this box unchecked.</property>
<property name="tooltip-text" translatable="yes">Enables Open GOPs. GOPs are "Group(s) of Pictures." Enabling allows GOPs to reference one another, but this usually does not improve visual fidelity per bit. If unsure, keep this box unchecked.</property>
</object>
</child>
<child>
Expand All @@ -236,9 +253,10 @@
<object class="GtkAdjustment">
<property name="upper">12</property>
<property name="value">6</property>
<property name="lower">0</property>
<property name="lower">-2</property>
<property name="step-increment">1</property>
<property name="page-increment">1</property>
<signal name="value-changed" handler="speed_changed" swapped="no" />
</object>
</property>
</object>
Expand Down

0 comments on commit b8c74c1

Please sign in to comment.