[Vorbis-dev] Preliminary vcut patch for chained streams

Michael Gold
Fri, 29 Aug 2008 05:36:52 -0000

Hi all,

The attached patch for vorbis-tools 1.2.0 fixes vcut so it can handle
multiple chained Vorbis streams in the input file. This restructures
large parts of the program to avoid duplicating code (e.g.,
process_first_stream and process_second_stream were very similar).
The error handling is still incomplete, but I'd appreciate hearing any
comments people have on this version.

I think this should work properly with any valid input file now. There
are some cut positions near logical stream boundaries that can't be
encoded, but an error is shown in these cases (I haven't seen any
failures outside such ranges). I've uploaded 2 files that I used for
testing:
  http://chat.carleton.ca/~mgold/ogg/vcut-test-tones.ogg
  http://chat.carleton.ca/~mgold/ogg/vcut-test-rand.ogg

Each file contains 2 concatenated 1-second streams. Each stream in the
'tones' file has 50 ms of one tone, 900 ms of another, and 50 ms of the
first tone; both streams start from non-zero granule positions. The
second file contains two streams, each cut from a larger stream (so some
audio samples need to be dropped from the beginning of each); the
original stream was generated from random data.

-- Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcut-chained.diff
Type: text/x-diff
Size: 29786 bytes
Desc: not available
Url :
http://lists.xiph.org/pipermail/vorbis-dev/attachments/20080829/21c5b5db/attachment-0001.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature