Allow keyint_min to codec_context
IMPORTANT: Be sure to replace all template sections {{ like this }} or your issue may be discarded.
Overview
I would like to lobby for support of keyint_min
in codec_context.
This should be a straight-forward add and would allow us to fully control keyframeing behavior from python <3.
Currently we can already control the maximum keyframe interval (codec_context.gop_size
) and whether to generate open/closed GOPs (codec_context.closed_gop
). What is missing is to be able to set the minimum interval to complete the set :)
Existing FFmpeg API
https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html#a3f920af17b8b15cc9d9465ecb732afcb
Expected PyAV API
Just like it does with all the other codec_context flags.
Example:
# force keyframes exactly every 10 frames
stream = container.add_stream("libx264", 24, ...)
stream.keyint_min = 10 # new
stream.gop_size = 10
stream.closed_gop = True
Investigation
There is no problem. Just a missing keyint_min = flags.flag_property('KEYINT_MIN')
in context.pyx
(I think).