summaryrefslogtreecommitdiff
path: root/spectacle
diff options
context:
space:
mode:
authorLibravatar Terin Stock <terinjokes@gmail.com>2024-04-22 00:47:58 +0200
committerLibravatar Terin Stock <terinjokes@gmail.com>2024-04-22 00:47:58 +0200
commit4e55d5d24df95feeb3aabf49263c77cd29a2d877 (patch)
treecc6d193f1834f8bda646644c4aefa23e6ddc0fca /spectacle
parentinitial commit (diff)
downloadmisc-patches-4e55d5d24df95feeb3aabf49263c77cd29a2d877.tar.xz
screen recordings with MagicYUV and Spectacle
On Windows I use Bandicamp and MagicYUV to record gameplay losslessly with minimal CPU impact. However, Spectacle only supports encoding with H264 or WebM, which is neither lossless nor light on the CPU. This changeset adds support for the MagicYUV 4:4:4 codec to Spectacle and the underlying kpipewire plumbing.
Diffstat (limited to 'spectacle')
-rw-r--r--spectacle/23.08-magicyuv-yuv444.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/spectacle/23.08-magicyuv-yuv444.patch b/spectacle/23.08-magicyuv-yuv444.patch
new file mode 100644
index 0000000..1b20487
--- /dev/null
+++ b/spectacle/23.08-magicyuv-yuv444.patch
@@ -0,0 +1,37 @@
+From b71c7ec94e989dae259bd603232d565b3d0e0f29 Mon Sep 17 00:00:00 2001
+From: Terin Stock <terinjokes@gmail.com>
+Date: Mon, 22 Apr 2024 00:39:36 +0200
+Subject: [PATCH] add MagicYUV 4:4:4 support
+
+Allow Spectacle to record with the MagicYUV codec, added in a separate
+patch to kpipewire. As this version of Spectacle makes codec decisions
+based on file extensions, this patch usurps "mkv" to represent this codec.
+---
+ src/Platforms/VideoPlatformWayland.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Platforms/VideoPlatformWayland.cpp b/src/Platforms/VideoPlatformWayland.cpp
+index 8811b30c..a2cc7fcf 100644
+--- a/src/Platforms/VideoPlatformWayland.cpp
++++ b/src/Platforms/VideoPlatformWayland.cpp
+@@ -83,6 +83,8 @@ QStringList VideoPlatformWayland::suggestedExtensions() const
+ extensions.append(QStringLiteral("webm"));
+ } else if (enc == "libx264") {
+ extensions.append(QStringLiteral("mp4"));
++ } else if (enc == "magicyuv") {
++ extensions.append(QStringLiteral("mkv"));
+ }
+ }
+ #else
+@@ -108,6 +110,8 @@ void VideoPlatformWayland::setExtension(const QString &extension)
+ m_recorder->setEncoder("libvpx");
+ } else if (extension == QStringLiteral("mp4")) {
+ m_recorder->setEncoder("libx264");
++ } else if (extension == QStringLiteral("mkv")) {
++ m_recorder->setEncoder("magicyuv");
+ } else {
+ qWarning() << "Unsupported extension" << extension;
+ }
+--
+2.43.2
+