11 Jun 05:18
Page breaks when encoding ogg/theora
From: Claus Höfele <claus.hoefele <at> gmail.com>
Subject: Page breaks when encoding ogg/theora
Newsgroups: gmane.comp.multimedia.ogg.theora.general
Date: 2008-06-11 03:20:59 GMT
Subject: Page breaks when encoding ogg/theora
Newsgroups: gmane.comp.multimedia.ogg.theora.general
Date: 2008-06-11 03:20:59 GMT
Hi everyone, I'm trying to build theora encoding into my game engine. Essentially, I'd like to do something similar to png2theora.c, where I take individual screen shots of my game and encode them into a video. Because png2theora.c uses the legacy C API, I used encoder_example.c as a template instead. encoder_example.c seems to be the only code out there that actually uses the th_* API. The basic program flow is: - start - open file - init theora and ogg - write first header - ogg page break - write remaining headers - ogg page break - for each frame - encode frame - pass packet to ogg - if ogg page is ready, write the page out <-- ** problem is here ** - end - get all remaining packets from the encoder - write all remaining ogg pages out - close file It all works when I put every theora packet into its own ogg page using ogg_stream_flush() after encoding a frame. However, when I use(Continue reading)
RSS Feed