search for: ogg_stream_pageout

Displaying 20 results from an estimated 49 matches for "ogg_stream_pageout".

2004 Oct 18
3
ogg_packet -> ogg_page
..., and stuffs them back into ogg pages (which are then written to a file). extracting the packets works fine, but i have problems stuffing them into a new ogg stream. pseudo code: ogg_stream_init(os, serialno) foreach p in packets: ogg_stream_packetin(os, p) // try to extract a page ogg_stream_pageout(os, og) ogg_stream_pageout() always seems to return a valid ogg page - however, it does "return" the page, but it does not "extract" the page from the stream - if i call ogg_stream_pageout() more then once, i always get the same ogg_page. replacing ogg_stream_pageout() with...
2006 Feb 21
3
ogg_stream_flush
...ing 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. 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? Regards, Joost Pennings. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph....
2008 Nov 30
1
ogg_stream_pageout function...
...ogg_packet packet; m_frameSource.getYUVBits(m_buffer.y, m_buffer.u, m_buffer.v); theora_encode_YUVin(&m_encoder, &m_buffer); while(theora_encode_packetout(&m_encoder, isLastFrame, &packet)) ogg_stream_packetin(&m_oggStream, &packet); while (ogg_stream_pageout(&m_oggStream, &page)) { fwrite(page.header,page.header_len, 1, m_oggFile); fwrite(page.body,page.body_len, 1, m_oggFile); } 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 ca...
2002 Dec 27
1
ogg_stream_pageout(): Weird Documentation (libogg-1.0).
Hello! Can someone tell me, what the return value of ogg_stream_pageout() _really_ means? Documentation (libogg-1.0 - 20000615) says: ... Return Values 0 means that there is not enough data yet to form a page. 0 means that the page was successfully submitted to the bitstream. ... Thank You very much! Petr Tomasek -- Petr Tomasek, http://www.etf.cuni....
2005 Dec 08
1
A few questions how to use libogg
1.) after initializing a ogg_stream_state may I just keep calling ogg_stream_packetin with valid ogg_packet's until no more ogg_packets needs to be added? Or do I need to call ogg_stream_pageout after every ogg_stream_packetin? Iaw may I delay calling ogg_stream_pageout until there are no more packets to be added? 2.) I assume I have call ogg_stream_pageout until no more pages can be created and then call ogg_stream_flush if there are still bits left to be 'paged'? 3.) Do I n...
2004 Nov 16
0
metadata switches for ffmpeg2theora
...nit done */ @@ -86,50 +84,50 @@ /* write the bitstream header packets with proper page interleave */ /* first packet will get its own page automatically */ - if(!info.audio_only){ - theora_encode_header (&info.td, &info.op); - ogg_stream_packetin (&info.to, &info.op); - if (ogg_stream_pageout (&info.to, &info.og) != 1){ + if(!info->audio_only){ + theora_encode_header (&info->td, &info->op); + ogg_stream_packetin (&info->to, &info->op); + if (ogg_stream_pageout (&info->to, &info->og) != 1){ fprintf (stderr, "Internal Ogg li...
2004 Jan 09
5
timestamping / latency
Hi there, for a streaming application developed for a project at the Society for Arts and Technology Montreal, Canada, we would need to know the exact delay of our ogg/vorbis streams. It seems there are several factors that make up the total delay I get. Is there a way to find out how large the delay introduced by the encoder and decoder is? Or in other words, how many unprocessed samples
2006 Nov 06
3
[PATCH] Re: Strangeness with OggFlac files
...down a problem with generating OggFlac files. > > <snip> > > > I have looked into this and suspect that the > FLAC__stream_encoder_finish() > > function needs to finish off the stream using a call to > ogg_stream_flush() > > instead of the standard function ogg_stream_pageout(). > > I bashed on this a bit further and came up with the following patch: > > http://www.mega-nerd.com/tmp/flac-end_of_stream.diff > > There's probably a more tasteful way of acheiving the same result, > but > this version does fix the problem. thanks Erik, can...
2008 Jun 11
1
Page breaks when encoding ogg/theora
...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 ogg_stream_pageout() to write pages on demand, the video doesn't play in Windows Media Player using the latest ogg/theora DirectShow filters. When using ogg_stream_pageout(), I'm making sure that all the remaining pages are flushed at the end; it still doesn't work. This is a hex dump of the page after...
2006 Nov 03
2
Strangeness with OggFlac files
...kable.ogg"... New logical stream (#1, serial: 00003039): type unknown Warning: EOS not set on stream 1 I have looked into this and suspect that the FLAC__stream_encoder_finish() function needs to finish off the stream using a call to ogg_stream_flush() instead of the standard function ogg_stream_pageout(). Josh (or anyone), I'd appreciate it if you could take a look at this. Cheers, Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "life is too long to be an expert at harmful things,...
2004 Sep 22
3
copying an ogg stream
...s is also the place where i would set e_o_f...): packet=list[len(list)-1] packet.granulepos=g packet.packetno=global_packetno++ write_packet(packet) the write_packet function looks like this: def write_packet(packet): ogg_stream_packetin(os, packet) ogg_page page; while (ogg_stream_pageout(os, page)): fwrite(page.header, page.header_len, f) fwrite(page.body, page.body_len, f) (if the e_o_s flag is set, then i use ogg_stream_flush() instead of ogg_stream_pageout()) my problem is: when i look at the original file, it differs from the copied file. this is the output of the...
2009 Jan 30
2
Delayed pages ?
Hi all ! I am experiencing a strange issue with the theora encoding process. Apparently, when I put packets into the ogg stream, the pages are not returned immediately by ogg_stream_pageout. What happens seems that I get several pages at once later. This causes me trouble since then the pages are not properly placed with the other vorbis audio pages, leading to warnings in oggz-validate, telling me that the theora packets are not well-ordered. The streams look good otherwise, in...
2009 Feb 24
0
any help with pyogg and pyvorbis?
...ut the vorbis-codec, I found that the problem occurs here: og = os.pageout() if not og: break no page is actually written, it returns None. And consequently it breaks. The wrapper-source says this: /* TODO: You can't keep a page between calls to flush or pageout!! */ static PyObject * py_ogg_stream_pageout(PyObject *self, PyObject *args) { ogg_page op; int res; if (!PyArg_ParseTuple(args, "")) return NULL; res = ogg_stream_pageout(PY_OGG_STREAM(self), &op); if (res == 0) { Py_INCREF(Py_None); return Py_None; } return py_ogg_page_from_page(&op); } And ogg...
2009 Dec 12
1
Skipping of sample in ogg writing
...vorbis_analysis (&vb, 0); vorbis_bitrate_addblock (&vb); while (vorbis_bitrate_flushpacket (&vd, &op)) { ogg_stream_packetin (&os, &op); for (;;) { if (ogg_stream_pageout (&os, &og) == 0) break; mywrite (og.header, og.header_len); mywrite (og.body, og.body_len); if (ogg_page_eos (&og)) break; } } }...
2009 Dec 12
1
Skipping of sample in ogg writing
...vorbis_analysis (&vb, 0); vorbis_bitrate_addblock (&vb); while (vorbis_bitrate_flushpacket (&vd, &op)) { ogg_stream_packetin (&os, &op); for (;;) { if (ogg_stream_pageout (&os, &og) == 0) break; mywrite (og.header, og.header_len); mywrite (og.body, og.body_len); if (ogg_page_eos (&og)) break; } } }...
2005 Sep 26
2
encoder_example.c Questions
...nalysis(&vb,NULL); vorbis_bitrate_addblock(&vb); while(vorbis_bitrate_flushpacket(&vd,&op)){ /* weld the packet into the bitstream */ ogg_stream_packetin(&os,&op); /* write out pages (if any) */ while(!eos){ int result=ogg_stream_pageout(&os,&og); if(result==0)break; fwrite(og.header,1,og.header_len,stdout); fwrite(og.body,1,og.body_len,stdout); /* this could be set above, but for illustrative purposes, I do it here (to show that vorbis does know where the stream ends)...
2006 Feb 03
1
padding in comment header
...dding for comments (in a file tagging context) the simplest solution is to zero pad the comment header packet to fixed length[1] and regenerate pages from #2 up to the first one containing the setup header. Is this correct? Not very closely related: should doing ogg_stream_pagein followed by while(ogg_stream_pageout()>0) on a stream work (I could check the code, but I'm sure someone here will just know), or must page in/out always be followed by the complimentary packet in/out? [1] i.e. some stepped length depending on the size of contents you'll have; along the lines 325 bytes content => 512 by...
2008 Oct 29
1
forcing eos on last theora packet (was Re: Theora 1.0 RC2)
...e written a function that forges this packet, along with NULL > data, which is allowed by the ogg specifications (and works with other > encoders, like speex). Hi, I think a simpler approach might be for you to directly set the eos flag on the last ogg page, after you have retrieved it from ogg_stream_pageout(). You can use a function like this (copied from oggz-chop.c, where it similarly cuts the end of a file): static void _ogg_page_set_eos (const ogg_page * og) { if (og == NULL) return; og->header[5] |= 0x04; ogg_page_checksum_set (og); } > Furthermore, since API claims that the 1-1 co...
2002 Mar 27
1
What exactly is threadsafe
...&m_vorbisBlock ); while( vorbis_bitrate_flushpacket( &m_vorbisDsp, &m_oggPacket ) ) { /* weld the packet into the bitstream */ ogg_stream_packetin( &m_oggStream, &m_oggPacket ); writePage(); } } **Write Page looks like this**: int result; result = ogg_stream_pageout( &m_oggStream, &m_oggPage ); while( result != 0 ) { m_sink->write( (char*)m_oggPage.header, m_oggPage.header_len ); m_sink->write( (char*)m_oggPage.body, m_oggPage.body_len ); result = ogg_stream_pageout( &m_oggStream, &m_oggPage ); } I would like to be abl...
2005 Oct 05
1
Simple encodig sample...
..._y / 2 ); /* encode the frame */ theora_encode_YUVin( td, &yuv ); if( frame_counter < 0 ) theora_encode_packetout( td, 1, &op ); else theora_encode_packetout( td, 0, &op ); ogg_stream_packetin( to, &op ); if( ogg_stream_pageout( to, videopage ) > 0 ) { if( frame_counter < 0 ) return STREAM_EOD; else return STREAM_EOP; } if( ogg_stream_eos( to ) ) return STREAM_EOS; } /* unreachable */ return 0; } int main( int argc,...