[FFmpeg-cvslog] ffmpeg: don't force source-tracked keyframes for duplicates

Gyan Doshi git at videolan.org
Sun Jan 5 09:00:30 EET 2020


ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Fri Jan  3 12:48:09 2020 +0530| [5d82c078ea93d7eee12ff863a4f9eb5fb2d30d16] | committer: Gyan Doshi

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d82c078ea93d7eee12ff863a4f9eb5fb2d30d16
---

 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;
         }
 



More information about the ffmpeg-cvslog mailing list