mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-08 15:20:45 +01:00
Merge pull request #13233 from TryTwo/PR_Codec
AdvancedWidget: Replace FFV1 codec with Ut Video
This commit is contained in:
commit
6b686be5f1
@ -63,7 +63,7 @@ const Info<bool> GFX_CACHE_HIRES_TEXTURES{{System::GFX, "Settings", "CacheHiresT
|
|||||||
const Info<bool> GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false};
|
const Info<bool> GFX_DUMP_EFB_TARGET{{System::GFX, "Settings", "DumpEFBTarget"}, false};
|
||||||
const Info<bool> GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false};
|
const Info<bool> GFX_DUMP_XFB_TARGET{{System::GFX, "Settings", "DumpXFBTarget"}, false};
|
||||||
const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"}, false};
|
const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES{{System::GFX, "Settings", "DumpFramesAsImages"}, false};
|
||||||
const Info<bool> GFX_USE_FFV1{{System::GFX, "Settings", "UseFFV1"}, false};
|
const Info<bool> GFX_USE_LOSSLESS{{System::GFX, "Settings", "UseLossless"}, false};
|
||||||
const Info<std::string> GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"};
|
const Info<std::string> GFX_DUMP_FORMAT{{System::GFX, "Settings", "DumpFormat"}, "avi"};
|
||||||
const Info<std::string> GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""};
|
const Info<std::string> GFX_DUMP_CODEC{{System::GFX, "Settings", "DumpCodec"}, ""};
|
||||||
const Info<std::string> GFX_DUMP_PIXEL_FORMAT{{System::GFX, "Settings", "DumpPixelFormat"}, ""};
|
const Info<std::string> GFX_DUMP_PIXEL_FORMAT{{System::GFX, "Settings", "DumpPixelFormat"}, ""};
|
||||||
|
@ -62,7 +62,7 @@ extern const Info<bool> GFX_CACHE_HIRES_TEXTURES;
|
|||||||
extern const Info<bool> GFX_DUMP_EFB_TARGET;
|
extern const Info<bool> GFX_DUMP_EFB_TARGET;
|
||||||
extern const Info<bool> GFX_DUMP_XFB_TARGET;
|
extern const Info<bool> GFX_DUMP_XFB_TARGET;
|
||||||
extern const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES;
|
extern const Info<bool> GFX_DUMP_FRAMES_AS_IMAGES;
|
||||||
extern const Info<bool> GFX_USE_FFV1;
|
extern const Info<bool> GFX_USE_LOSSLESS;
|
||||||
extern const Info<std::string> GFX_DUMP_FORMAT;
|
extern const Info<std::string> GFX_DUMP_FORMAT;
|
||||||
extern const Info<std::string> GFX_DUMP_CODEC;
|
extern const Info<std::string> GFX_DUMP_CODEC;
|
||||||
extern const Info<std::string> GFX_DUMP_PIXEL_FORMAT;
|
extern const Info<std::string> GFX_DUMP_PIXEL_FORMAT;
|
||||||
|
@ -185,11 +185,13 @@ void AdvancedWidget::CreateWidgets()
|
|||||||
dump_layout->addWidget(m_frame_dumps_resolution_type, 0, 1);
|
dump_layout->addWidget(m_frame_dumps_resolution_type, 0, 1);
|
||||||
|
|
||||||
#if defined(HAVE_FFMPEG)
|
#if defined(HAVE_FFMPEG)
|
||||||
m_dump_use_ffv1 =
|
m_dump_use_lossless =
|
||||||
new ConfigBool(tr("Use Lossless Codec (FFV1)"), Config::GFX_USE_FFV1, m_game_layer);
|
new ConfigBool(tr("Use Lossless Codec (Ut Video)"), Config::GFX_USE_LOSSLESS, m_game_layer);
|
||||||
|
|
||||||
m_dump_bitrate = new ConfigInteger(0, 1000000, Config::GFX_BITRATE_KBPS, m_game_layer, 1000);
|
m_dump_bitrate = new ConfigInteger(0, 1000000, Config::GFX_BITRATE_KBPS, m_game_layer, 1000);
|
||||||
m_dump_bitrate->setEnabled(!m_dump_use_ffv1->isChecked());
|
m_dump_bitrate->setEnabled(!m_dump_use_lossless->isChecked());
|
||||||
dump_layout->addWidget(m_dump_use_ffv1, 1, 0);
|
|
||||||
|
dump_layout->addWidget(m_dump_use_lossless, 1, 0);
|
||||||
dump_layout->addWidget(new QLabel(tr("Bitrate (kbps):")), 2, 0);
|
dump_layout->addWidget(new QLabel(tr("Bitrate (kbps):")), 2, 0);
|
||||||
dump_layout->addWidget(m_dump_bitrate, 2, 1);
|
dump_layout->addWidget(m_dump_bitrate, 2, 1);
|
||||||
#endif
|
#endif
|
||||||
@ -261,9 +263,8 @@ void AdvancedWidget::ConnectWidgets()
|
|||||||
});
|
});
|
||||||
connect(m_enable_graphics_mods, &QCheckBox::toggled, this,
|
connect(m_enable_graphics_mods, &QCheckBox::toggled, this,
|
||||||
[this](bool checked) { emit Settings::Instance().EnableGfxModsChanged(checked); });
|
[this](bool checked) { emit Settings::Instance().EnableGfxModsChanged(checked); });
|
||||||
|
|
||||||
#if defined(HAVE_FFMPEG)
|
#if defined(HAVE_FFMPEG)
|
||||||
connect(m_dump_use_ffv1, &QCheckBox::toggled, this,
|
connect(m_dump_use_lossless, &QCheckBox::toggled, this,
|
||||||
[this](bool checked) { m_dump_bitrate->setEnabled(!checked); });
|
[this](bool checked) { m_dump_bitrate->setEnabled(!checked); });
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -391,8 +392,9 @@ void AdvancedWidget::AddDescriptions()
|
|||||||
"possible input for external editing software.<br><br><dolphin_emphasis>If unsure, leave "
|
"possible input for external editing software.<br><br><dolphin_emphasis>If unsure, leave "
|
||||||
"this at \"Aspect Ratio Corrected Internal Resolution\".</dolphin_emphasis>");
|
"this at \"Aspect Ratio Corrected Internal Resolution\".</dolphin_emphasis>");
|
||||||
#if defined(HAVE_FFMPEG)
|
#if defined(HAVE_FFMPEG)
|
||||||
static const char TR_USE_FFV1_DESCRIPTION[] =
|
static const char TR_USE_LOSSLESS_DESCRIPTION[] =
|
||||||
QT_TR_NOOP("Encodes frame dumps using the FFV1 codec.<br><br><dolphin_emphasis>If "
|
QT_TR_NOOP("Encodes frame dumps using the Ut Video codec. If this option is unchecked, a "
|
||||||
|
"lossy Xvid codec will be used.<br><br><dolphin_emphasis>If "
|
||||||
"unsure, leave this unchecked.</dolphin_emphasis>");
|
"unsure, leave this unchecked.</dolphin_emphasis>");
|
||||||
#endif
|
#endif
|
||||||
static const char TR_PNG_COMPRESSION_LEVEL_DESCRIPTION[] =
|
static const char TR_PNG_COMPRESSION_LEVEL_DESCRIPTION[] =
|
||||||
@ -483,7 +485,7 @@ void AdvancedWidget::AddDescriptions()
|
|||||||
m_enable_graphics_mods->SetDescription(tr(TR_LOAD_GRAPHICS_MODS_DESCRIPTION));
|
m_enable_graphics_mods->SetDescription(tr(TR_LOAD_GRAPHICS_MODS_DESCRIPTION));
|
||||||
m_frame_dumps_resolution_type->SetDescription(tr(TR_FRAME_DUMPS_RESOLUTION_TYPE_DESCRIPTION));
|
m_frame_dumps_resolution_type->SetDescription(tr(TR_FRAME_DUMPS_RESOLUTION_TYPE_DESCRIPTION));
|
||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
m_dump_use_ffv1->SetDescription(tr(TR_USE_FFV1_DESCRIPTION));
|
m_dump_use_lossless->SetDescription(tr(TR_USE_LOSSLESS_DESCRIPTION));
|
||||||
#endif
|
#endif
|
||||||
m_png_compression_level->SetDescription(tr(TR_PNG_COMPRESSION_LEVEL_DESCRIPTION));
|
m_png_compression_level->SetDescription(tr(TR_PNG_COMPRESSION_LEVEL_DESCRIPTION));
|
||||||
m_enable_cropping->SetDescription(tr(TR_CROPPING_DESCRIPTION));
|
m_enable_cropping->SetDescription(tr(TR_CROPPING_DESCRIPTION));
|
||||||
|
@ -60,7 +60,7 @@ private:
|
|||||||
ConfigBool* m_dump_base_textures;
|
ConfigBool* m_dump_base_textures;
|
||||||
|
|
||||||
// Frame dumping
|
// Frame dumping
|
||||||
ConfigBool* m_dump_use_ffv1;
|
ConfigBool* m_dump_use_lossless;
|
||||||
ConfigChoice* m_frame_dumps_resolution_type;
|
ConfigChoice* m_frame_dumps_resolution_type;
|
||||||
ConfigInteger* m_dump_bitrate;
|
ConfigInteger* m_dump_bitrate;
|
||||||
ConfigInteger* m_png_compression_level;
|
ConfigInteger* m_png_compression_level;
|
||||||
|
@ -217,7 +217,7 @@ bool FFMpegFrameDump::CreateVideoFile()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& codec_name = g_Config.bUseFFV1 ? "ffv1" : g_Config.sDumpCodec;
|
const std::string& codec_name = g_Config.bUseLossless ? "utvideo" : g_Config.sDumpCodec;
|
||||||
|
|
||||||
AVCodecID codec_id = output_format->video_codec;
|
AVCodecID codec_id = output_format->video_codec;
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ void VideoConfig::Refresh()
|
|||||||
bDumpEFBTarget = Config::Get(Config::GFX_DUMP_EFB_TARGET);
|
bDumpEFBTarget = Config::Get(Config::GFX_DUMP_EFB_TARGET);
|
||||||
bDumpXFBTarget = Config::Get(Config::GFX_DUMP_XFB_TARGET);
|
bDumpXFBTarget = Config::Get(Config::GFX_DUMP_XFB_TARGET);
|
||||||
bDumpFramesAsImages = Config::Get(Config::GFX_DUMP_FRAMES_AS_IMAGES);
|
bDumpFramesAsImages = Config::Get(Config::GFX_DUMP_FRAMES_AS_IMAGES);
|
||||||
bUseFFV1 = Config::Get(Config::GFX_USE_FFV1);
|
bUseLossless = Config::Get(Config::GFX_USE_LOSSLESS);
|
||||||
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
|
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
|
||||||
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
|
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
|
||||||
sDumpPixelFormat = Config::Get(Config::GFX_DUMP_PIXEL_FORMAT);
|
sDumpPixelFormat = Config::Get(Config::GFX_DUMP_PIXEL_FORMAT);
|
||||||
|
@ -193,7 +193,7 @@ struct VideoConfig final
|
|||||||
bool bDumpEFBTarget = false;
|
bool bDumpEFBTarget = false;
|
||||||
bool bDumpXFBTarget = false;
|
bool bDumpXFBTarget = false;
|
||||||
bool bDumpFramesAsImages = false;
|
bool bDumpFramesAsImages = false;
|
||||||
bool bUseFFV1 = false;
|
bool bUseLossless = false;
|
||||||
std::string sDumpCodec;
|
std::string sDumpCodec;
|
||||||
std::string sDumpPixelFormat;
|
std::string sDumpPixelFormat;
|
||||||
std::string sDumpEncoder;
|
std::string sDumpEncoder;
|
||||||
|
Loading…
Reference in New Issue
Block a user