[Libav-user] Decoding Problem (got_picture always return 0)

ZHAO Yinxia hydezhao at gmail.com
Mon Mar 26 10:11:32 CEST 2012


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 <hungtrodt5 at 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120326/573f5fdb/attachment.html>


More information about the Libav-user mailing list