[libav-api] How to output color (.ppm) images using api-exmaple.c
lu_zero at gentoo.org
Tue Sep 17 12:21:17 CEST 2013
On 17/09/13 04:27, Michael B. Darling wrote:
> I have read about the format of .pgm and .ppm files from
> (http://paulbourke.net/dataformats/ppm/), but have not been able to
> generate .ppm images. I have tried creating a new function
> ppm_save() (modified code attached) and replacing all calls to
> pgm_save() with my new function, but I essentially get three
> subsequent frames tiled in the same image file.
The code doesn't seem attached, you might read about the img2 muxer and
use AV_CODEC_ID_PPM as encoder.
> I believe this is because the call to len = avcodec_decode_video2(c,
> picture, &got_picture, &avpkt) is only storing the gray image data.
Hardly possible, check all the pointers in the AVFrame data =)
More information about the libav-api