mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Set fragmented MP4/MOV as default for beta/rc
Also includes a migration to a new key to ensure backwards-compatibility of profile config.
This commit is contained in:
parent
3fe241e95f
commit
f1223ca566
|
@ -1205,7 +1205,7 @@ bool SimpleOutput::ConfigureRecording(bool updateReplayBuffer)
|
|||
const char *path =
|
||||
config_get_string(main->Config(), "SimpleOutput", "FilePath");
|
||||
const char *format =
|
||||
config_get_string(main->Config(), "SimpleOutput", "RecFormat");
|
||||
config_get_string(main->Config(), "SimpleOutput", "RecFormat2");
|
||||
const char *mux = config_get_string(main->Config(), "SimpleOutput",
|
||||
"MuxerCustom");
|
||||
bool noSpace = config_get_bool(main->Config(), "SimpleOutput",
|
||||
|
@ -1703,7 +1703,7 @@ inline void AdvancedOutput::SetupRecording()
|
|||
int tracks;
|
||||
|
||||
const char *recFormat =
|
||||
config_get_string(main->Config(), "AdvOut", "RecFormat");
|
||||
config_get_string(main->Config(), "AdvOut", "RecFormat2");
|
||||
|
||||
bool is_fragmented = strcmp(recFormat, "fmp4") == 0 ||
|
||||
strcmp(recFormat, "fmov") == 0;
|
||||
|
@ -2124,7 +2124,7 @@ bool AdvancedOutput::StartRecording()
|
|||
: "RecFilePath");
|
||||
recFormat = config_get_string(main->Config(), "AdvOut",
|
||||
ffmpegRecording ? "FFExtension"
|
||||
: "RecFormat");
|
||||
: "RecFormat2");
|
||||
filenameFormat = config_get_string(main->Config(), "Output",
|
||||
"FilenameFormatting");
|
||||
overwriteIfExists = config_get_bool(main->Config(), "Output",
|
||||
|
@ -2227,7 +2227,7 @@ bool AdvancedOutput::StartReplayBuffer()
|
|||
: "RecFilePath");
|
||||
recFormat = config_get_string(main->Config(), "AdvOut",
|
||||
ffmpegRecording ? "FFExtension"
|
||||
: "RecFormat");
|
||||
: "RecFormat2");
|
||||
filenameFormat = config_get_string(main->Config(), "Output",
|
||||
"FilenameFormatting");
|
||||
overwriteIfExists = config_get_bool(main->Config(), "Output",
|
||||
|
|
|
@ -1378,6 +1378,13 @@ static const double scaled_vals[] = {1.0, 1.25, (1.0 / 0.75), 1.5,
|
|||
2.5, 2.75, 3.0, 0.0};
|
||||
|
||||
extern void CheckExistingCookieId();
|
||||
#if OBS_RELEASE_CANDIDATE == 0 && OBS_BETA == 0
|
||||
#define DEFAULT_CONTAINER "mkv"
|
||||
#elif defined(__APPLE__)
|
||||
#define DEFAULT_CONTAINER "fmov"
|
||||
#else
|
||||
#define DEFAULT_CONTAINER "fmp4"
|
||||
#endif
|
||||
|
||||
bool OBSBasic::InitBasicConfigDefaults()
|
||||
{
|
||||
|
@ -1472,6 +1479,26 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------- */
|
||||
/* Migrate old container selection (if any) to new key. */
|
||||
if (!config_has_user_value(basicConfig, "SimpleOutput", "RecFormat2") &&
|
||||
config_has_user_value(basicConfig, "SimpleOutput", "RecFormat")) {
|
||||
const char *old_format = config_get_string(
|
||||
basicConfig, "SimpleOutput", "RecFormat");
|
||||
config_set_string(basicConfig, "SimpleOutput", "RecFormat2",
|
||||
old_format);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (!config_has_user_value(basicConfig, "AdvOut", "RecFormat2") &&
|
||||
config_has_user_value(basicConfig, "AdvOut", "RecFormat")) {
|
||||
const char *old_format =
|
||||
config_get_string(basicConfig, "AdvOut", "RecFormat");
|
||||
config_set_string(basicConfig, "AdvOut", "RecFormat2",
|
||||
old_format);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------- */
|
||||
|
||||
if (changed)
|
||||
|
@ -1486,8 +1513,8 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|||
|
||||
config_set_default_string(basicConfig, "SimpleOutput", "FilePath",
|
||||
GetDefaultVideoSavePath().c_str());
|
||||
config_set_default_string(basicConfig, "SimpleOutput", "RecFormat",
|
||||
"mkv");
|
||||
config_set_default_string(basicConfig, "SimpleOutput", "RecFormat2",
|
||||
DEFAULT_CONTAINER);
|
||||
config_set_default_uint(basicConfig, "SimpleOutput", "VBitrate", 2500);
|
||||
config_set_default_uint(basicConfig, "SimpleOutput", "ABitrate", 160);
|
||||
config_set_default_bool(basicConfig, "SimpleOutput", "UseAdvanced",
|
||||
|
@ -1519,7 +1546,8 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|||
|
||||
config_set_default_string(basicConfig, "AdvOut", "RecFilePath",
|
||||
GetDefaultVideoSavePath().c_str());
|
||||
config_set_default_string(basicConfig, "AdvOut", "RecFormat", "mkv");
|
||||
config_set_default_string(basicConfig, "AdvOut", "RecFormat2",
|
||||
DEFAULT_CONTAINER);
|
||||
config_set_default_bool(basicConfig, "AdvOut", "RecUseRescale", false);
|
||||
config_set_default_uint(basicConfig, "AdvOut", "RecTracks", (1 << 0));
|
||||
config_set_default_string(basicConfig, "AdvOut", "RecEncoder", "none");
|
||||
|
|
|
@ -1909,7 +1909,7 @@ void OBSBasicSettings::LoadSimpleOutputSettings()
|
|||
bool noSpace = config_get_bool(main->Config(), "SimpleOutput",
|
||||
"FileNameWithoutSpace");
|
||||
const char *format =
|
||||
config_get_string(main->Config(), "SimpleOutput", "RecFormat");
|
||||
config_get_string(main->Config(), "SimpleOutput", "RecFormat2");
|
||||
int videoBitrate =
|
||||
config_get_uint(main->Config(), "SimpleOutput", "VBitrate");
|
||||
const char *streamEnc = config_get_string(
|
||||
|
@ -2166,7 +2166,7 @@ void OBSBasicSettings::LoadAdvOutputRecordingSettings()
|
|||
const char *type =
|
||||
config_get_string(main->Config(), "AdvOut", "RecType");
|
||||
const char *format =
|
||||
config_get_string(main->Config(), "AdvOut", "RecFormat");
|
||||
config_get_string(main->Config(), "AdvOut", "RecFormat2");
|
||||
const char *path =
|
||||
config_get_string(main->Config(), "AdvOut", "RecFilePath");
|
||||
bool noSpace = config_get_bool(main->Config(), "AdvOut",
|
||||
|
@ -3825,7 +3825,7 @@ void OBSBasicSettings::SaveOutputSettings()
|
|||
SaveCombo(ui->simpleOutputABitrate, "SimpleOutput", "ABitrate");
|
||||
SaveEdit(ui->simpleOutputPath, "SimpleOutput", "FilePath");
|
||||
SaveCheckBox(ui->simpleNoSpace, "SimpleOutput", "FileNameWithoutSpace");
|
||||
SaveComboData(ui->simpleOutRecFormat, "SimpleOutput", "RecFormat");
|
||||
SaveComboData(ui->simpleOutRecFormat, "SimpleOutput", "RecFormat2");
|
||||
SaveCheckBox(ui->simpleOutAdvanced, "SimpleOutput", "UseAdvanced");
|
||||
SaveComboData(ui->simpleOutPreset, "SimpleOutput", presetType);
|
||||
SaveEdit(ui->simpleOutCustom, "SimpleOutput", "x264Settings");
|
||||
|
@ -3855,7 +3855,7 @@ void OBSBasicSettings::SaveOutputSettings()
|
|||
|
||||
SaveEdit(ui->advOutRecPath, "AdvOut", "RecFilePath");
|
||||
SaveCheckBox(ui->advOutNoSpace, "AdvOut", "RecFileNameWithoutSpace");
|
||||
SaveComboData(ui->advOutRecFormat, "AdvOut", "RecFormat");
|
||||
SaveComboData(ui->advOutRecFormat, "AdvOut", "RecFormat2");
|
||||
SaveComboData(ui->advOutRecEncoder, "AdvOut", "RecEncoder");
|
||||
SaveComboData(ui->advOutRecAEncoder, "AdvOut", "RecAudioEncoder");
|
||||
SaveCheckBox(ui->advOutRecUseRescale, "AdvOut", "RecRescale");
|
||||
|
|
Loading…
Reference in a new issue