Bug#420230: ffmpeg[2theora] image2pipe `buffer underrun'

Ian Jackson ian at davenant.greenend.org.uk
Fri Apr 20 22:00:47 UTC 2007


Package: ffmpeg
Version: 0.cvs20060823-8

I am trying to encode a video stream using ffmpeg (or indeed
ffmpeg2theora).  The input data to be encoded comes from a series of
netpbm runes, one small shell scriptlet per frame.

Ideally I would like to use the `image2pipe' format but this has a
critical bug which AFAICT renders it unuseable: I saw a number of
messages about `buffer underruns' and some other messages and the
resulting output was unplayable.  I used
 ffmpeg -f image2pipe -i pipe:.ppm ...
and variations thereon, without success.  ffmpeg2theora didn't work
either.

I straced ffmpeg and found that it was occasionally getting short
reads from the input pipe.  That is, read(2) would sometimes return a
smaller number than it had asked for.  This is expected behaviour.  I
suspect (but I have no direct evidence) that ffmpeg is mishandling
this case.

I rearranged my program to use -f image2 and then everything worked
fine, so I know that it's the handling of piped input that is the
problem.

I'm afraid I don't have any more the version of my processing script
which I can use to reproduce this error but a quick web search
suggests other people sometimes have the same problem.  I can try to
produce a test case if you really want but I think my first route to
debugging at this point would be to check the code for the mistake I
suspect as I describe above.

Ian.




More information about the pkg-multimedia-maintainers mailing list