In X264, I find the “i_type” of “x264_picture_t”(the input picture) can force frame type for encoder, as follows:
typedef struct
{
/* In: force picture type (if not auto)
* If x264 encoding parameters are violated in the forcing of picture types,
* x264 will correct the input picture type and log a warning.
* The quality of frametype decisions may suffer if a great deal of fine-grained
* mixing of auto and forced frametypes is done.
* Out: type of the picture encoded */
int i_type;
there are runtime configurable parameters for video_encode application that can force I frame runtime.
Following is the video_encode help
Runtime configurable parameter string should be of the form:
“f<frame_num1>,<prop_id1>,<prop_id2>#f<frame_num1>,<prop_id1>,<prop_id2>#…”
e.g. “f20,b8000000,i1#f300,b6000000,r40/1”
Property ids:
b Bitrate
p<peak_bitrate> Peak Bitrate
r<num/den> Framerate
i1 Force I-frame
NOTE: These encoding parameters are slightly imprecisely updated depending upon the number of
frames in queue and/or processed already.