From e1b048fa5300287eccb4e1f6ed44d4daaa0b1e75 Mon Sep 17 00:00:00 2001 From: loki Date: Sat, 21 Dec 2019 16:41:51 +0100 Subject: [PATCH] commit current progress --- sunshine/video.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sunshine/video.cpp b/sunshine/video.cpp index 2cfd25d2..049b5ac7 100644 --- a/sunshine/video.cpp +++ b/sunshine/video.cpp @@ -115,7 +115,13 @@ void encodeThread( av_dict_set(&options, "preset", config::video.preset.c_str(), 0); av_dict_set(&options, "tune", config::video.tune.c_str(), 0); - if(config::video.crf != 0) { + if(config.bitrate > 500) { + ctx->rc_max_rate = 2000000; + ctx->rc_buffer_size = 2000000; + ctx->bit_rate = config.bitrate * 1000; +// av_dict_set_int(&options, "qp", config::video.qp, 0); + } + else if(config::video.crf != 0) { av_dict_set_int(&options, "crf", config::video.crf, 0); } else {