[Ffmpeg-devel] Encode AVIs using PPMs

Michael Niedermayer michaelni
Sun Aug 21 17:55:25 CEST 2005


On Fri, Aug 19, 2005 at 03:19:37PM +0200, Markus Bock wrote:
> Hi there,
> I checked out your current cvs version and found a little
> bug when converting ppms to an avi film. I used the
> following command lines:
> ffmpeg -vcodec ppm -i /tmp/my.%d.ppm my.avi
> This resulted in an avi film that had the right most pixels of the
> original image appearing on the left side of the movie.
> I debugged a little in your code and found the following
> reason for it in the file pnm.c in pnm_encode_frame:
> //    s->bytestream += strlen(s->bytestream);
>    if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
>        snprintf(s->bytestream, s->bytestream_end - s->bytestream, 
> "%d\n", 255);
> //        s->bytestream += strlen(s->bytestream);
> The lines commented out fixed the bug. I did not check
> the content of the bytestream but it seems as if there is
> no header text that needs to be skipped.
> Can you confirm this?

why do you store ppm in avi? anyway if you seriously want to do this
add an entry to avienc.c so ppm codec <-> fourcc doesnt fail



More information about the ffmpeg-devel mailing list