This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

h.264 encoder set frame rate doesn't work 100%

Hello TI,

We're using EzSDK  and run the h.264 encoder When we set frame-rate, occasionally, the output bit-rate drops, which indicates that the encoder doesn't use the new frame-rate value to properly calculate the bits budget per frame.  

For example when bit-rate is set to 1500kbps and frame rate is 50FPS, all is well, and the output bit-rate is indeed around 1500kbps. When we set new frame-rate to 25FPS and reduce the number of frames accordingly, without changing anything else, we occasionally get just ~750kbps on the encoder output.

can you please advise ?

static void frameRate( OpenMAX::ComponentHandle & handle, unsigned frameRate )

    {

        OMX_VIDEO_CONFIG_DYNAMICPARAMS parameters = OpenMAX::ComponentParameters::initParameterStruct< OMX_VIDEO_CONFIG_DYNAMICPARAMS >();

        OpenMAX::ComponentParameters componentParameters( handle );

        parameters.nPortIndex = OMX_VIDENC_OUTPUT_PORT;

        componentParameters.getConfig( OMX_TI_IndexParamVideoDynamicParams, parameters );

        parameters.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.targetFrameRate = frameRate * 1000;

        parameters.videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.forceFrame = IVIDEO_NA_FRAME;

        componentParameters.setConfig( ( OMX_INDEXTYPE ) OMX_TI_IndexParamVideoDynamicParams, parameters );

    }