Set a automatic value for min_fps_target
resolves #942 resolves #956 resolves #982
This commit is contained in:
@@ -1923,9 +1923,8 @@ namespace video {
|
||||
});
|
||||
|
||||
// set max frame time based on client-requested target framerate.
|
||||
double minimum_fps_target = (config::video.minimum_fps_target > 0.0) ? config::video.minimum_fps_target * 1000 : config.encodingFramerate;
|
||||
double minimum_fps_target = (config::video.minimum_fps_target > 0.0) ? config::video.minimum_fps_target * 1000 : std::max(config.encodingFramerate / 5, 10000);
|
||||
auto max_frametime = std::chrono::nanoseconds(1000ms) * 1000 / minimum_fps_target;
|
||||
// auto max_frametime = std::chrono::nanoseconds(1000ms) * 1000 / config.encodingFramerate;
|
||||
auto encode_frame_threshold = std::chrono::nanoseconds(1000ms) * 1000 / config.encodingFramerate;
|
||||
auto frame_variation_threshold = encode_frame_threshold / 4;
|
||||
auto min_frame_diff = encode_frame_threshold - frame_variation_threshold;
|
||||
|
||||
Reference in New Issue
Block a user