Skip to content

Commit be6d60f

Browse files
committed
frontend: Use Hybrid MP4 muxer for replay buffer if selected for recording
1 parent 5e91c94 commit be6d60f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

frontend/settings/OBSBasicSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ void OBSBasicSettings::SaveHotkeySettings()
35873587
return;
35883588

35893589
const char *id = obs_obj_get_id(main->outputHandler->replayBuffer);
3590-
if (strcmp(id, "replay_buffer") == 0) {
3590+
if (strcmp(id, "replay_buffer") == 0 || strcmp(id, "mp4_replay_buffer") == 0) {
35913591
OBSDataAutoRelease hotkeys = obs_hotkeys_save_output(main->outputHandler->replayBuffer);
35923592
config_set_string(config, "Hotkeys", "ReplayBuffer", obs_data_get_json(hotkeys));
35933593
}

frontend/utility/AdvancedOutput.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ AdvancedOutput::AdvancedOutput(OBSBasic *main_) : BasicOutputHandler(main_)
9292
else
9393
hotkey = nullptr;
9494

95-
replayBuffer = obs_output_create("replay_buffer", Str("ReplayBuffer"), nullptr, hotkey);
95+
const char *replay_mux = "replay_buffer";
96+
if (strcmp(recFormat, "hybrid_mp4") == 0)
97+
replay_mux = "mp4_replay_buffer";
98+
99+
replayBuffer = obs_output_create(replay_mux, Str("ReplayBuffer"), nullptr, hotkey);
96100

97101
if (!replayBuffer)
98102
throw "Failed to create replay buffer output "

frontend/utility/SimpleOutput.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ SimpleOutput::SimpleOutput(OBSBasic *main_) : BasicOutputHandler(main_)
212212
else
213213
hotkey = nullptr;
214214

215-
replayBuffer = obs_output_create("replay_buffer", Str("ReplayBuffer"), nullptr, hotkey);
215+
const char *replay_mux = "replay_buffer";
216+
if (strcmp(recFormat, "hybrid_mp4") == 0)
217+
replay_mux = "mp4_replay_buffer";
218+
219+
replayBuffer = obs_output_create(replay_mux, Str("ReplayBuffer"), nullptr, hotkey);
216220

217221
if (!replayBuffer)
218222
throw "Failed to create replay buffer output "

0 commit comments

Comments
 (0)