obs-ffmpeg: Add NVENC preset mapping for old Default preset

The old NVENC preset "Default", labeled in OBS as "Performance", maps to
the new P3 preset when not using multipass. Since we previously only
enabled multipass/two-pass on "Max Quality", we can map this to P3 in
all cases.

This commit also modifies UI.
This commit is contained in:
Ryan Foster 2022-10-31 13:53:51 -04:00
parent 08f7a3778d
commit 254dc4081c
2 changed files with 11 additions and 0 deletions

View file

@ -2838,6 +2838,12 @@ static void convert_28_1_encoder_setting(const char *encoder, const char *file)
obs_data_set_string(data, "tune", "hq");
obs_data_set_string(data, "multipass", "qres");
} else if (astrcmpi(preset, "default") == 0) {
obs_data_set_string(data, "preset2", "p3");
obs_data_set_string(data, "tune", "hq");
obs_data_set_string(data, "multipass",
"disabled");
} else if (astrcmpi(preset, "hp") == 0) {
obs_data_set_string(data, "preset2", "p1");
obs_data_set_string(data, "tune", "hq");

View file

@ -472,6 +472,11 @@ static bool init_encoder_base(struct nvenc_data *enc, obs_data_t *settings,
nv_tuning = NV_ENC_TUNING_INFO_HIGH_QUALITY;
nv_multipass = NV_ENC_TWO_PASS_QUARTER_RESOLUTION;
} else if (astrcmpi(preset, "default") == 0) {
nv_preset = NV_ENC_PRESET_P3_GUID;
nv_tuning = NV_ENC_TUNING_INFO_HIGH_QUALITY;
nv_multipass = NV_ENC_MULTI_PASS_DISABLED;
} else if (astrcmpi(preset, "hp") == 0) {
nv_preset = NV_ENC_PRESET_P1_GUID;
nv_tuning = NV_ENC_TUNING_INFO_HIGH_QUALITY;