From 037781bb69db95c01650683c3526be8c54760a2c Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Thu, 29 Nov 2018 10:21:31 -0800 Subject: [PATCH] nvenc: fix chapter mark positions Set flag that forces nvenc to produce IDR frames when a keyframe is forced. We require IDR frames at chapter marks. --- libhb/encavcodec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index d7c525a91..3637be37e 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -358,6 +358,9 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) //for nvenc to "turn off" the maximum bitrate feature //that is normally applied to constant quality. context->bit_rate = bit_rate_ceiling; + + // Force IDR frames when we force a new keyframe for chapters + av_dict_set( &av_opts, "forced-idr", "1", 0 ); } else if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 ) { -- 2.40.0