[vorbis] vcut breaks song index ? XMMS search fails

Michael Smith msmith at xiph.org
Thu Aug 28 17:59:02 PDT 2003



On Thursday 28 August 2003 20:48, Arc wrote:
> On Thu, Aug 28, 2003 at 11:26:43AM +1000, Michael Smith wrote:
> > Arc's comments on vcut are partially correct (but gets some technical
> > details wrong: granulepos is never negative, and vcut completely rewrites
> > the stream rather than only the start), and his description of
> > alternatives is a good idea to follow, if you want to.
>
> Hmm... yea I just assumed that it used negetive granulepos, based on the
> Ogg spec.  But under diagnosis, yea...

Read a little closer (actually, isn't this part of the vorbis spec - the part 
dealing with how vorbis is embedded in ogg, obviously). In this case, the 
granulepos is 'short' - less than it normally would be if you used all the 
samples decodable from those packets. It still can't be negative (a negative 
granulepos is always an error).

<p>> I'm curious... vcut isn't suppost to transcode the files, so what
> exactly is going on here?  Why is the first data page shorter than the
> others (only 2 packets with 416 granules)?  Is it really doing
> sample-accurate cutting or is it simply slicing at the nearest packet?

Yes, vcut really is sample-accurate (in the cases where it works - as you and 
others have seen, it doesn't always). This means it does two things: it cuts 
to packet (not page) accuracy, then rewrites the granulepos values so that 
(as described above) they're 'short' at the start/end, so that the exact 
sample offset desired is used.

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-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list