diff --git a/amalgamation/toxcore_amalgamation.c b/amalgamation/toxcore_amalgamation.c index 66a5f23b9d..e4b473f899 100644 --- a/amalgamation/toxcore_amalgamation.c +++ b/amalgamation/toxcore_amalgamation.c @@ -82738,7 +82738,8 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate, x265_param_parse(param, "intra-refresh", "1"); x265_param_parse(param, "frame-threads", "3"); - x265_param_parse(param, "strict-cbr", "1"); + + x265_param_parse(param, "log-level", "debug"); printf("vc_init_encoder_h265:vc->h264_enc_bitrate = %d\n", (int)vc->h264_enc_bitrate); @@ -82756,6 +82757,10 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate, param->rc.bitrate = 800; printf("vc_init_encoder_h265:bit_rate = %d\n", (int)(bit_rate / 1000)); + x265_param_parse(param, "strict-cbr", "1"); + param.rc.vbvBufferSize = 800 * VIDEO_BUF_FACTOR_H264; + param.rc.vbvMaxBitrate = 800 * 1; + // Range of values: an integer from 0 to 51 // x265_param_parse(param, "qp", "50"); diff --git a/toxav/codecs/h264/codec.c b/toxav/codecs/h264/codec.c index 386cee72c9..e7e32d8b3a 100644 --- a/toxav/codecs/h264/codec.c +++ b/toxav/codecs/h264/codec.c @@ -1973,7 +1973,8 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate, x265_param_parse(param, "intra-refresh", "1"); x265_param_parse(param, "frame-threads", "3"); - x265_param_parse(param, "strict-cbr", "1"); + + x265_param_parse(param, "log-level", "debug"); printf("vc_init_encoder_h265:vc->h264_enc_bitrate = %d\n", (int)vc->h264_enc_bitrate); @@ -1991,6 +1992,10 @@ static void vc_init_encoder_h265(Logger *log, VCSession *vc, uint32_t bit_rate, param->rc.bitrate = 800; printf("vc_init_encoder_h265:bit_rate = %d\n", (int)(bit_rate / 1000)); + x265_param_parse(param, "strict-cbr", "1"); + param.rc.vbvBufferSize = 800 * VIDEO_BUF_FACTOR_H264; + param.rc.vbvMaxBitrate = 800 * 1; + // Range of values: an integer from 0 to 51 // x265_param_parse(param, "qp", "50");