Thank you very much sir!
I solved my problems according to your suggestion!

While I have to point out that:
1. for the four bytes header, it is automatically added if we set
*param.b_annexb
= 1*, and 0 while add the size of frame, so we don't need to add it
manually. (Don't forget to set *param.b_repeat_headers = 1* )
2. after calling x264_encoder_encode, we don't need to call
x264_nal_encode, because it is already done inside of the function
x264_encoder_encode. (http://doom10.org/index.php?topic=1820.0)

Thank you all again!
Sincerely,
Yinxia

2012/3/24 Việt Hùng Nguyễn <hungtro...@gmail.com>

> Hi,
>
> It seems you got some mistakes in your code.
> 1- In your conversion colour space code, not all stride is frameWidth. For
> YUV420p, stride for Cr, Cb is frameWidth/2
> 2- After you call x264_encoder_encode, you should call x264_nal_encode
> 3- When send data to ffmpeg h264 decoder, remember that is annex-B data
> stream
>
>
_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to