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.

dm365 2nd h.264 encoding flickering issue

Hi, all

  I'm using dm365 Ti's gstreamer plugins TIVidenc1 to do h.264 encoding. I've two stream pipeline, both are h.264 encoder. The first h.264 encoder for 720P works fine, but the 2nd encoder for CIF resolution has a serious  flickering problem. I analysis the encoded stream frame by frame with a h.264 stream tool. I found that the flicking occurs at each I frame after all P frame in a period. The YUV file and encoded file are attached here. I 've set the h.264 encoder with high quality and high speed, but the result is the same.

  Pls help me, thanks!

flicking.7z
  • Sorry, the YUV file is too large to upload. I've check the YUV file, it is normal. The issue is belong to H.264 encoder. So I just upload the encoded h.264 file.

  • Any one has any idea? 

  • Hi,

    This issue is caused by the default CBR rate control.  The P-Frames all look OK, but once an I-Frame is encoded, the QP factor is increased in order to keep the frame size low enough for the bit rate.  At least this is my understanding.

    To fix this problem, you can switch to using "Custom CBR1" (value 5) in the rcAlgo field of the IH264VENC_DynamicParams structure.  See the H.264 encoder user guide for more details.  Here is an excerpt:

    "Custom CBR1 (rcAlgo 5): This is the customized version of CBR (rcAlgo = 0) algorithm. The main purpose of Custom CBR1 algorithm is to reduce the breathing artifacts in encoded videos. Breathing artifacts are observed when periodic intra frames are used at low bitrates. Another distinguishable feature of this algorithm is that, the skip frames are distributed over a group of encoded frames instead of occurring in bursts. "

    Chris Richardson