[x264-devel] Encoding frames with libavcodec

Jason Garrett-Glaser jason at x264.com
Tue Nov 27 17:01:39 CET 2012


On Tue, Nov 27, 2012 at 4:34 AM, Dolevo Jay <cmst at live.com> wrote:
> Hello all,
>
> I am trying to encode captured frames with libavcodec. My target is to
> encode couple of frames together but in the code below I try to encode only
> one image. My image is in RGB format and reachable by bits[0] pointer.The
> code runs but doesn't generate any encoded data. According to the return
> values that I give below, the code runs ok till avcodec_encode_video which
> returns zero. I see no change in encoded_buf after calling
> avcodec_encode_video. Could you please guide me to find the mistake?

I strongly recommend you use libx264 directly, not libavcodec, for
encoding with x264, as it's a lot simpler and has fewer things that
can go wrong.

Keep in mind the encoder may take a few dozen frames to start
returning data due to the default internal encoder delay.

Jason


More information about the x264-devel mailing list