h.264 always has B frames despite GopRefDist

h.264 always has B frames despite GopRefDist

I am trying to encode h.264 Main or High profiles without B frames to try to mux an mp4 that will play in quicktime correctly. I am running a modified sdk sample that is generally working well. Encoding the baseline profile avoids B frames, however I would like to be able to use main or high profiles as well. 

The reference manual says that if GopRefDist = 1 then there will be no B frames, but that is not working for me. Neither hw nor sw encodes obey that flag.

In CEncodingPipeline::InitMfxEncParams, here are the settings I'm using:

m_mfxEncParams.mfx.GopOptFlag = MFX_GOP_STRICT; // | MFX_GOP_CLOSED;
m_mfxEncParams.mfx.GopPicSize = 30;
m_mfxEncParams.mfx.GopRefDist = 1; // Seems to not be honored at all. 

The GopPicSize parameter is enacted correctly, the output changes when I modify it. But GopRefDist seems to have no effect. The string GopRefDist doesn't appear anywhere else in my solution.

My driver is: Intel(R) HD Graphics 4000          

Is there some other setting I am missing?



publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Hi Ryan,

That is certainly odd. Setting GopRefDist should enforce encoding with no B-frames.

Can you please share encoding log, captured using the Media SDK tracer tool?


Oops, I was setting m_mfxEncParams.mfx.TimeStampCalc not realizing it is in a union with the struct that has GopRefDist. So when I set TimeStampCalc it was resetting GopRefDist to 0. It is working now that I have fixed that bug.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya