[FFmpeg-devel] [PATCH 2/2] ffmpeg: Don't clear input pict_type if force_key_frames is source
wkelleher at gogoair.com
Fri Dec 11 21:23:56 CET 2015
On 12/11, Michael Niedermayer wrote:
> On Fri, Dec 11, 2015 at 09:47:29AM -0600, Will Kelleher wrote:
> > The current behavior doesn't forward non-IDR I-frames to the encoder.
> would this not turn every I-type non keyframe into a key frame
> and if so, is that intended ?
Depending on how the codec implementation handles it, maybe.
I need a way to make the encoder aware of non-IDR I-frames. I can't really
tell if the original intent of the `force_key_frames = source` setting is to
force only IDR, or to generally force intra coding of the frame.
With this change, I'm able to differentiate between I-frames and IDR frames
using the key_frame member, which seems to only be set for IDR frames. So key
frames are (pict_type == AV_PICTURE_TYPE_I && key_frame) and normal I-frames are
just (pict_type == AV_PICTURE_TYPE_I).
If you think this will cause problems with other codecs, do you have any
advice for an alternate implementation?
Also, can you provide some context for why pict_type is being used instead of
key_frame? Does key_frame need to be valid for some other functionality?
More information about the ffmpeg-devel