png2theora can drop trailing frames
The "png2theora" program (examples/png2theora.c) can drop trailing frames. This occurs because the method "theora_close", which is called after the last input file is processed, calls "ogg_stream_pageout" instead of "ogg_stream_flush". The "ogg_stream_pageout" method is defined to buffer multiple chunks of data. The relevant code should instead read:
... theora_encode_packetout(&theora_td, 1, &op); if(ogg_stream_flush(&ogg_os, &og)) { fwrite(og.header, og.header_len, 1, ogg_fp); fwrite(og.body, og.body_len, 1, ogg_fp); } ...
To repeat, create a number (< 10) of small PNG images (say, 200x200). Encode them into a theora video using png2theora. Examine the number of actual frames in the output video. If you don't see the problem try again with a different number of input files. It is important that the PNG files be small enough that multiple frames fit in each output chunk.
I will provide an example on request.
-- Jim