From 5d82c078ea93d7eee12ff863a4f9eb5fb2d30d16 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Fri, 3 Jan 2020 12:30:09 +0530 Subject: [PATCH] ffmpeg: don't force source-tracked keyframes for duplicates Prevents a run of consecutive duplicate frames from all being encoded as keyframes, when force_key_frames is set to source. --- fftools/ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 2c5fcc0532..6bcd7b94d2 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1266,7 +1266,8 @@ static void do_video_out(OutputFile *of, ost->forced_keyframes_expr_const_values[FKF_N] += 1; } else if ( ost->forced_keyframes && !strncmp(ost->forced_keyframes, "source", 6) - && in_picture->key_frame==1) { + && in_picture->key_frame==1 + && !i) { forced_keyframe = 1; }