Re: smallest page of encoded data
"Adam Langley" <[email protected]>
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.general |
|---|---|
| Message-ID | <0E3B93B53D42FA4DA20B91009D283B0A015D590D@wsserver100.winscribe.com> |
Aha - this is a showstopper. I feared as much. My end-goal is actually to do this with the SPEEX codec, but I'm using Vorbis for now because I have previous experience with it. Am I going to have the same problem with SPEEX? Thanks From: [email protected] [mailto:[email protected]] On Behalf Of Carsten Haese Sent: Monday, 16 March 2009 1:10 p.m. To: [email protected] Subject: Re: [Vorbis] smallest page of encoded data On Sun, Mar 15, 2009 at 7:37 PM, Adam Langley <[email protected]> wrote: Hi, I am implementing and audio recorder where I need to encode to vorbis DURING recording. I need to allow the user to cut and paste segments of encoded audio into a new stream. As such, I need to encode the audio in sub-second pages (the smallest allowable amount for the wave format), so that cut/paste can be implemented simply by re-arranging these encoded pages. Somebody with more knowledge of Vorbis internals will probably correct me if I'm wrong, but I don't think it's going to be that simple. Vorbis uses an overlap transform in which the signal is shaped by a rising and falling envelope prior to being encoded. To reconstruct the audio, you need the falling slope of one block and the rising slope of the following block, which are overlapped such that they can be added together to yield the original waveform. This makes it fundamentally difficult to perform cut and paste by "simply" rearranging blocks. (Unless you're okay with the "cross-fade" artifacts that you'll most likely get by allowing a block to be followed by a block with which it's not intended to fit together.) -Carsten