[vorbis] vcut breaks song index ? XMMS search fails

Arc arc at indymedia.org
Thu Aug 28 03:48:01 PDT 2003


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...

>>> os.pageseek()
<OggPage, BOS, pageno = 0, granulepos = 0, packets = 1, serialno = 1027495843, 
version = 0, head length = 28, body length = 30 at 0x8158240, header at 0x8158260, body at 0x8158280>
>>> os.pageseek()
<OggPage, pageno = 1, granulepos = 0, packets = 2, serialno = 1027495843, versio
n = 0, head length = 42, body length = 3632 at 0x8158180, header at 0x81529c0, 
body at 0x8160000>
>>> os.pageseek()
<OggPage, pageno = 2, granulepos = 416, packets = 2, serialno = 1027495843, 
version = 0, head length = 29, body length = 497 at 0x8158240, header at 
0x8158260, body at 0x8159a00>
>>> os.pageseek()
<OggPage, pageno = 3, granulepos = 17824, packets = 17, serialno = 1027495843, 
version = 0, head length = 49, body length = 4223 at 0x81581e0, header at
0x81529c0, body at 0x8160000>

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?

I found early on that vcut wouldn't do what I needed it to do, basically
what the person who wrote that email is attempting to do too.  We had
huge Icecast2 archives of live recordings (using ices2+icecast to
archive only, not stream) that needed to be sliced and diced, preferably
without transcoding.

But I ended up just learning how Ogg works and using py-ogg and did
page-accurate cutting.  I suppost packet-accurate would be better and
could be made so that there's no hole in the data (as reported by
ogginfo) by regenerating the stream with OggStreamState..

Back to vcut, yea it's totally experimental, it even says so when you
run it.  But the concept is solid, especially if players implement the
negetive granulepos case which is specified by the Ogg spec.  It'd be
interesting to implement a GUI OggSlice based on the upcomming OggFile.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20030828/6ffe3ab9/part.pgp


More information about the Vorbis mailing list