[theora] Page breaks when encoding ogg/theora

Claus Höfele claus.hoefele at gmail.com
Wed Jun 11 01:48:13 PDT 2008


Hi Ralph,

Thanks for your feedback.

After adding a couple more frames and eos to the last frame,
oggzvalidate reports no problem and oggzinfo prints:
Theora: serialno 0000000041
        94 packets in 3 pages, 31.3 packets/page
        Video-Framerate: 30.000 fps
        Video-Width: 512
        Video-Height: 512

Neither the DirectShow filters nor VideoLan can display the ogg file
when using ogg_stream_pageout(). VLC pops up a window for a short
time, but doesn't display anything.

I wrapped all ogg/theora function calls with asserts (see attached
TheoraResourceWriter.cpp/.h). test_pageout.ogv is the problematic
video file and test_flush.ogv the working one. The only difference in
producing these file is line 246/7 in TheoraResourceWriter.cpp.

I call my theora encoder class like so:

    const string fileName =
      TestUtils::getTestDirectory(m_details.suiteName) + FILE_NAME;

    // Write 3s worth of frames.
    TheoraResourceWriter theora(fileName);
    for (unsigned int i = 0; i < 90; i++)
    {
      CHECK(theora.write(/*image, */false));
    }
    CHECK(theora.write(/*image, */true));

    CHECK(FileUtils::fileExists(fileName));

I'm sure it's something trivial I'm missing.

-Claus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_flush.ogv
Type: application/octet-stream
Size: 6159 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora/attachments/20080611/0e73812b/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_pageout.ogv
Type: application/octet-stream
Size: 3729 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora/attachments/20080611/0e73812b/attachment-0001.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TheoraResourceWriter.cpp
Url: http://lists.xiph.org/pipermail/theora/attachments/20080611/0e73812b/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TheoraResourceWriter.h
Url: http://lists.xiph.org/pipermail/theora/attachments/20080611/0e73812b/attachment-0001.txt 


More information about the theora mailing list