search for: ogg_stream_flush

Displaying 20 results from an estimated 44 matches for "ogg_stream_flush".

2006 Feb 21
3
ogg_stream_flush
Hi, 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. 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...
2006 Nov 06
3
[PATCH] Re: Strangeness with OggFlac files
...; > Josh et al, > > > > I've been tracking 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, &g...
2006 Jun 07
1
ogg encoding
I was wondering. When doing ogg only encoding, how do you mark end of stream? I am setting ogg_packet.e_o_s and then submitting it via ogg_stream_packetin() and then, because its the last potential page ogg_stream_flush()ing it. But when I walk through the file, EOS is not set on that logical bitstream. I have been using oggenc.c/encoder.c and oggdec.c/decoder.c for examples, but because the packet assembly is done down in the vorbis stuff, I havent yet seen how this is handled normally. Any help would be greatly...
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 03
2
Strangeness with OggFlac files
...ogginfo seekable.ogg Processing file "seekable.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 +-----------------------------------------------------------+ &qu...
2006 Nov 06
0
[PATCH] Re: Strangeness with OggFlac files
...is happening only because > the total_samples_estimate is 0? (so the e_o_s setting in the > existing code is never triggered). In the Ogg code, I believe that there are two things that must be satisfied to correctly write an end of stream: - packet.e_o_s must be true - Need to call ogg_stream_flush() instead of instead of ogg_stream_pageout() I haven't tested it, but I don't think just setting packet.e_o_s is sufficient to close the stream. The forced ogg_stream_flush() is required. Maybe these two actions can be carried out in the function FLAC__ogg_encoder_aspect_finish() wh...
2006 Nov 06
1
[PATCH] Re: Strangeness with OggFlac files
On Tue, Nov 07, 2006 at 06:31:04AM +1100, Erik de Castro Lopo wrote: > I haven't tested it, but I don't think just setting packet.e_o_s > is sufficient to close the stream. The forced ogg_stream_flush() > is required. libogg checks the e_o_s flag (and has always done so, according to svn) so you shouldn't have to call ogg_stream_flush() except when you want to force a page boundary (such as after the header packets). ogg/src/framing.c line 449 One common mistake it to not loop on ogg_...
2005 Dec 08
1
A few questions how to use libogg
...l 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 need to manually set the e_o_s of the last packet added? 4.) may I call ogg_stream_init again on a already used ogg_stream_state struct to reuse it? 5.) Is it possible to start decoding a ogg_stream which has not yet been fully cons...
2007 Dec 13
1
Help recording from PCM stream and silence.
I need it to be able to take a stream of PCM data and encode it. Right now it works if I am recording from a source (i.e. microphone or with "what you hear") but when I try to use another API (Team Speak) to capture the PCM data it doesn't seem to be encoding correctly. (I know the PCM data is correct. I am able to use it to create a wav file.) I'm also having a problem with
2006 Aug 06
2
Speex + Ogg package
...==0) ((int*)packet)[0]=total_samples; } int nbBytes = speex_bits_write(&enc_bits, packet+4, 2000); tam=nbBytes+4; //Now the ogg package op.packet = (unsigned char *)packet; op.bytes = nbBytes+4; op.b_o_s = 0; op.packetno = packet_id; packet_id++; ogg_stream_packetin(&os, &op); ogg_stream_flush(&os, &audio_page); return audio_page; } As for the decoder I have this. //Incoming data from udp is on buffer char *buffer=ogg_sync_buffer(&oy,4096); memcpy(buffer,buff,len); ogg_sync_wrote(&oy,len); while(ogg_sync_pageout(&oy,&audio_page)>0) { if (stream_init == 0...
2008 Jun 11
1
Page breaks when encoding ogg/theora
...rame - 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 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;...
2003 Nov 08
2
Encoding in Delphi - Help
Hi! I've made a vorbis encoder in delphi, but it's very verey slow! It takes 5 minutes to encode a pcm file. And i don't know why. Could anyone help me??? ---------------------------------------------------------------------------------- result := ogg_stream_flush(os, og); while result <> 0 do begin OutFile.Write(Pointer(og.header)^, og.header_len); OutFile.Write(Pointer(og.body)^, og.body_len); result := ogg_stream_flush(os, og); end; eos := false; while not eos do begin bytes := InFile.Read(readbuffer, SAMPLES*4); if...
2004 Nov 16
0
metadata switches for ffmpeg2theora
...ketin (&info->vo, &header_comm); + ogg_stream_packetin (&info->vo, &header_code); } /* Flush the rest of our headers. This ensures * the actual data in each stream will start * on a new page, as per spec. */ - while (1 && !info.audio_only){ - int result = ogg_stream_flush (&info.to, &info.og); + while (1 && !info->audio_only){ + int result = ogg_stream_flush (&info->to, &info->og); if (result < 0){ /* can't get here */ fprintf (stderr, "Internal Ogg library error.\n"); @@ -137,11 +135,11 @@ } if (re...
2004 May 20
3
Encoding questions
Hi, I have recently implemented encoding/decoding to/from OggVorbis in my app, with the code being based upon the Libvorbisenc sample code supplied with the SDK. It all works very well indeed (encoding from a PCM file, then playback), except that no matter the length of the source PCM file, the last (approx) 4 seconds of audio is always missing from the Ogg file. I am trying to find some
2015 Oct 17
1
Why does this code not generate a valid opus file?
...be no data. header_comm.granulepos = -1; //This packet does not contain audio data, so granule-position = -1 header_comm.packetno = 1; //Second packet. ogg_stream_packetin(&os,&header_comm); //*************** //Write everything out. while(1){ int result=ogg_stream_flush(&os,&og); if(result==0)break; fwrite(og.header,1,og.header_len,fout); fwrite(og.body,1,og.body_len,fout); } //And clean up. ogg_stream_clear(&os); fclose(fout); printf("Done.\n"); return 0; } //Sincerely Daniel Armyr...
2009 May 30
1
Segmentation Fault
...OS Version: Mac OS X 10.5.7 (9J61) Report Version: 6 Anonymous UUID: 80D11E1E-6E2C-4E79-AF46-B93D5C519D5F Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000e9070162 Crashed Thread: 0 Thread 0 Crashed: 0 libogg.0.dylib 0x0088e19e ogg_stream_flush + 110 1 ffmpeg2theora 0x0000baa6 oggmux_init + 2360 2 ffmpeg2theora 0x000063dc ff2theora_output + 9134 3 ffmpeg2theora 0x0000a040 main + 7560 4 ffmpeg2theora 0x00002036 start + 54 Thread 0 crashed with X86 Thread State (32...
2004 Jun 18
5
Patch to stop vcut from generating broken streams
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://westfish.xiph.org/pipermail/vorbis-dev/attachments/20040618/e7bee431/attachment.pgp
2004 Sep 22
3
copying an ogg stream
...acket) 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 first few lines with oggzdump: original file: 0000003a: serialno 1295053610, granulepos 0, packetno 0 *** bos: 00000fc7: serialno 1295053610, granulepo...
2012 Oct 19
3
How to cross-compile opus-tools?
...to `opus_multistream_encoder_ctl' /home/user/source/opus-tools/src/opusenc.c:712: undefined reference to `ogg_stream_init' /home/user/source/opus-tools/src/opusenc.c:727: undefined reference to `ogg_stream_packetin' /home/user/source/opus-tools/src/opusenc.c:729: undefined reference to `ogg_stream_flush' /home/user/source/opus-tools/src/opusenc.c:746: undefined reference to `ogg_stream_packetin' /home/user/source/opus-tools/src/opusenc.c:750: undefined reference to `ogg_stream_flush' /home/user/source/opus-tools/src/opusenc.c:796: undefined reference to `opus_multistream_encode_float...
2002 Mar 14
2
Ogg in MP4 file, Unexpected result from _vorbis_unpack_books
...her thread I do a) submit ogg packet header(header and data) to MP4 save routine b) submit ogg packet header_comment (header and data) to MP4 save routine c) submit ogg packet header_code (header and data) to MP4 save routine d) Get Ogg page(s) containing the header, comment and code using ogg_stream_flush and save it into an .ogg file Note that the ogg_packets and not the ogg page is submitted to the MP4 save routine. Then I do a) If we have a block ready, then get next ogg_packet with vorbis_bitrate_flushpacket b) If we didn't get an ogg packet or if we don't have a block t...