mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-21 12:49:40 +08:00
UI: Add automatic file splitting
This commit implements a new feature to split recordings in split files in Advanced output mode. These basic settings are implemented. - Enable/disable the feature. Default is disabled. - Select a type of the limit, time or size. - Specifies the limit in seconds or MiB.
This commit is contained in:
@@ -1414,6 +1414,10 @@ bool OBSBasic::InitBasicConfigDefaults()
|
||||
config_set_default_uint(basicConfig, "AdvOut", "Track5Bitrate", 160);
|
||||
config_set_default_uint(basicConfig, "AdvOut", "Track6Bitrate", 160);
|
||||
|
||||
config_set_default_uint(basicConfig, "AdvOut", "RecSplitFileTime", 900);
|
||||
config_set_default_uint(basicConfig, "AdvOut", "RecSplitFileSize",
|
||||
2048);
|
||||
|
||||
config_set_default_bool(basicConfig, "AdvOut", "RecRB", false);
|
||||
config_set_default_uint(basicConfig, "AdvOut", "RecRBTime", 20);
|
||||
config_set_default_int(basicConfig, "AdvOut", "RecRBSize", 512);
|
||||
@@ -6947,7 +6951,7 @@ void OBSBasic::StreamingStop(int code, QString last_error)
|
||||
SetBroadcastFlowEnabled(auth && auth->broadcastFlow());
|
||||
}
|
||||
|
||||
void OBSBasic::AutoRemux(QString input)
|
||||
void OBSBasic::AutoRemux(QString input, bool no_show)
|
||||
{
|
||||
bool autoRemux = config_get_bool(Config(), "Video", "AutoRemux");
|
||||
|
||||
@@ -6979,7 +6983,8 @@ void OBSBasic::AutoRemux(QString input)
|
||||
output += "mp4";
|
||||
|
||||
OBSRemux *remux = new OBSRemux(QT_TO_UTF8(path), this, true);
|
||||
remux->show();
|
||||
if (!no_show)
|
||||
remux->show();
|
||||
remux->AutoRemux(input, output);
|
||||
}
|
||||
|
||||
@@ -7132,6 +7137,14 @@ void OBSBasic::RecordingStop(int code, QString last_error)
|
||||
UpdatePause(false);
|
||||
}
|
||||
|
||||
void OBSBasic::RecordingFileChanged(QString lastRecordingPath)
|
||||
{
|
||||
QString str = QTStr("Basic.StatusBar.RecordingSavedTo");
|
||||
ShowStatusBarMessage(str.arg(lastRecordingPath));
|
||||
|
||||
AutoRemux(lastRecordingPath, true);
|
||||
}
|
||||
|
||||
void OBSBasic::ShowReplayBufferPauseWarning()
|
||||
{
|
||||
auto msgBox = []() {
|
||||
|
||||
Reference in New Issue
Block a user