diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-03 17:20:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-03 17:20:16 +0100 |
commit | 60e8da0aa99fa35ed7d82d8442d985261db3b26a (patch) | |
tree | d7242f686a3f2bce4464ea8c4c8dec07396fc9f2 | |
parent | 170b2493fcd978bc26de04da78559f6efd309e22 (diff) |
Remove merge audio tracks option for streaming. Streaming sites dont support multiple audio tracks (in general)
-rw-r--r-- | include/Config.hpp | 2 | ||||
-rw-r--r-- | src/Overlay.cpp | 1 | ||||
-rw-r--r-- | src/gui/SettingsPage.cpp | 9 |
3 files changed, 8 insertions, 4 deletions
diff --git a/include/Config.hpp b/include/Config.hpp index de96722..87d71dd 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -25,7 +25,7 @@ namespace gsr { int32_t video_height = 0; int32_t fps = 60; int32_t video_bitrate = 15000; - bool merge_audio_tracks = true; + bool merge_audio_tracks = true; // Currently unused for streaming because all known streaming sites only support 1 audio track bool application_audio_invert = false; bool change_video_resolution = false; std::vector<std::string> audio_tracks; diff --git a/src/Overlay.cpp b/src/Overlay.cpp index e736627..b36dc37 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -2003,6 +2003,7 @@ namespace gsr { "-o", url.c_str() }; + config.streaming_config.record_options.merge_audio_tracks = true; add_common_gpu_screen_recorder_args(args, config.streaming_config.record_options, audio_tracks, video_bitrate, region, audio_tracks_merged); args.push_back(nullptr); diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp index 9a8866a..5fdcc91 100644 --- a/src/gui/SettingsPage.cpp +++ b/src/gui/SettingsPage.cpp @@ -304,7 +304,8 @@ namespace gsr { std::unique_ptr<Widget> SettingsPage::create_audio_section() { auto audio_device_section_list = std::make_unique<List>(List::Orientation::VERTICAL); audio_device_section_list->add_widget(create_audio_track_section()); - audio_device_section_list->add_widget(create_merge_audio_tracks_checkbox()); + if(type != Type::STREAM) + audio_device_section_list->add_widget(create_merge_audio_tracks_checkbox()); audio_device_section_list->add_widget(create_application_audio_invert_checkbox()); audio_device_section_list->add_widget(create_audio_codec()); return std::make_unique<Subsection>("Audio", std::move(audio_device_section_list), mgl::vec2f(settings_scrollable_page_ptr->get_inner_size().x, 0.0f)); @@ -1007,7 +1008,8 @@ namespace gsr { void SettingsPage::load_common(RecordOptions &record_options) { record_area_box_ptr->set_selected_item(record_options.record_area_option); - merge_audio_tracks_checkbox_ptr->set_checked(record_options.merge_audio_tracks); + if(merge_audio_tracks_checkbox_ptr) + merge_audio_tracks_checkbox_ptr->set_checked(record_options.merge_audio_tracks); application_audio_invert_checkbox_ptr->set_checked(record_options.application_audio_invert); change_video_resolution_checkbox_ptr->set_checked(record_options.change_video_resolution); load_audio_tracks(record_options); @@ -1128,7 +1130,8 @@ namespace gsr { record_options.video_height = atoi(video_height_entry_ptr->get_text().c_str()); record_options.fps = atoi(framerate_entry_ptr->get_text().c_str()); record_options.video_bitrate = atoi(video_bitrate_entry_ptr->get_text().c_str()); - record_options.merge_audio_tracks = merge_audio_tracks_checkbox_ptr->is_checked(); + if(merge_audio_tracks_checkbox_ptr) + record_options.merge_audio_tracks = merge_audio_tracks_checkbox_ptr->is_checked(); record_options.application_audio_invert = application_audio_invert_checkbox_ptr->is_checked(); record_options.change_video_resolution = change_video_resolution_checkbox_ptr->is_checked(); save_audio_tracks(record_options.audio_tracks, audio_track_list_ptr); |