Merge pull request #680 from Xaymar/plugin_enc-amf

enc-amf: Update to version 1.4.0.0
master
Jim 2016-11-03 13:09:51 -07:00 committed by GitHub
commit f8f71541ad
5 changed files with 37 additions and 26 deletions

2
.gitmodules vendored
View File

@ -7,7 +7,7 @@
url = https://github.com/palana/Syphon-Framework.git url = https://github.com/palana/Syphon-Framework.git
[submodule "plugins/enc-amf"] [submodule "plugins/enc-amf"]
path = plugins/enc-amf path = plugins/enc-amf
url = https://github.com/Xaymar/OBS-AMD-Advanced-Media-Framework.git url = https://github.com/Xaymar/obs-studio_amf-encoder-plugin.git
[submodule "plugins/obs-browser"] [submodule "plugins/obs-browser"]
path = plugins/obs-browser path = plugins/obs-browser
url = https://github.com/kc5nra/obs-browser.git url = https://github.com/kc5nra/obs-browser.git

View File

@ -501,42 +501,49 @@ void SimpleOutput::UpdateRecordingSettings_nvenc(int cqp)
void SimpleOutput::UpdateStreamingSettings_amd(obs_data_t *settings, void SimpleOutput::UpdateStreamingSettings_amd(obs_data_t *settings,
int bitrate) int bitrate)
{ {
int bits = bitrate * 1000; // Static Properties
obs_data_set_int(settings, "AMF.H264.Usage", 0); obs_data_set_int(settings, "AMF.H264.Usage", 0);
obs_data_set_int(settings, "AMF.H264.QualityPreset", 2); obs_data_set_int(settings, "AMF.H264.Profile", 100); // High
obs_data_set_int(settings, "AMF.H264.ProfileLevel", 51); 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.FillerData", 1);
obs_data_set_int(settings, "AMF.H264.FrameSkipping", -1); obs_data_set_int(settings, "AMF.H264.VBVBuffer", 0); // Automatic VBV Buffer
obs_data_set_int(settings, "AMF.H264.BPicture.Pattern", 2); obs_data_set_double(settings, "AMF.H264.VBVBuffer.Strictness", 0.9);
obs_data_set_int(settings, "AMF.H264.BPicture.Reference", 1);
obs_data_set_int(settings, "AMF.H264.Bitrate.Target", bits); // Picture Control Properties
obs_data_set_int(settings, "AMF.H264.Bitrate.Peak", bits); obs_data_set_double(settings, "AMF.H264.KeyframeInterval", 2.0);
obs_data_set_int(settings, "AMF.H264Advanced.VBVBuffer.Size", bits); obs_data_set_int(settings, "keyint_sec", 2);
obs_data_set_string(settings, "profile", "high");
} }
void SimpleOutput::UpdateRecordingSettings_amd_cqp(int cqp) void SimpleOutput::UpdateRecordingSettings_amd_cqp(int cqp)
{ {
obs_data_t *settings = obs_data_create(); obs_data_t *settings = obs_data_create();
// Static Properties
obs_data_set_int(settings, "AMF.H264.Usage", 0); obs_data_set_int(settings, "AMF.H264.Usage", 0);
obs_data_set_int(settings, "AMF.H264.QualityPreset", 2); obs_data_set_int(settings, "AMF.H264.Profile", 100); // High
obs_data_set_int(settings, "AMF.H264.ProfileLevel", 51); obs_data_set_string(settings, "profile", "high"); // High
obs_data_set_int(settings, "AMF.H264.FillerData", 0); obs_data_set_int(settings, "AMF.H264.ProfileLevel", 0); // Automatic
obs_data_set_int(settings, "AMF.H264.FrameSkipping", 0);
obs_data_set_int(settings, "AMF.H264.QP.Minimum", 0); // Rate Control Properties
obs_data_set_int(settings, "AMF.H264.QP.Maximum", 51); 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); obs_data_set_int(settings, "AMF.H264.QP.IFrame", cqp);
obs_data_set_int(settings, "AMF.H264.QP.PFrame", cqp); obs_data_set_int(settings, "AMF.H264.QP.PFrame", cqp);
obs_data_set_int(settings, "AMF.H264.QP.BFrame", cqp); obs_data_set_int(settings, "AMF.H264.QP.BFrame", cqp);
obs_data_set_int(settings, "AMF.H264.BPicture.Pattern", 3);
obs_data_set_int(settings, "AMF.H264.BPicture.Reference", 1);
obs_data_set_int(settings, "keyint_sec", 1);
obs_data_set_string(settings, "rate_control", "CQP");
obs_data_set_string(settings, "profile", "high");
// Picture Control Properties
obs_data_set_double(settings, "AMF.H264.KeyframeInterval", 2.0);
obs_data_set_int(settings, "keyint_sec", 2);
// Update and release
obs_encoder_update(h264Recording, settings); obs_encoder_update(h264Recording, settings);
obs_data_release(settings); obs_data_release(settings);
} }

View File

@ -3331,9 +3331,12 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
preset = curNVENCPreset; preset = curNVENCPreset;
} else if (encoder == SIMPLE_ENCODER_AMD) { } else if (encoder == SIMPLE_ENCODER_AMD) {
/* none */ ui->simpleOutPreset->addItem("Speed", "speed");
defaultPreset = ""; ui->simpleOutPreset->addItem("Balanced", "balanced");
ui->simpleOutPreset->addItem("Quality", "quality");
defaultPreset = "balanced";
preset = curAMDPreset;
} else { } else {
ui->simpleOutPreset->addItem("ultrafast", "ultrafast"); ui->simpleOutPreset->addItem("ultrafast", "ultrafast");
ui->simpleOutPreset->addItem("superfast", "superfast"); ui->simpleOutPreset->addItem("superfast", "superfast");

View File

@ -111,6 +111,7 @@ private:
QString curPreset; QString curPreset;
QString curQSVPreset; QString curQSVPreset;
QString curNVENCPreset; QString curNVENCPreset;
QString curAMDPreset;
QString curAdvStreamEncoder; QString curAdvStreamEncoder;
QString curAdvRecordEncoder; QString curAdvRecordEncoder;

@ -1 +1 @@
Subproject commit 2dea2ed63e776bd7a135ebb5b20875ab20b6ee31 Subproject commit cafe7bdae18421414911bbe337534182f3b571cd