Take the 2-minute tour ×

I am able to encode video frames using libavcodec, by calling avcodec_encode_video function. How do I save these encoded frames into an AVI file?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Check this out:


You must open file for binary write, write header in it, and simultaniosly put binary frames in it, I think.

share|improve this answer
I tried that, but this seems to work only on few codec like MPEG or H264 but does not work for FLV1 or Huffyuv for instance... –  Guillaume Sep 1 '09 at 18:19
add comment

Your Answer


