mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Allow users to specify the encoder used for framedumping.
This commit is contained in:
@ -159,7 +159,15 @@ bool AVIDump::CreateVideoFile()
|
||||
|
||||
const AVCodec* codec = nullptr;
|
||||
|
||||
codec = avcodec_find_encoder(codec_id);
|
||||
if (!g_Config.sDumpEncoder.empty())
|
||||
{
|
||||
codec = avcodec_find_encoder_by_name(g_Config.sDumpEncoder.c_str());
|
||||
if (!codec)
|
||||
WARN_LOG(VIDEO, "Invalid encoder %s", g_Config.sDumpEncoder.c_str());
|
||||
}
|
||||
if (!codec)
|
||||
codec = avcodec_find_encoder(codec_id);
|
||||
|
||||
s_codec_context = avcodec_alloc_context3(codec);
|
||||
if (!codec || !s_codec_context)
|
||||
{
|
||||
|
@ -84,6 +84,7 @@ void VideoConfig::Refresh()
|
||||
bUseFFV1 = Config::Get(Config::GFX_USE_FFV1);
|
||||
sDumpFormat = Config::Get(Config::GFX_DUMP_FORMAT);
|
||||
sDumpCodec = Config::Get(Config::GFX_DUMP_CODEC);
|
||||
sDumpEncoder = Config::Get(Config::GFX_DUMP_ENCODER);
|
||||
sDumpPath = Config::Get(Config::GFX_DUMP_PATH);
|
||||
iBitrateKbps = Config::Get(Config::GFX_BITRATE_KBPS);
|
||||
bInternalResolutionFrameDumps = Config::Get(Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS);
|
||||
|
@ -100,6 +100,7 @@ struct VideoConfig final
|
||||
bool bDumpFramesAsImages;
|
||||
bool bUseFFV1;
|
||||
std::string sDumpCodec;
|
||||
std::string sDumpEncoder;
|
||||
std::string sDumpFormat;
|
||||
std::string sDumpPath;
|
||||
bool bInternalResolutionFrameDumps;
|
||||
|
Reference in New Issue
Block a user