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.

Which parameter for VENC would affect the bitrate of the H264 encoder? What are their priority if conflict exists?


   Employing the DVRRDK4.0, I am now using DM8168 for developing.  I would like to know which parameters for VENC would afftect the bitrate of the encoded H.264 streams.

   These are some parameters of VENC, which should be configured before we generate the link:

pLinkChPrm->format                  = IVIDEO_H264HP;
pLinkChPrm->profile                 = gVencModuleContext.vencConfig.h264Profile[i];
pLinkChPrm->dataLayout              = IVIDEO_FIELD_SEPARATED;
pLinkChPrm->fieldMergeEncodeEnable  = FALSE;
pLinkChPrm->enableAnalyticinfo      = pChPrm->enableAnalyticinfo;
pLinkChPrm->enableWaterMarking      = pChPrm->enableWaterMarking;
pLinkChPrm->maxBitRate              = pChPrm->maxBitRate;
pLinkChPrm->encodingPreset          = pChPrm->encodingPreset;
pLinkChPrm->rateControlPreset       = pChPrm->rcType;
pLinkChPrm->enableSVCExtensionFlag  = pChPrm->enableSVCExtensionFlag;
pLinkChPrm->numTemporalLayer        = pChPrm->numTemporalLayer;
pLinkChPrm->enableHighSpeed         = FALSE;

pLinkDynPrm->intraFrameInterval     = pDynPrm->intraFrameInterval;
pLinkDynPrm->targetBitRate          = pDynPrm->targetBitRate;
pLinkDynPrm->interFrameInterval     = 1;
pLinkDynPrm->mvAccuracy             = IVIDENC2_MOTIONVECTOR_QUARTERPEL;
pLinkDynPrm->inputFrameRate         = pDynPrm->inputFrameRate;
pLinkDynPrm->rcAlg                  = pDynPrm->rcAlg;
pLinkDynPrm->qpMin                  = pDynPrm->qpMin;
pLinkDynPrm->qpMax                  = pDynPrm->qpMax;
pLinkDynPrm->qpInit                 = pDynPrm->qpInit;
pLinkDynPrm->vbrDuration            = pDynPrm->vbrDuration;
pLinkDynPrm->vbrSensitivity         = pDynPrm->vbrSensitivity;

      As far as I know, the interFrameInterval(QOP), qpMin, qpMax and qpInit would affect the bitrate of my VENC.  And yet I do not know if there are some constraints for these parameters and how the "target bitrate" is achieved by setting these parameters?

      Could you please tell me how these parameters would affect my targetbitrate?

      Or, could you tell me if a "FIXED Bitrate Mode" exists for the VENC?




  • pLinkDynPrm->targetBitRate determines targetBitrate.

    pLinkDynPrm->rcAlg  determines if CBR or VBR rate control algorithm should be used.

    Refer the H264 Encoder user guide under ti_tools/codecs/REL.500.V.H264AVC.E.IVAHD.02.xx.xx.xx\500.V.H264AVC.E.IVAHD.02.00\IVAHD_001\Docs


    for details on what other parameters like qpMin,qpMax,qpInit,interFrameInterval mean.

  • From my experience I recommend, you set targetBitRate and maxBitRate to a value.  Then you decide CBR or VBR.  If you choose CBR, you will most likely have some frames the will sacrifice quality to meet the target bit rate.  If you select variable bit rate, then encoder does the best it can to meet the targetBitRate without going over the maxBitRate.  Less likely to have low quality frames but more likely to produce really large frames as well.  So you have to consider based on your bandwidth limitations too, if you have any.

    The CBR and VBR are based on the input framerate.

    Remember that if you have a small GOP then you will generate more IFrames and starter frames, these will take up a lot of your bits per second sacrificing quality in the rest of your frames.

    Hope this helps,