[Ffmpeg-devel] Encode AVIs using PPMs

Markus Bock mbock
Fri Aug 19 15:19:37 CEST 2005


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?

best regards,
Markus Bock





More information about the ffmpeg-devel mailing list