105 lines
5.1 KiB
Diff
105 lines
5.1 KiB
Diff
From 04d3a21c6e72cd5574f7333adf548012d912c1ee Mon Sep 17 00:00:00 2001
|
|
From: Neal Gompa <neal@gompa.dev>
|
|
Date: Sat, 7 Jan 2023 23:15:13 -0500
|
|
Subject: [PATCH 1/3] UI: Consistently reference the software H264 encoder
|
|
properly
|
|
|
|
The code here assumes that the only software encoder is the x264-based
|
|
H.264 encoder. That may not always remain true. This change adjusts
|
|
the encoder string to indicate that it's an H.264 encoder from x264.
|
|
---
|
|
UI/data/locale/en-US.ini | 4 ++--
|
|
UI/window-basic-auto-config-test.cpp | 6 +++---
|
|
UI/window-basic-settings-stream.cpp | 2 +-
|
|
UI/window-basic-settings.cpp | 7 ++++---
|
|
4 files changed, 10 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/UI/data/locale/en-US.ini b/UI/data/locale/en-US.ini
|
|
index 4c03aa7db..e44d99660 100644
|
|
--- a/UI/data/locale/en-US.ini
|
|
+++ b/UI/data/locale/en-US.ini
|
|
@@ -980,7 +980,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
|
|
Basic.Settings.Output.Simple.Warn.Lossless="Warning: Lossless quality generates tremendously large file sizes! Lossless quality can use upward of 7 gigabytes of disk space per minute at high resolutions and framerates. Lossless is not recommended for long recordings unless you have a very large amount of disk space available."
|
|
Basic.Settings.Output.Simple.Warn.Lossless.Msg="Are you sure you want to use lossless quality?"
|
|
Basic.Settings.Output.Simple.Warn.Lossless.Title="Lossless quality warning!"
|
|
-Basic.Settings.Output.Simple.Encoder.Software="Software (x264)"
|
|
+Basic.Settings.Output.Simple.Encoder.Software.X264.H264="Software (x264)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.H264="Hardware (QSV, H.264)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.QSV.AV1="Hardware (QSV, AV1)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.AMD.H264="Hardware (AMD, H.264)"
|
|
@@ -991,7 +991,7 @@ Basic.Settings.Output.Simple.Encoder.Hardware.NVENC.AV1="Hardware (NVENC, AV1)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.NVENC.HEVC="Hardware (NVENC, HEVC)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.Apple.H264="Hardware (Apple, H.264)"
|
|
Basic.Settings.Output.Simple.Encoder.Hardware.Apple.HEVC="Hardware (Apple, HEVC)"
|
|
-Basic.Settings.Output.Simple.Encoder.SoftwareLowCPU="Software (x264 low CPU usage preset, increases file size)"
|
|
+Basic.Settings.Output.Simple.Encoder.SoftwareLowCPU.X264.H264="Software (x264 low CPU usage preset, increases file size)"
|
|
Basic.Settings.Output.Simple.Codec.AAC="AAC"
|
|
Basic.Settings.Output.Simple.Codec.AAC.Default="AAC (Default)"
|
|
Basic.Settings.Output.Simple.Codec.Opus="Opus"
|
|
diff --git a/UI/window-basic-auto-config-test.cpp b/UI/window-basic-auto-config-test.cpp
|
|
index 2d89d7347..09979c031 100644
|
|
--- a/UI/window-basic-auto-config-test.cpp
|
|
+++ b/UI/window-basic-auto-config-test.cpp
|
|
@@ -993,7 +993,7 @@ void AutoConfigTestPage::TestRecordingEncoderThread()
|
|
}
|
|
|
|
#define ENCODER_TEXT(x) "Basic.Settings.Output.Simple.Encoder." x
|
|
-#define ENCODER_SOFTWARE ENCODER_TEXT("Software")
|
|
+#define ENCODER_X264 ENCODER_TEXT("Software.X264.H264")
|
|
#define ENCODER_NVENC ENCODER_TEXT("Hardware.NVENC.H264")
|
|
#define ENCODER_QSV ENCODER_TEXT("Hardware.QSV.H264")
|
|
#define ENCODER_AMD ENCODER_TEXT("Hardware.AMD.H264")
|
|
@@ -1033,7 +1033,7 @@ void AutoConfigTestPage::FinalizeResults()
|
|
auto encName = [](AutoConfig::Encoder enc) -> QString {
|
|
switch (enc) {
|
|
case AutoConfig::Encoder::x264:
|
|
- return QTStr(ENCODER_SOFTWARE);
|
|
+ return QTStr(ENCODER_X264);
|
|
case AutoConfig::Encoder::NVENC:
|
|
return QTStr(ENCODER_NVENC);
|
|
case AutoConfig::Encoder::QSV:
|
|
@@ -1046,7 +1046,7 @@ void AutoConfigTestPage::FinalizeResults()
|
|
return QTStr(QUALITY_SAME);
|
|
}
|
|
|
|
- return QTStr(ENCODER_SOFTWARE);
|
|
+ return QTStr(ENCODER_X264);
|
|
};
|
|
|
|
auto newLabel = [this](const char *str) -> QLabel * {
|
|
diff --git a/UI/window-basic-settings-stream.cpp b/UI/window-basic-settings-stream.cpp
|
|
index f6e0817a0..b056938e7 100644
|
|
--- a/UI/window-basic-settings-stream.cpp
|
|
+++ b/UI/window-basic-settings-stream.cpp
|
|
@@ -1585,7 +1585,7 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
|
|
|
|
#define ENCODER_STR(str) QTStr("Basic.Settings.Output.Simple.Encoder." str)
|
|
|
|
- ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software"),
|
|
+ ui->simpleOutStrEncoder->addItem(ENCODER_STR("Software.X264.H264"),
|
|
QString(SIMPLE_ENCODER_X264));
|
|
if (service_supports_encoder(vcodecs, "obs_qsv11"))
|
|
ui->simpleOutStrEncoder->addItem(
|
|
diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp
|
|
index fb170bfc1..48bb4bac6 100644
|
|
--- a/UI/window-basic-settings.cpp
|
|
+++ b/UI/window-basic-settings.cpp
|
|
@@ -5286,10 +5286,11 @@ void OBSBasicSettings::FillSimpleRecordingValues()
|
|
ADD_QUALITY("HQ");
|
|
ADD_QUALITY("Lossless");
|
|
|
|
- ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software"),
|
|
+ ui->simpleOutRecEncoder->addItem(ENCODER_STR("Software.X264.H264"),
|
|
QString(SIMPLE_ENCODER_X264));
|
|
- ui->simpleOutRecEncoder->addItem(ENCODER_STR("SoftwareLowCPU"),
|
|
- QString(SIMPLE_ENCODER_X264_LOWCPU));
|
|
+ ui->simpleOutRecEncoder->addItem(
|
|
+ ENCODER_STR("SoftwareLowCPU.X264.H264"),
|
|
+ QString(SIMPLE_ENCODER_X264_LOWCPU));
|
|
if (EncoderAvailable("obs_qsv11"))
|
|
ui->simpleOutRecEncoder->addItem(
|
|
ENCODER_STR("Hardware.QSV.H264"),
|
|
--
|
|
2.39.2
|
|
|