[FFmpeg-trac] #11122(ffmpeg:new): -force_key_frames source causes pkt->flags to have AV_PKT_FLAG_KEY set incorrectly

FFmpeg trac at avcodec.org
Tue Aug 13 00:10:35 EEST 2024


#11122: -force_key_frames source causes pkt->flags to have AV_PKT_FLAG_KEY set
incorrectly
----------------------------------------+----------------------------------
             Reporter:  David Johansen  |                    Owner:  (none)
                 Type:  defect          |                   Status:  new
             Priority:  normal          |                Component:  ffmpeg
              Version:  7.0             |               Resolution:
             Keywords:                  |               Blocked By:
             Blocking:                  |  Reproduced by developer:  0
Analyzed by developer:  0               |
----------------------------------------+----------------------------------
Comment (by David Johansen):

 Unfortunately, it appears this issue is in the encoder or something
 further down the line and using `-use_tfdt 0` doesn't resolve the issue.

 Here's an example video that results in 12 keyframes when the input has
 10:
 https://drive.google.com/file/d/1WxOrSi-
 GNB45nLUUiR4PT7c4H2VurtKk/view?usp=sharing

 And this command to generate the output:
 `ffmpeg -use_tfdt 0 -i input.mp4 -c:v libx264 -force_key_frames source
 output.mp4`

 And then this command to see how many keyframes there are:
 `ffprobe -show_entries frame=pict_type,pts_time,pkt_pos -of csv=p=0 -i
 output.mp4 | grep I`
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11122#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list