UI: Don't set fragmentation movflags in lossless mode

This commit is contained in:
gxalpha 2023-07-14 13:40:10 +02:00 • committed by Lain
commit 84f1e962a1

View file

@ -1330,6 +1330,7 @@ bool SimpleOutput::ConfigureRecording(bool updateReplayBuffer)
config_get_int(main->Config(), "SimpleOutput", "RecTracks");
bool is_fragmented = strncmp(format, "fragmented", 10) == 0;
bool is_lossless = videoQuality == "Lossless";
string f;
@ -1356,7 +1357,8 @@ bool SimpleOutput::ConfigureRecording(bool updateReplayBuffer)
}
// Use fragmented MOV/MP4 if user has not already specified custom movflags
if (is_fragmented && (!mux || strstr(mux, "movflags") == NULL)) {
if (is_fragmented && !is_lossless &&
(!mux || strstr(mux, "movflags") == NULL)) {
string mux_frag =
"movflags=frag_keyframe+empty_moov+delay_moov";
if (mux) {
@ -1366,7 +1368,7 @@ bool SimpleOutput::ConfigureRecording(bool updateReplayBuffer)
obs_data_set_string(settings, "muxer_settings",
mux_frag.c_str());
} else {
if (is_fragmented)
if (is_fragmented && !is_lossless)
blog(LOG_WARNING,
"User enabled fragmented recording, "
"but custom muxer settings contained movflags.");