Hi All, Sorry if this is too much silly. Vorbis encoder gives out packets of information. 1. Is it that each packet contain information of one frame/window either 256 / 2048 or any length set by encoder? If yes then the encoded packet will be variable in length. 2. Every packet is divided into segments, how does the encoder decide on number of segments in each packet? It must be dependent upon page length right? 3. Segments are encoded into pages, (max page length is 64k), how does the encoder decide upon the page length? In short iam confused about lengths of packets and pages? Can somebody please explain me this. Thanks in advance.. Ravi __________________________________________________________ Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com
On 9/5/05, Ravi Lakkundi <ravilakkundi@yahoo.co.in> wrote:> Hi All, > > Sorry if this is too much silly. Vorbis encoder gives > out packets of information. > > 1. Is it that each packet contain information of one > frame/window either 256 / 2048 or any length set by > encoder? If yes then the encoded packet will be > variable in length.Right.> > 2. Every packet is divided into segments, how does the > encoder decide on number of segments in each packet? > It must be dependent upon page length right?No. In a single packet, all segments except the last are 255 bytes (if the packet is less than 255 bytes, there's only a single segment). The final segment is less than 255 bytes. This is mandated by how ogg works.> > 3. Segments are encoded into pages, (max page length > is 64k), how does the encoder decide upon the page > length? >libogg flushes a page, by default, when it's just over 4 kB.> In short iam confused about lengths of packets and > pages? Can somebody please explain me this. >Hopefully my answers above helped a little. You should read through the ogg documentation, though. Mike
Hi, Does that means that even in 4k we might not get a page and look for it in another 4k next time?? If so how do we keep track of it? I have read the documentation Vorbis_spec_I, it will be helpful if i can get some clues. Thanks, Ravi __________________________________________________________ Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com