研究了一下x264编码延时.
方法是加log在x264.c
static int encode( x264_param_t *param, cli_opt_t *opt )
{
...
i_frame_size = encode_frame( h, opt->hout, &pic, &last_dts );
if( i_frame_size == 0) // delay frames
fprintf( stderr, "output zero %d\n", i_frame );
...
}
统计了一下,发现x264编码延时帧数符合下面的公式。
h->frames.i_delay =
param->i_sync_lookahead + // 前向考虑帧数
方法是加log在x264.c
static int encode( x264_param_t *param, cli_opt_t *opt )
{
...
i_frame_size = encode_frame( h, opt->hout, &pic, &last_dts );
if( i_frame_size == 0) // delay frames
fprintf( stderr, "output zero %d\n", i_frame );
...
}
统计了一下,发现x264编码延时帧数符合下面的公式。
h->frames.i_delay =
param->i_sync_lookahead + // 前向考虑帧数