Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

Why my Key frame not in the first with H264 encoder

$
0
0

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;


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>