[FFmpeg-devel] Force a keyframe

Janin Kolenc janin.kolenc
Tue Mar 17 13:58:43 CET 2009

On Mon, Mar 16, 2009 at 8:17 PM, Jason Garrett-Glaser
<darkshikari at gmail.com> wrote:
> On Mon, Mar 16, 2009 at 9:15 AM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
>> On Mon, Mar 16, 2009 at 04:53:01PM +0100, Janin Kolenc wrote:
>>> On Mon, Mar 16, 2009 at 4:36 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>>> > On Mon, Mar 16, 2009 at 04:20:33PM +0100, Janin Kolenc wrote:
>>> >> Well... it did not work. Frame was marked as an I-frame but it was not
>>> >> encoded as one.
>>> >
>>> > maybe you found a bug, a patch fixing it would be welcome,
>>> > adding more code and a new field to workaround it is not
>>> If I understand the code correctly the pict_type field is set by
>>> select_input_picture in mpegvideo_enc.c
>>> and should not be set by a user ? So the correct way would be to set
>>> picture type according to
>>> some parameter (force_keyframe) in this function ?
>> No, (IMO) it should only be set by the encoder (i.e. if not set by
>> user), but not overridden. What to do about nonsensical values is a
>> different question though.
> IMO the proper solution would be to do what x264 does--just ignore
> them. ?That is, use the input frametypes to the best of the encoder's
> ability, but if they violate the parameters set by the user or basic
> common sense rules, just ignore those that violate the rules.
> Dark Shikari

I was really stupid on this one... Setting FF_I_TYPE does work, it was
me who was not doing it right... Thank you anyway.


More information about the ffmpeg-devel mailing list