[theora] ogg_stream_pageout function...

Ralph Giles giles at xiph.org
Sun Nov 30 13:48:59 PST 2008


On 30-Nov-08, at 1:25 PM, Andrea Fontana wrote:

> This piece of code runs in real-time. I want to remove the last  
> while block and save theora packets directly to a temporary file.  
> Then when capture is finished I read packets from temp file and  
> send them to ogg_stream_pageout. Does this solution improve  
> performance?

I wouldn't expect it to affect performance. Ogg encapsulation is  
fairly cheap, and the memcpy()s it requires will be much faster than  
writing the data in either form to disk.

If your video is small (packets often < 4 KB) writing out a packet at  
a time may spread the disk access more evenly, if that helps.

Have you tried setting TH_ENCCTL_SET_SPLEVEL to 2? In the 1.0 encoder  
this trades some quality/bitrate for performance, and is intended for  
constrained realtime applications.

  -r


More information about the theora mailing list