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 framerate at 29.97 fps

We are working on DM8168 to encode h.264 streams. Our working package is "ti-ezsdk_dm816x-evm_5_05_02_00.tar.gz"

Our customer requires us to use fixed frame rate at 29.97 fps.


According to H.264 standard, we will have to set the following VUI parameters in SPS,

  1. num_units_in_tick=1001   
  2. time_scale=60000  
  3. fixed_frame_rate_flag=1   

May I know which file contains the above parameters, or how we can set the frame rate to be fixed at 29.97 ?

Thank you very much for kind help.

Regards,

Edward

  • Hello,

    You could check in the h264 encoder user guide in the EZSDK.

    You could search for "numunitsintick" for example.

    You could allocate this user guide in omx folder/src/ti/docs

    BR
    Margarita

  • Hi Edward,

    Please take care of the below parameters to get your requirement.

    num_units_in_tick = staticparams->vuiCodingParams->numUnitsInTicks

    time_scale = 2 * videnc2DynamicParams.targetFrameRate,

    fixed_frame_rate_flag ==> rcalgo should not be lowdelay

    Regards

    Gajanan

  • Thank you for prompt answers, Margarita and Gajanan.

    May I know which documents describe the data structure of the following?

    OMX_VIDEO_PARAM_PROFILELEVELTYPE tProfileLevel;
    OMX_VIDEO_PARAM_ENCODER_PRESETTYPE tEncoderPreset;
    OMX_VIDEO_PARAM_BITRATETYPE tVidEncBitRate;
    OMX_VIDEO_PARAM_PORTFORMATTYPE tVideoParams;
    OMX_PARAM_PORTDEFINITIONTYPE tPortDef;
    OMX_VIDEO_CONFIG_DYNAMICPARAMS tDynParams;
    OMX_VIDEO_PARAM_STATICPARAMS tStaticParam;

    In document "OMX Venc.pdf", it only says
    tStaticParam.videoStaticParams.h264EncStaticParams.vuiCodingParams.numUnitsInTicks = 1000;

    under data structure tStaticParam.videoStaticParams.h264EncStaticParams.vuiCodingParams, I can find timingInfoPresentFlag and numUnitsInTicks but not  "time_scale".

    May I know how to set "time_scale", or it will set by itself by giving the frame rate ?

    Thanks and best regards,

    Edward

  • Hi Edward,

    These parameters are not exposed to user. So these parameters can be controlled based on the configuration parameters which I told you to modify.

    E.g to get the time_scale = 60000, targetFrameRate should be 30000
    fixed_frame_rate_flag ==> rcalgo should not be lowdelay configuration


    Regadrs
    Gajanna