[x264-devel] x264_encoder_encode process the first frame failed

Gil Pedersen gil at cmi.aau.dk
Tue Aug 23 13:21:00 CEST 2011


Hi,

x264 will always have at least a 1 frame encoder lag when b_vfr_input is set (as it is for your use case). The first frame is still encoded, you just won't receive the coded data until the next x264_encoder_encode() call.

/Gil

On 23/08/2011, at 11.54, Lucas Zhang wrote:

Now I found a method to collect every frame picture of phone's camera and write them into a file. Then I read these data from the file, and use x264_encoder_encode( x264_t *, x264_nal_t **pp_nal, int *pi_nal, x264_picture_t *pic_in, x264_picture_t *pic_out ); to do the compression. However, the *pi_nal always return 0 when processing the first frame, and the output video is full of green pictures. Does anyone encounter this problem? Thank you~ Below is my setting.

        x264_param_default(param); //set default param
param->i_width = width; //set frame width
param->i_height = height; //set frame height
param->rc.i_lookahead =0;

param->i_fps_num = fps;
param->i_fps_den = 1;
x264_param_apply_profile(param,"baseline");



--
Zhang Qing (张卿)
http://about.me/zhang_qing
_______________________________________________
x264-devel mailing list
x264-devel at videolan.org<mailto:x264-devel at videolan.org>
http://mailman.videolan.org/listinfo/x264-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20110823/b70bb0ec/attachment.html>


More information about the x264-devel mailing list