[theora] trying to encode/decode videos using libtheora

Ribamar Santarosa de Sousa ribamar.santarosa at gmail.com
Sat Aug 26 19:34:24 PDT 2006

On 8/25/06, Ralph Giles <giles at xiph.org> wrote:
> On Thu, Aug 24, 2006 at 10:26:32PM -0300, Ribamar Santarosa de Sousa wrote:
> > The source code is here:
> > http://opensvn.csie.org/ribamar/projects/streaming/cvaenc.c
> I've only taken a quick look, but it looks like you're not writing out
> all the ogg pages. A packet can map to multiple pages, or many packets
> can map to the same page. You want something like this:
>         while((ret = ogg_stream_pageout(&stream, &page) > 0){
>                 fwrite(page.header,1,page.header_len,fout);
>                 fwrite(page.body,1,page.body_len,fout);
>         }
>         if (ret < 0) {
>                 fprintf(finfo, "problem pageout-ing.\n");
>         }

        I think I had tried everything you've said (except the
        serial number, but now I did). In truth, I believe to
        have tried any arrangement possible of (packetin,
        pageout, flush) for every ogg_packet, and that the
        updated current code on

        is likely to be writing out the things correctly;

        $ theora/examples/dump_video a.ogg
        YUV4MPEG2 W0 H0 F0:0 Ip A0:0

        Maybe the ogg_packets are corrupted. I've isolated the
        theora_decode_init segmentation fault in this file
        , which tries to encode and decode only the headers. Any


More information about the theora mailing list