From 1525ccad8037d9fdfa80cda8701f519da6830d00 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 16 Aug 2018 18:58:59 +0100 Subject: [PATCH] VCE: Small Adjustment to the Quality settings passed to ffmpeg. B-Frames +2 #1408 --- libhb/encavcodec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index dbad69ca7..cb7693082 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -347,15 +347,20 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) else if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 ) { char quality[7]; + char qualityB[7]; + double adjustedQualityB = job->vquality + 2; + snprintf(quality, 7, "%.2f", job->vquality); + snprintf(qualityB, 7, "%.2f", adjustedQualityB); + av_dict_set( &av_opts, "rc", "cqp", 0 ); - + av_dict_set( &av_opts, "qp_i", quality, 0 ); av_dict_set( &av_opts, "qp_p", quality, 0 ); if ( job->vcodec != HB_VCODEC_FFMPEG_VCE_H265 ) { - av_dict_set( &av_opts, "qp_b", quality, 0 ); + av_dict_set( &av_opts, "qp_b", qualityB, 0 ); } hb_log( "encavcodec: encoding at CQ %.2f", job->vquality ); } -- 2.40.0