search for: ogg_stream_packetin

Displaying 20 results from an estimated 36 matches for "ogg_stream_packetin".

2004 Nov 16
0
metadata switches for ffmpeg2theora
...(&info->vd, &info->vb); } /* audio init 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-&...
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 pag...
2002 Mar 27
1
What exactly is threadsafe
...1 ) { /* analysis, assume we want to use bitrate management */ vorbis_analysis( &m_vorbisBlock, NULL ); vorbis_bitrate_addblock( &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->writ...
2005 Oct 05
1
Simple encodig sample...
...* video_y, frame_counter % 128, video_x * video_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; } /* unr...
2015 Oct 17
1
Why does this code not generate a valid opus file?
...cket = (unsigned char*)&headerContent; header.bytes = sizeof(struct OggHeader); header.b_o_s = 1; //Header must set beginning_of_stream header.e_o_s = 0; header.granulepos = -1; //This packet does not contain audio data, so granule-position = -1 header.packetno = 0; ogg_stream_packetin(&os,&header); //************** //Create the comments header struct OggCommentHeader commentHeaderContent = { {'O', 'p', 'u', 's', 'T', 'a', 'g', 's'}, 0, //We do not support a vandor string in t...
2006 Oct 06
0
V4L + Theora small app...
..._init( &tOGGstreamState, rand() ); /* need a random number */ theora_encode_init( &tTheoraState, &tTheoraInfo ); theora_info_clear( &tTheoraInfo ); /* first packet will get its own page automatically */ theora_encode_header( &tTheoraState, &tOGGpacket ); ogg_stream_packetin( &tOGGstreamState, &tOGGpacket ); if( ogg_stream_pageout( &tOGGstreamState, &tOGGpage ) != 1 ) { fprintf( stderr, "### Internal Ogg library error \n" ); iRet = -2; goto OGG_OpenClip_quit; } fwrite( tOGGpage.header, 1, tOGGpage.header...
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
2015 May 18
5
Writting 16-bit PCM data to Ogg.
Hi Developers, I have a 16-bit PCM data buffer, I want to write that to ogg file. Could you help me to understand how to write pcm data to the ogg? Thanks in advance. Arun balaji -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20150518/6c8c9a63/attachment.htm
2004 May 20
3
Encoding questions
...back), 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 documentation that details some of the functions used (e.g. vorbis_analysis(), vorbis_bitrate_addblock(), vorbis_bitrate_flushpacket(), ogg_stream_packetin() etc.) as I am sure its just some sort of flushing problem, but I'm not having much luck. So does anyone know the cause of my problem, or where I can find some documentation. <p>Thnx, Dave <p>The information contained in this email and any subsequent correspondence is private an...
2002 Jun 24
1
packetno, granulepos, streaming and framing
...packetno and granulepos values as described below Case #1 : Generated ogg_packets Packet # packetno granulepos --------------------------------------------- 1 Large 0 2 Large 0 3 Large 0 4 3 0 5 4 576 In the second scenario, ogg_packets has additional been processed through a) ogg_stream_packetin() b) ogg_stream_pageout() c) saved into an .ogg file. d) read from an .ogg file e) ogg_stream_pagein() f) ogg_stream_packetout() This produces ogg_packets with packetno and granulepos as listed below. Case #2 : Generated ogg_packets Packet # packetno granu...
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...
2010 Jan 06
1
Initializing vorbis using ov_open_callbacks fail with OV_ENOTVORBIS. But why?
...point me to additional documentation. I used ogg.h and vorbisfile.h. The way so far: - initializing an ogg_sync_state - inserting data to sync_state using ogg_sync_buffer - when whole page found (ogg_sync_pageseek(&sync, &page) > 0) I initialize a ogg_stream_state and add page using ogg_stream_packetin. (in the case the first packet is vorbis - ogg_stream_packetout and check for first some bytes) - next pages with same serial number are handled equivalently: stored in ogg_stream_state using ogg_stream_packetin to add them to ogg_stream_state and using ogg_stream_pageout to get ogg encapsu...
2001 Sep 02
0
Encoding process
...tate from info -- vorbis_analysis_init() 6 init vorbis_block from dsp -- vorbis_block_init() 7 init ogg_stream_state with serial -- ogg_stream_init() 8 fill vorbis_comment -- vorbis_comment_add() 9 create header packets from dsp -- vorbis_analysis_headerout() 10 dump header packets to stream -- ogg_stream_packetin() 11 while pages need to be flushed from stream: -- ogg_stream_flush() 12 flush stream to page -- above 13 write page to file -- fwrite() 14 if nothing written: 15 fatal error 16 forever: 17 get buffer from dsp -- vorbis_analysis_buffer() 18 get some data into buffer 19 if no data:...
2009 Dec 12
1
Skipping of sample in ogg writing
...wrote (&vd, numSamples); while (vorbis_analysis_blockout (&vd, &vb) == 1) { 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);...
2009 Dec 12
1
Skipping of sample in ogg writing
...wrote (&vd, numSamples); while (vorbis_analysis_blockout (&vd, &vb) == 1) { 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);...
2006 Aug 06
2
Speex + Ogg package
...c_bits); //The time stamp if(i==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_pa...
2005 Sep 26
2
encoder_example.c Questions
...s_analysis_blockout(&vd,&vb)==1){ /* analysis, assume we want to use bitrate management */ vorbis_analysis(&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...
2012 Oct 19
3
How to cross-compile opus-tools?
...rence to `opus_strerror' /home/user/source/opus-tools/src/opusenc.c:659: undefined reference 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/use...
2004 Sep 22
3
copying an ogg stream
...++ write_packet(packet) now i write the last packet (this 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...
2002 Mar 14
2
Ogg in MP4 file, Unexpected result from _vorbis_unpack_books
...it can also save Ogg pages in an .ogg file playable by xmms, but that's no big deal. So what I'm doing is this. First the init part. a) vorbis_info_init b) vorbis_encode_init c) vorbis_comment_init d) vorbis_comment_add_tag e) ogg_stream_init f) vorbis_analysis_headerout g) ogg_stream_packetin for the header, the header_comment and the header_code Then the encode part a) sample pcm and hand it to encode code b) get buffer space with vorbis_analysis_buffer c) convert 16 bit signed pcm to float and place in buffer d) tell data size submitted with vorbis_analysis_wrote then go...