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.

h264 encoder dropping frames

Sometimes, on complex scenes, the h264 encoder is dropping one or two frames - inputFrameSkip of the OutArgs on return is set to IVIDEO_FRAME_SKIPPED and bytesGenerated is 0. If the encoder is called again with the same frame and absolutely the same input arguments (i.e. when we see that the frame has been skipped, call immediately again), it, eventually, does the job. The problem is that the time it takes to encode such frame is a little bit more than usual (~10%), and can exceed the frame period. So when on some scenes there are many of such "skipped" frames, our application really has to drop the frame rate.

What is the reason for the skipped frames? Can it be avoided?

The latest h265 codec on dm368

Roma

  • Roman Ekjanov said:
    What is the reason for the skipped frames?

    When encoding for constant bit rate scenario, the frame skips are inevitable. It is the Rate control algorithm whick makes the frame skip decision based on the bit consumption which is dependent on the compelxity of video frame and target bitrate.

    Frame skips can be avioded, either

    by increasing the target bitrate or encoding with VBR (or fixedQP). But the passing on the same frame which has been earlier skipped is not a good option.