[x264-devel] Does x264 encoder has 1 frame delay on IFrame generation

Jason Garrett-Glaser darkshikari at gmail.com
Fri Sep 17 14:47:47 CEST 2010


On Fri, Sep 17, 2010 at 4:51 AM, Alexander Sbitnev
<alexander.sbitnev at gmail.com> wrote:
>>> I discovered that flag for X264_TYPE_IDR becomes effective not on the
>>> exact frame it requested but on the frame comes after that.
>>>
>>> Is it correct x264 behavior or something wrong with my code/settings?
>>
>>Are you sure your x264 settings configuration doesn't have a delay between
> input and output?  x264 by default has a considerable delay
>>(~40-50 frames), and a very specific set of options is necessary to get
> zero-latency output.
>
> No I am not sure plain and encoded frame are the same. I have no tool
> currently to see difference before and after X264_ENCODER_ENCODE. But as I
> see X264_ENCODER_ENCODE start to producing output with reasonable frame
> sizes right from the first frame. As I understand in the case of internal
> frame processing delay first frame must be empty or ultra small?  Am I
> right?
> First processed frame info: x264    frame=   0 QP=35.46 NAL=3 Slice:I Poc:0
> I:3600 P:0    SKIP:0    size=20344 bytes

x264_encoder_delayed_frames() will tell you the current delay.

In the case of delayed frames, x264 will return empty frames until the
first valid one.

Dark Shikari


More information about the x264-devel mailing list