Kenji Chan
2004-Apr-13 15:01 UTC
[vorbis-dev] 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 all) Thank you, <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Conrad Parker
2004-Apr-13 15:04 UTC
[vorbis-dev] Can I join many ogg_packet together and decode it to PCM?
On Wed, Apr 14, 2004 at 08:01:47AM +1000, Kenji Chan wrote:> 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 all)you must decode a whole packet at a time. Conrad. --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith
2004-Apr-13 18:37 UTC
[vorbis-dev] Can I join many ogg_packet together and decode it to PCM?
On Wednesday 14 April 2004 08:01, Kenji Chan wrote:> 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 all) >You always have to decode an entire packet at one time, because of the nature of the transforms used by vorbis (this is something vorbis has in common with all the other interesting audio codecs). However, ogg vorbis has a feature that allows the ogg layer (or some other layer, if you want) to tell the decoder that a packet should be truncated at the start or end of the stream. This allows ogg vorbis files to be (when decoded) the same length as the original input file. The format documentation explains in detail how this works (from the application development perspective, it 'just works'). Mike --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Apparently Analagous Threads
- Given ONLY an ogg packet, can one be able to decode the packet to PCM?
- What is the format of the PCM/WAV dataforspeex_encode & speex_decode?
- Muxing vorbis in WebM
- What is the format of the PCM/WAV data for speex_encode & speex_decode?
- DSP C5xx decode to pcm 16bit