From a8068d1742685c0f79043e7529745042a78b95bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 25 Oct 2026 22:09:10 +0100 Subject: [PATCH] AVI dump: Always use FFV1, remove the option to use MPEG-4 The lossy MPEG-4 encoder (with the MPEG-video encoding code it needs) is most of what FFmpeg's encoders weigh, and lossy footage is better recorded from the output with a screen recorder. Dumps are now always lossless FFV1, which also makes for much larger files than the old default. Co-Authored-By: Claude Opus 5.5 (1M context) --- Core/AVIDump.cpp | 7 +++---- Core/Config.cpp | 2 -- Core/Config.h | 1 - UI/Settings/SystemPage.cpp | 1 - Windows/MainWindowMenu.cpp | 6 ------ Windows/ppsspp.rc | 1 - Windows/resource.h | 1 - 7 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Core/AVIDump.cpp b/Core/AVIDump.cpp index 93654cfcab..399b8d72f0 100644 --- a/Core/AVIDump.cpp +++ b/Core/AVIDump.cpp @@ -131,9 +131,8 @@ bool AVIDump::CreateAVI() { #else s_codec_context = avcodec_alloc_context3(codec); #endif - s_codec_context->codec_id = g_Config.bUseFFV1 ? AV_CODEC_ID_FFV1 : s_format_context->oformat->video_codec; - if (!g_Config.bUseFFV1) - s_codec_context->codec_tag = MKTAG('X', 'V', 'I', 'D'); // Force XVID FourCC for better compatibility + // Lossless. For lossy footage, capture the output with a screen recorder instead. + s_codec_context->codec_id = AV_CODEC_ID_FFV1; s_codec_context->codec_type = AVMEDIA_TYPE_VIDEO; s_codec_context->bit_rate = 400000; s_codec_context->width = s_width; @@ -141,7 +140,7 @@ bool AVIDump::CreateAVI() { s_codec_context->time_base.num = 1001; s_codec_context->time_base.den = 60000; s_codec_context->gop_size = 12; - s_codec_context->pix_fmt = g_Config.bUseFFV1 ? AV_PIX_FMT_BGRA : AV_PIX_FMT_YUV420P; + s_codec_context->pix_fmt = AV_PIX_FMT_BGRA; #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 101) if (avcodec_parameters_from_context(s_stream->codecpar, s_codec_context) < 0) diff --git a/Core/Config.cpp b/Core/Config.cpp index 6e269003c2..b87a6f3a37 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -394,8 +394,6 @@ static constexpr ConfigSetting generalSettings[] = { .Label(I18NCat::SYSTEM, "Screenshot mode").Choices(screenshotModeNames), ConfigSetting("ScreenshotsAsPNG", SETTING(g_Config, bScreenshotsAsPNG), false, CfgFlag::PER_GAME) .Label(I18NCat::SYSTEM, "Screenshots as PNG"), - ConfigSetting("UseFFV1", SETTING(g_Config, bUseFFV1), false, CfgFlag::DEFAULT) - .Label(I18NCat::SYSTEM, "Use Lossless Video Codec (FFV1)"), ConfigSetting("DumpFrames", SETTING(g_Config, bDumpFrames), false, CfgFlag::DEFAULT) .Label(I18NCat::SYSTEM, "Record Display"), ConfigSetting("DumpVideoOutput", SETTING(g_Config, bDumpVideoOutput), false, CfgFlag::DEFAULT) diff --git a/Core/Config.h b/Core/Config.h index ce8ff9a610..e0ea676739 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -194,7 +194,6 @@ public: // General bool bScreenshotsAsPNG; - bool bUseFFV1; bool bDumpFrames; bool bDumpVideoOutput; bool bDumpAudio; diff --git a/UI/Settings/SystemPage.cpp b/UI/Settings/SystemPage.cpp index 972bc58345..9d42f5ff82 100644 --- a/UI/Settings/SystemPage.cpp +++ b/UI/Settings/SystemPage.cpp @@ -551,7 +551,6 @@ void BuildSystemSettings(SettingsPage *page, SystemPageState *state) { #if defined(_WIN32) page->Header("Recording"); page->Setting(&g_Config.bDumpFrames); - page->Setting(&g_Config.bUseFFV1); page->Setting(&g_Config.bDumpVideoOutput); page->Setting(&g_Config.bDumpAudio); page->Setting(&g_Config.bSaveLoadResetsAVdumping); diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 2a2b8ee2c9..dae9d92ef2 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -263,7 +263,6 @@ namespace MainWindow { // Movie menu TranslateMenuItem(menu, ID_FILE_DUMPFRAMES); - TranslateMenuItem(menu, ID_FILE_USEFFV1); TranslateMenuItem(menu, ID_FILE_DUMP_VIDEO_OUTPUT); TranslateMenuItem(menu, ID_FILE_DUMPAUDIO); @@ -965,10 +964,6 @@ namespace MainWindow { g_Config.bDumpFrames = !g_Config.bDumpFrames; break; - case ID_FILE_USEFFV1: - g_Config.bUseFFV1 = !g_Config.bUseFFV1; - break; - case ID_FILE_DUMP_VIDEO_OUTPUT: g_Config.bDumpVideoOutput = !g_Config.bDumpVideoOutput; break; @@ -1049,7 +1044,6 @@ namespace MainWindow { CHECKITEM(ID_EMULATION_CHEATS, g_Config.bEnableCheats); CHECKITEM(ID_OPTIONS_IGNOREWINKEY, g_Config.bIgnoreWindowsKey); CHECKITEM(ID_FILE_DUMPFRAMES, g_Config.bDumpFrames); - CHECKITEM(ID_FILE_USEFFV1, g_Config.bUseFFV1); CHECKITEM(ID_FILE_DUMP_VIDEO_OUTPUT, g_Config.bDumpVideoOutput); CHECKITEM(ID_FILE_DUMPAUDIO, g_Config.bDumpAudio); CHECKITEM(ID_OPTIONS_SKIP_BUFFER_EFFECTS, g_Config.bSkipBufferEffects); diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 9c37132b38..876abe09ac 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -526,7 +526,6 @@ BEGIN POPUP "Record", ID_FILE_RECORD_MENU BEGIN MENUITEM "Record Display", ID_FILE_DUMPFRAMES - MENUITEM "Use Lossless Video Codec (FFV1)", ID_FILE_USEFFV1 MENUITEM "Use output buffer for video", ID_FILE_DUMP_VIDEO_OUTPUT MENUITEM "", 0, MFT_SEPARATOR MENUITEM "Record Audio", ID_FILE_DUMPAUDIO diff --git a/Windows/resource.h b/Windows/resource.h index d5343270ba..2923c0bc2e 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -278,7 +278,6 @@ #define ID_GEDBG_COPYALL 40163 #define ID_GEDBG_WATCH 40164 #define ID_FILE_DUMPFRAMES 40165 -#define ID_FILE_USEFFV1 40166 #define ID_FILE_DUMPAUDIO 40167 #define ID_HELP_GITHUB 40168 #define IDC_GEDBG_RECORD 40169