[Vorbis] smallest page of encoded data

Carsten Haese carsten.haese at gmail.com
Sun Mar 15 17:09:51 PDT 2009


On Sun, Mar 15, 2009 at 7:37 PM, Adam Langley <alangley at winscribe.com>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis/attachments/20090315/c619abbb/attachment.htm 


More information about the Vorbis mailing list