Skip to content

Commit

Permalink
UI: Update settings and fix presets for simple AMD encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaymar committed Nov 17, 2016
1 parent 90e805a commit 9494001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions UI/window-basic-main-outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,13 @@ void SimpleOutput::UpdateStreamingSettings_amd(obs_data_t *settings,
obs_data_set_int(settings, "AMF.H264.Usage", 0);
obs_data_set_int(settings, "AMF.H264.Profile", 100); // High
obs_data_set_string(settings, "profile", "high"); // High
obs_data_set_int(settings, "AMF.H264.ProfileLevel", 0); // Automatic

// Rate Control Properties
obs_data_set_int(settings, "AMF.H264.RateControlMethod", 1);
obs_data_set_string(settings, "rate_control", "CBR");
obs_data_set_int(settings, "AMF.H264.Bitrate.Target", bitrate);
obs_data_set_int(settings, "bitrate", bitrate);
obs_data_set_int(settings, "AMF.H264.FillerData", 1);
obs_data_set_int(settings, "AMF.H264.VBVBuffer", 0); // Automatic VBV Buffer
obs_data_set_double(settings, "AMF.H264.VBVBuffer.Strictness", 0.9);

// Picture Control Properties
obs_data_set_double(settings, "AMF.H264.KeyframeInterval", 2.0);
Expand All @@ -529,9 +526,8 @@ void SimpleOutput::UpdateRecordingSettings_amd_cqp(int cqp)
obs_data_set_int(settings, "AMF.H264.Usage", 0);
obs_data_set_int(settings, "AMF.H264.Profile", 100); // High
obs_data_set_string(settings, "profile", "high"); // High
obs_data_set_int(settings, "AMF.H264.ProfileLevel", 0); // Automatic

// Rate Control Properties
// Rate Control Properties
obs_data_set_int(settings, "AMF.H264.RateControlMethod", 0);
obs_data_set_string(settings, "rate_control", "CQP");
obs_data_set_int(settings, "AMF.H264.QP.IFrame", cqp);
Expand Down
3 changes: 3 additions & 0 deletions UI/window-basic-settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,8 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
"QSVPreset");
const char *nvPreset = config_get_string(main->Config(), "SimpleOutput",
"NVENCPreset");
const char* amdPreset = config_get_string(main->Config(), "SimpleOutput",
"AMDPreset");
const char *custom = config_get_string(main->Config(), "SimpleOutput",
"x264Settings");
const char *recQual = config_get_string(main->Config(), "SimpleOutput",
Expand All @@ -1218,6 +1220,7 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
curPreset = preset;
curQSVPreset = qsvPreset;
curNVENCPreset = nvPreset;
curAMDPreset = amdPreset;

audioBitrate = FindClosestAvailableAACBitrate(audioBitrate);

Expand Down

0 comments on commit 9494001

Please sign in to comment.