|
@@ -1185,8 +1185,6 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|
|
"flv");
|
|
|
config_set_default_uint (basicConfig, "SimpleOutput", "VBitrate",
|
|
|
2500);
|
|
|
- config_set_default_string(basicConfig, "SimpleOutput", "StreamEncoder",
|
|
|
- SIMPLE_ENCODER_X264);
|
|
|
config_set_default_uint (basicConfig, "SimpleOutput", "ABitrate", 160);
|
|
|
config_set_default_bool (basicConfig, "SimpleOutput", "UseAdvanced",
|
|
|
false);
|
|
@@ -1196,8 +1194,6 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|
|
"veryfast");
|
|
|
config_set_default_string(basicConfig, "SimpleOutput", "RecQuality",
|
|
|
"Stream");
|
|
|
- config_set_default_string(basicConfig, "SimpleOutput", "RecEncoder",
|
|
|
- SIMPLE_ENCODER_X264);
|
|
|
config_set_default_bool(basicConfig, "SimpleOutput", "RecRB", false);
|
|
|
config_set_default_int(basicConfig, "SimpleOutput", "RecRBTime", 20);
|
|
|
config_set_default_int(basicConfig, "SimpleOutput", "RecRBSize", 512);
|
|
@@ -1326,6 +1322,20 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+extern bool EncoderAvailable(const char *encoder);
|
|
|
+
|
|
|
+void OBSBasic::InitBasicConfigDefaults2()
|
|
|
+{
|
|
|
+ bool oldEncDefaults = config_get_bool(App()->GlobalConfig(),
|
|
|
+ "General", "Pre23Defaults");
|
|
|
+ bool useNV = EncoderAvailable("ffmpeg_nvenc") && !oldEncDefaults;
|
|
|
+
|
|
|
+ config_set_default_string(basicConfig, "SimpleOutput", "StreamEncoder",
|
|
|
+ useNV ? SIMPLE_ENCODER_NVENC : SIMPLE_ENCODER_X264);
|
|
|
+ config_set_default_string(basicConfig, "SimpleOutput", "RecEncoder",
|
|
|
+ useNV ? SIMPLE_ENCODER_NVENC : SIMPLE_ENCODER_X264);
|
|
|
+}
|
|
|
+
|
|
|
bool OBSBasic::InitBasicConfig()
|
|
|
{
|
|
|
ProfileScope("OBSBasic::InitBasicConfig");
|
|
@@ -1557,6 +1567,8 @@ void OBSBasic::OBSInit()
|
|
|
cef = obs_browser_init_panel();
|
|
|
#endif
|
|
|
|
|
|
+ InitBasicConfigDefaults2();
|
|
|
+
|
|
|
CheckForSimpleModeX264Fallback();
|
|
|
|
|
|
blog(LOG_INFO, STARTUP_SEPARATOR);
|