Displaying 20 results from an estimated 97 matches for "ogg_packet".
2006 Jun 05
3
ogg only encoding
...f using the ogg python bindings to do pure ogg
container encoding.
I started looking at the libogg in the hopes of retooling the bindings to
follow a better object model
and it actually looks like the problem is down in libogg, not the bindings.
Am I crazy or does libogg
rely on libvorbis to return ogg_packets, and that there are no functions
that will build an ogg_packet for you from
your own data like an array of bytes? It looks like API users are required
to fill in all the meta
fields of the ogg_packet themselves? Is this correct?
-------------- next part --------------
An HTML attachment was scrubb...
2004 Apr 13
2
Can I join many ogg_packet together and decode it to PCM?
Can I join many ogg_packet together and decode it to PCM?
Or I have to encode each ogg_packet at a time?
If each packet is 1024 long, can I join 1.5 of packet (1024+512), and decode
that 1024+512 packet, and then decode the 512 left?
Or I must decode a whole packet, and can't cut it or decode only some of it
(not a...
2002 Jun 24
1
packetno, granulepos, streaming and framing
Hi
While implementing OSS Ogg/Vorbis encoding and streaming using RTP/RTCP
for both unicast and multicast, I have come across a few issues I need
to clear out regarding the numbering of ogg_packets and their granulepos
value. Below are the result for two different scenarios.
<p>In the first scenario, ogg_packets are generated using
a) vorbis_analysis_headerout()
b) while true
vorbis_analysis_buffer()
vorbis_analysis_wrote()
c)...
2001 Jan 01
1
By design or a bug?
Happy new millenium!
Summary: I'm having a problem queueing up the ogg_packet results of
vorbis_analyze() for later writing to an .ogg stream. The docs don't seem
to say if this is permissable or not. Hence, I don't know if I'm using
the API incorrectly, or if this is an actual bug.
-----
Attached is a short patch to vorbis-tools/oggenc/encode.c (from CVS hea...
2017 Feb 06
2
libvorbis without encapulsation
...format
has a RTP packetizer that works for both Vorbis and Theora, implemented
in rtpenc_xiph.c.
But this packetizer is meant for use in the RTP muxer of libavformat
itself, and the RTP muxer relies on the packet's metadata, that, when it
comes from libvorbis, is derived from the fields of the ogg_packet
structure. Thus, you still need that ogg_packet structure anyway.
Regards,
--
Nicolas George
2004 Oct 18
3
ogg_packet -> ogg_page
hi,
in my quest to grok ogg i tried to write a small program which extracts
ogg_packets, 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...
2015 Jun 19
2
Muxing vorbis in WebM
...uster has the exact same timecode).
2. FFmpeg seems to use granulepos for presentation timestamp - is this
correct? See here:
https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/libvorbisenc.c#L345l
To me it seems the breakdown of ffmpeg's libvorbis_encode_frame is:
- get an ogg_packet from libvorbis (I think this contains a *single*
vorbis block, right?)
- store just the data from that packet (no header) in ffmpeg's own
AVPacket struct
- eventually this AVPacket data will be inserted as the contents of a
WebM (Matroska) block:
https://github.com/FFmpeg/FFm...
2002 Mar 14
2
Ogg in MP4 file, Unexpected result from _vorbis_unpack_books
...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 then
b1) get a block with vorbis_analysis_blockout
b...
2015 Dec 10
1
A question on ogg_packet->packetno for corrupted streams
Hi.
I am trying to implement an ogg codec using libogg, and testing with a piece of encoded data you can see below. It consists of 4 pages, the first two being header data, the third containing two packets of data and the last containing one packet of data. I am confused at the results I get if I corrupt the third page (The first one of the two that contain data).
If I corrupt the first page,
2006 Oct 09
1
Vorbis primitive API examples (LONG)
...red to make ogg_page work?
// FIXME: Why is there no ogg_page_create?
ogg_page og_allocated = {0, 0, 0, 0};
ogg_page* og = &og_allocated;
// Stream data structures
ogg_stream_state *os = NULL;
// FIXME: Why is this magic required to make ogg_page work?
// FIXME: Why is there no ogg_packet_create?
ogg_packet op_allocated = {0, 0, 0, 0, 0, 0};
ogg_packet* op = &op_allocated;
// Ogg init
oy = ogg_sync_create();
// Stream init
// Need to set the serial number later
os = ogg_stream_create(-1);
// CAUTION: Just about anything you do wrong pops a bus error.
// Y...
2015 Jun 24
0
Muxing vorbis in WebM
...> 2. FFmpeg seems to use granulepos for presentation timestamp - is this
> correct? See here:
>
> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/libvorbisenc.c#L345l
>
> To me it seems the breakdown of ffmpeg's libvorbis_encode_frame is:
>
> - get an ogg_packet from libvorbis (I think this contains a *single*
> vorbis block, right?)
> - store just the data from that packet (no header) in ffmpeg's own
> AVPacket struct
> - eventually this AVPacket data will be inserted as the contents of a
> WebM (Matroska) block:
>
>...
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...
2009 Nov 25
2
encoding image from a webcam
...rame, send it over the network and decode it on "the
other side".
For now, it must only work locally so we don't care about the transmission.
This is what I've understood till now: I have a char * buffer from the
camera RG24,I convert it to
YCbCr 4:4:4, I encode it, resulting an ogg_packet. Then I provide this
ogg_packet to the decoder,
get the YCbCr buffer , convert it back to RGB24 then display it.
Now the questions:
I have a Codec class with a function encoderInitialize(), where I
initialize the encoder,
filling a th_info structure with the image's properties, fps, aspect...
2017 Feb 06
2
libvorbis without encapulsation
L'octidi 18 pluviôse, an CCXXV, Miscellaneous a écrit :
> I've built some simple code on the excellent libvorbis API overview on
> the xiph.org site, but the example relies on the ogg_packet struct for
> final output and input to decoder, and shows now examples on how to do
> without it.
Why do you not want it? It is just a simple C struct to carry the
packet's metadata.
> oggpack_buffer comes from ogg/ogg.h, so I guess it may add some things
> not native to "pur...
2009 Aug 12
1
Oggz use
...-----------------------------------------
/static long serialno;
static ogg_int64_t granulepos = 0;
static ogg_int64_t packetno = 0;/
------------------------------------------------------------------------------------------------
/static int oggzHungry(OGGZ * oggz, int empty, void * user_data)
{
ogg_packet op;
//unsigned char buf[1];
//buf[0] = 'A' + (int)packetno;
unsigned char buf[2];
buf[0] = 0;
buf[1] = 0;
memset(&op, 0, sizeof(ogg_packet));
op.packet = buf;
op.bytes = 2;
//op.bytes = 1;
op.granulepos = granulepos;
op.packetno = packetno;
if (packetno == 0) o...
2008 Jan 04
2
ogg packets get lost
Hi,
I am actually working on a c++ wrapper for ogg/theora. It will be a small
library to easily create command line tools to cut/cat video-files and to
extract and join the video and audio stream etc.
However, I started the project and found some very strange behaviors:
I stored some ogg_packet objects (which are created on the heap) in a list.
When I make several calls to ogg_stream_pagein() and ogg_stream_packetout(),
the packets are accidentally overwritten by some nonsense.
I am not sure what really happens, but I guess the libogg writers wanted to
reduce the memory copy to a minim...
2006 May 04
2
Howto get playtime
Hi,
Searched in Google, browsed xiph vorbis sites but found no good information
about how to get the current playtime out of the granuleposition of the
ogg_packet.
Anyone knows if there is any 'Programming with libvorbis' documentation out
there, cause on xiph's site (http://www.xiph.org/vorbis/doc/) there's
nothing :(
Any help?
THX,
Tom
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...
2009 Oct 08
0
Oggz 1.1.0 Release
...know
which page a packet started and ended on -- in particular, an
application may want to cache the byte offset of the start of
certain packets in order to more easily return to that position
in the file later.
As of liboggz 1.1.0, an OggzRead callback provides an oggz_packet:
/**
* An ogg_packet and its position in the stream.
*/
typedef struct {
/** The ogg_packet structure, defined in <ogg/ogg.h> */
ogg_packet op;
/** Its position */
oggz_position pos;
} oggz_packet;
Older applications will continue to work, casting this structure as
an ogg_pa...
2015 Oct 17
1
Why does this code not generate a valid opus file?
...er headerContent = {
{'O', 'p', 'u', 's', 'H', 'e', 'a', 'd'},
1, //Version
2, //Channels
0, //pre-skip
44100, //Original samplerate
0, //output gain
0}; //Mapping family
ogg_packet header;
header.packet = (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.p...