Fix issue resulting in freezing video-stream on peak bitrate on 1080P

This commit is contained in:
loki
2019-12-22 00:05:00 +01:00
parent e1b048fa53
commit e4c81c3a97
2 changed files with 11 additions and 5 deletions

View File

@@ -116,10 +116,10 @@ void encodeThread(
av_dict_set(&options, "tune", config::video.tune.c_str(), 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);
config.bitrate *= 1000;
ctx->rc_max_rate = config.bitrate;
ctx->rc_buffer_size = 100000;
ctx->bit_rate = config.bitrate;
}
else if(config::video.crf != 0) {
av_dict_set_int(&options, "crf", config::video.crf, 0);