diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-10-09 19:08:55 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-10-09 19:11:16 +0200 |
commit | 9d76b0861eb0249194e96b663fbeca60cd5bfeb0 (patch) | |
tree | 7f4746e0e6985b4ca7f590d5f0ced2a2a6fdc355 /src/Overlay.cpp | |
parent | 61c9b4918ed81a6ad439748f8bcb1c6f9b0cf65e (diff) |
Add constant bitrate option
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r-- | src/Overlay.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index dcd18cf..34988f1 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -717,6 +717,7 @@ namespace gsr { // TODO: Validate input, fallback to valid values const std::string fps = std::to_string(config->record_config.record_options.fps); + const std::string video_bitrate = std::to_string(config->record_config.record_options.video_bitrate); const std::string output_file = config->record_config.save_directory + "/Video_" + get_date_str() + "." + container_to_file_extension(config->record_config.container.c_str()); const std::string audio_tracks_merged = merge_audio_tracks(config->record_config.record_options.audio_tracks); const std::string framerate_mode = config->record_config.record_options.framerate_mode == "auto" ? "vfr" : config->record_config.record_options.framerate_mode; @@ -736,6 +737,16 @@ namespace gsr { "-o", output_file.c_str() }; + if(config->record_config.record_options.video_quality == "custom") { + args.push_back("-bm"); + args.push_back("cbr"); + args.push_back("-q"); + args.push_back(video_bitrate.c_str()); + } else { + args.push_back("-q"); + args.push_back(config->record_config.record_options.video_quality.c_str()); + } + if(config->record_config.record_options.record_area_option == "window" || config->record_config.record_options.record_area_option == "focused") { args.push_back("-s"); args.push_back(region); |