Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramashankar
New Contributor III
61 Views

Can H264 Encoder generates output frame for every input raw frame

Hi,

I am using Media_SDK_2016.0.1 and sample version 6.0.0.68 for encoding NV12 frames (basically desktop capture frames) into H264 format through HW encoder (API version 1.16). I set the AsyncDepth value to 1 and LA Depth to 0 in encoder init. Other settings are as following:

    m_Params.MVC_flags            = MVC_DISABLED;
    m_Params.numViews            = 1;
    m_Params.nAsyncDepth        = 1;
    m_Params.dFrameRate            = 30;
    m_Params.nTargetUsage        = MFX_TARGETUSAGE_BALANCED;
    m_Params.nPicStruct            = MFX_PICSTRUCT_PROGRESSIVE;
    m_Params.nRateControlMethod    = MFX_RATECONTROL_CBR;
    m_Params.nBitRate            = CalculateDefaultBitrate(m_Params.CodecId, m_Params.nTargetUsage, m_Params.nDstWidth, m_Params.nDstHeight, m_Params.dFrameRate);
    m_Params.nQPI                = 0;
    m_Params.nQPP                = 0;
    m_Params.nQPB                = 0;
    m_Params.nQuality            = 0;
    m_Params.nNumSlice            = 0;
    m_Params.nMaxSliceSize        = 0;
    m_Params.nLADepth            = 0;

 

Currently, I am observing that my first h264 enocded frame is getting generated after inputting 3 NV12 frames, while I want to get output for each n every input frame. So is this possible by making some setting or changes in encoder?

Thanks,

 

0 Kudos
1 Reply
61 Views

Hi Ramashankar, 

I do not have your hardware information, but assuming you have latest hardware {" HW encoder (API version 1.16)"} . Then, let first start with simple steps. 

1) Update to latest driver for API 1.17 support, from: https://downloadcenter.intel.com/

2) To enable the Intel® Media SDK encoder for optimal low latency the following set of parameters should be used:

mfxVideoParam::AsyncDepth = 1 mfxInfoMFX::GopRefDist = 1 mfxInfoMFX::NumRefFrame = 1,please refer to this article "https://software.intel.com/en-us/articles/video-conferencing-features-of-intel-media-software-development-kit" Low Latency Encode and Decode, encode configuration section for details about these paramters. 

3) Also, for low latency mode, we have a tutorial simple_6_transcode_opaque_lowlat that shows parameters to set for low latency for both decode and encode. Please refer to encoder configuration in the tutorial and set similar settings for encoder in your application. 

Let me know your results after above updates. 

Thanks,

Reply