[Vorbis-dev] ogg_stream_flush

joostpen at zonnet.nl joostpen at zonnet.nl
Wed Feb 22 02:30:43 PST 2006


Thanks!

So there are no technical errors in using 'ogg_stream_flush' just some extra overhead if used to often. My 
application is relying on low-latency and high audio-quality, bandwidth is less an issue.

I will consider to post ogg_stream_flush after every 2 - 16 packets, instead of after every packet, this will assure 
stable stream, but less overhead.

Joost.


Citeren Monty <xiphmont at xiph.org>:
> 
> 
> 
> On Tue, Feb 21, 2006 at 10:20:12AM +0100, Joost Pennings wrote:
> > While building an ogg-vorbis stream encoder, I encountered some problems
> > with silence in the audiostream.
> > 
> > The bitrate drops to almost zero, and pages going out less then ones a
> > minute what makes the stream to stop / buffer.
> 
> You are correct.  I intend to add an API call that will direct libogg
> to flush either at some specified page size, or after a given period
> of time to make the automagic behavior more flexible.
> 
> > In earlier postings I read that I shout use ogg_stream_flush as an
> > alternative to ogg_stream_pageout, in case of silence.
> > 
> > My question is this; Is there any reason for not using ogg_stream_flush
> all
> > the time. 
> > 
> > So what are the advantages of ogg_stream_pageout?
> 
> ogg_stream_pageout currently attempts to keep pages to an approximate
> constant size (~4kB).  ogg_stream_flush will immediately flush a page,
> even if it contains only a single packet or fraction of a packet.
> 
> Ogg pages introduce a roughly fixed overhead per page; they're 26
> bytes each plus one byte per packet fragment.  If each of your Vorbis
> packets are, say, ten bytes each, using a page per packet would nearly
> triple the bitrate.
> 
> Flushing a page for every packet is perfectly valid; there's nothing
> wrong with the structure or correctness of the stream.  However, you
> pay a bitrate premium for doing so.
> 
> Monty
> 




-- 
_____________________________________________________________________
Tele2 Mobiel: nu gratis nummerbehoud bij bestelling via internet
http://www.tele2mobiel.nl/



More information about the Vorbis-dev mailing list