[Ffmpeg-devel] ogg vorbis encode?

Michael Niedermayer michaelni
Tue Aug 16 09:36:14 CEST 2005


On Mon, Aug 15, 2005 at 10:38:42PM -0400, Rich Felker wrote:
> On Mon, Aug 15, 2005 at 08:15:37PM -0400, Justin Ruggles wrote:
> > Rich Felker wrote:
> > > This is totally wrong. Vorbis has a time base, you just need to
> > > extract it based on the samplerate.
> > 
> > ok. so should the vorbis time base be (1/audio sample rate) to match the
> > granules?  right now it seems to be set to 1.
> Yes. Actually it would be better to set the time base to:
> gcd(vorbis packet lengths in samples) / samplerate

this suggestion is problematic, for example what if granulepos turns
out not to be an exact multiply of the gcd? yeah its probably not allowed
by the vorbis spec but still what if it happens ...
the safe thing is to set it to the units of granulepos which are 


More information about the ffmpeg-devel mailing list