Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

Why my Key frame not in the first with H264 encoder


I set a Encoder with GOP = 3 to generate the h264 stream, then I check the frame type with checking the mfxStream.FrameType flag, but I get the weird order like:  P, P, K, P ,P, K, P , P , K    ( P is p frame and K is key frame).

I just wonder why the encoder didnt generate  the h264 stream start with K frame?   like  K, P ,P, K, P , P , K , P, P


Here is my parameter:  

    encodepara.mfx.GopPicSize = 3;

    encodepara.mfx.GopRefDist = 1;

    encodepara.mfx.GopOptFlag  =  MFX_FRAMETYPE_I | MFX_FRAMETYPE_REF;

    encodepara.mfx.IdrInterval = 0;

    encodepara.mfx.NumRefFrame = 1;

0 Kudos
0 Replies