[vorbis-dev] Re: Re: Re: "wrong" total time from ov_time_total

Kenneth C. Arnold kca5 at cornell.edu
Tue Sep 16 13:08:33 PDT 2003



Rodrigo GXmez wrote:
> Thanks for the explanation!
> 
> At the end, this can change the lenght of the audio? If the packets are
> overlapped, then it will be logical to think that the audio will be a little
> bit less, isn't? Or are the packets "larger" than the original, to contain
> the overlapped sections? In either case, I guess that the ov_time_total and
> so on already take this in consideration, no?
> 
> Using a better quality will have less overlaping? I have tryed with this,
> and IIRC, it didn't helped. But I don't have the numbers here.

A spec-compliant decoder will give you exactly the same number of 
samples out as you put in.

A little more detail, if you care:

I don't know why overlapping was even brought up; it is entirely 
abstracted behind the libvorbis and vorbisfile interfaces. The only 
thing that you as a user of the library will see is that if you put in a 
block of uncompressed audio into the encoder, you may not get the all of 
the corresponding compressed audio until the next frame, which is the 
result of a number of factors including the overlap. But the decoder 
knows about this because the encoder stores the index of the last real 
audio sample represented by a packet in the 'granulepos' field.

That's the quick and dirty; these things have been discussed before and 
searching for 'granulepos' in the list archives might turn up some 
interesting discussion.

Ken

--- >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-dev-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-dev mailing list