How to force frame type for encoder in MMAPI?

Hi, we need to force frame type for encoder.

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;

...

} x264_picture_t;

Can this feature be implemented in TX2? Thanks!

Hi Zcs,
We will evaluation this feature and feedback to you.

Thanks
wayne zhu

Hi, Wayne

Thank you!

Hi zcs,

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.

Hi Viranjan,

Thank you for the info.

I agree with you, but I need the precise position and type for frame.

Hi zcs,

currently encoder does not support setting parameters on to a precise frame number.

what is your exact use case here?

Hi Viranjan,

This is the demand of our customers.

Hi ZCS,
Could you check this interface(forceIDR)?

Hi, waynezhu

I had tried it, but it cannot produce a IDR frame at precise position(frame number).

Hi ZCS,
We can’t support to set IDR frame synchronously now.
We also don’t have plan to support it on rel28.2.

Thanks
wayne zhu

Hi, waynezhu

Thank you!