From f7f0368f112e63cf75c9633d1939c7f9eefde82c Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 14 Nov 2019 20:30:08 +0000 Subject: VCE: Force the rate control method for the VCE encoder to see if it helps with rate control problems. #2414 (cherry picked from commit 57eeacb1007aca7e00d3c7bca32a3d7722ee02d3) --- libhb/encavcodec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index f462650c8..55cd34778 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -314,6 +314,11 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) av_dict_set( &av_opts, "rc", "cbr_hq", 0 ); hb_log( "encavcodec: encoding at rc=cbr_hq Bitrate %d", job->vbitrate ); } + + if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 ) { + av_dict_set( &av_opts, "rc", "vbr_peak", 0 ); + hb_log( "encavcodec: encoding at rc=vbr_peak Bitrate %d", job->vbitrate ); + } } else { -- cgit v1.2.3