Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

h.264 always has B frames despite GopRefDist

RyanS
New Contributor I
580 Views

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                    8.15.10.2761

Is there some other setting I am missing?

Thanks,

Ryan

0 Kudos
2 Replies
Petter_L_Intel
Employee
580 Views
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? Regards, Petter
0 Kudos
RyanS
New Contributor I
580 Views
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.
0 Kudos
Reply