From 8122f6ea664897c32b2d2fc5ae367e04d8780c48 Mon Sep 17 00:00:00 2001 From: ConnorC432 Date: Wed, 11 Mar 2026 21:43:00 +0000 Subject: [PATCH 1/3] Default to gstreamer backend to prevent capture card flickering --- SerialPrograms/Source/CommonFramework/Main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SerialPrograms/Source/CommonFramework/Main.cpp b/SerialPrograms/Source/CommonFramework/Main.cpp index 455b9a2f96..25c1d5679e 100644 --- a/SerialPrograms/Source/CommonFramework/Main.cpp +++ b/SerialPrograms/Source/CommonFramework/Main.cpp @@ -201,6 +201,12 @@ int main(int argc, char *argv[]){ set_program_path(argv[0]); #endif +#if defined(__linux__) + // Qt multimedia, default to gstreamer to prevent flickering + if (qEnvironmentVariableIsEmpty("QT_MEDIA_BACKEND")) + qputenv("QT_MEDIA_BACKEND", "gstreamer"); +#endif + // So far, this is only needed on Mac where static initialization is fucked up. PokemonAutomation::register_all_statics(); From 2f7057cc28dd44658b53b649a244615d7d070885 Mon Sep 17 00:00:00 2001 From: ConnorC432 Date: Sat, 14 Mar 2026 20:42:28 +0000 Subject: [PATCH 2/3] default auto-reset to 0 on linux builds to prevent black frames on reset --- .../CommonFramework/VideoPipeline/VideoPipelineOptions.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/CommonFramework/VideoPipeline/VideoPipelineOptions.h b/SerialPrograms/Source/CommonFramework/VideoPipeline/VideoPipelineOptions.h index e7a4d19133..c1f7dc20bb 100644 --- a/SerialPrograms/Source/CommonFramework/VideoPipeline/VideoPipelineOptions.h +++ b/SerialPrograms/Source/CommonFramework/VideoPipeline/VideoPipelineOptions.h @@ -34,9 +34,13 @@ class VideoPipelineOptions : public GroupOption{ , AUTO_RESET_SECONDS( "Video Auto-Reset:
" "Attempt to reset the video if this many seconds has elapsed since the last video frame (in order to fix issues with RDP disconnection, etc).
" - "This option is not supported by all video frameworks.", + "This option is not supported by all video frameworks. Set to a value of 0 to disable Auto-Reset.", LockMode::UNLOCK_WHILE_RUNNING, +#if defined(__linux__) + 0 // Default to disabled on linux, auto-resets briefly output black frames +#else 5 +#endif ) { PA_ADD_OPTION(VIDEO_BACKEND); From 182ef73b485d2656c6de28cd9ffed0c13d02d7be Mon Sep 17 00:00:00 2001 From: ConnorC432 Date: Fri, 20 Mar 2026 11:10:37 +0000 Subject: [PATCH 3/3] another comment --- SerialPrograms/Source/CommonFramework/Main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SerialPrograms/Source/CommonFramework/Main.cpp b/SerialPrograms/Source/CommonFramework/Main.cpp index 25c1d5679e..2435ccea78 100644 --- a/SerialPrograms/Source/CommonFramework/Main.cpp +++ b/SerialPrograms/Source/CommonFramework/Main.cpp @@ -203,6 +203,8 @@ int main(int argc, char *argv[]){ #if defined(__linux__) // Qt multimedia, default to gstreamer to prevent flickering + // Easier than the alternative which is compiling qt6multimedia with QT_DEFAULT_MEDIA_BACKEND + // See: https://doc.qt.io/qt-6.5/qtmultimedia-index.html if (qEnvironmentVariableIsEmpty("QT_MEDIA_BACKEND")) qputenv("QT_MEDIA_BACKEND", "gstreamer"); #endif